From patchwork Tue Jan 2 16:04:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 759366 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp6112930wrw; Tue, 2 Jan 2024 08:06:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQYPsahLO4+G8jauptKddf033E+qFTAMmw8EB3sINobMMzP0TfjNQ86GFVmTGYMporz8eN X-Received: by 2002:a05:622a:48b:b0:423:8b9f:3a03 with SMTP id p11-20020a05622a048b00b004238b9f3a03mr24220964qtx.26.1704211568966; Tue, 02 Jan 2024 08:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704211568; cv=none; d=google.com; s=arc-20160816; b=wAE5RWgJUpF8R6WYHTwFYwaYXh7Mdwq9oDY2VyCJxYCYwcFS43z1KFntnwoOdKJNAo VmH/xC6/HpoZZCpk6TGwU3h/DSAZvYZh/uVuKXNRYD6B9QBW5moGSvlR9UzRWUWej0vF WmnUd6BXQvJ8rU5yw5J/9wsEFcyv43xG5xUm7J+DQo51catsLBd5eWsd7coPOInpGHCH 0O999mMiWbRFoEj1TEnb1XYIgoXqrFOI34K0iprIypKZJDFXGYkydj6KWfzsmw62/BVv 5jyOe8Cto4Uk2X21mqYVCWKlX8Q+QkwxNLGGQHWmuZ0EU+gElwxfwizTU2zk7rflEU0H i1EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6BwjC+ujFoVcnh1DxjxgU1C6te3MWe6aqORUUnNaIGM=; fh=Fbl4rt7vNadFyu+mhE5sPZ2m5GJmVL0UTbP+h3uuTlY=; b=hwiQlpFR58UOF1iRKYhvGxXN8uEYermIZ6SYvO3Qoov8LE9rrgGFkGmhTOSD5WbL0o 7VXH19ugP071mW+OoTv3vvg841mprp6o5ydN503i+l+Mo8t0UHGSPAutyjFgiEYzV+1g bYqj9e9WjL4iX/Pw1XyA4CE11/e2pUT5zby+qQcxx6pBdIdM9CCSzi6AsI7Er79FYCnp 5BHy0s3Duniwrxv58HKNixqUuEHdGdJXlZc924jhR8b6N4w5Q2yNBO6opmkZdmB1ipcy JAYtAHrVt0400X3rEzG4Z86YB6YR5MqmR/qTZV/c5kpAaTxR+aPuVtfLAj/S33P1y3Rk 5i2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMU2ZMTZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 13-20020ac8590d000000b004277e6e3345si27638301qty.71.2024.01.02.08.06.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jan 2024 08:06:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMU2ZMTZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKhGu-0006QC-US; Tue, 02 Jan 2024 11:05:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKhGi-0006JI-07 for qemu-devel@nongnu.org; Tue, 02 Jan 2024 11:05:28 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKhGg-0002eD-Ee for qemu-devel@nongnu.org; Tue, 02 Jan 2024 11:05:27 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40d8909a6feso15060345e9.2 for ; Tue, 02 Jan 2024 08:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704211524; x=1704816324; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6BwjC+ujFoVcnh1DxjxgU1C6te3MWe6aqORUUnNaIGM=; b=PMU2ZMTZF9/le816mASMlytGfTgze2mTIUiyDNIE2b4tFg1eEgGv3Lx3nTACUsoeAB WG8/c6M4jmL85IezF2nCXfonD7znmIqZ4PPkn7EtOqV+6VNM4PYRAhacGl4qUb/eQhCy YPDS7Go0HG0mc1EaXN/9JmIpXrRecZ8r8vAON9HB1LYZZTDf28znJuzra84XGoenWQhy m9nGm+UfrLXujOxUCypLsOq9BFTeEIp1Ca94D4TZuznHBG7zmb+f2wFk70dvAMR+XmV1 uj/OnnyiwhBqRRnLsz4eNeuL+cOU3ViNHq+BfbzTjN3CTSeBcfQufBl91x9pX2e3rPmM rjLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704211524; x=1704816324; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6BwjC+ujFoVcnh1DxjxgU1C6te3MWe6aqORUUnNaIGM=; b=K02uNwmeVTrga6rhU9Zoe7kv9r+EepyKJpCblmxgA5ovv2hOGicfJL8xfnGiZUA3U4 6dGSlOw3s0I9EnwyaQg5ywMOzC5x4cPhT1/SKdfVilB3p9T25zD6IOM0gzuTuG4sWAfQ Bt1gZAppyZrCb5Mclf8U2xuN8T77ESEkRVRMP/aUCtkxhkQ50S3cD9NsDHDgJCnsW7Ze KCoHenx6+If+ojGyfxSHSRvO8ZFgyCOKZe8q2LBQ/zHcxWLmKFEuqrYooumfaCj1ngTC iqjgmLBgwuoLqpKluaT5XRe5D+GbyB2SPs29R3f58vco/4RmtxyG/lwN05P1/SnX7lrj ascA== X-Gm-Message-State: AOJu0Yy4dh6gJoSfIuN1XY4vYg+GE6uz+6o7xGEawOu+Qm8dHfkp0MRg 2GLA0gdAOyeSrNgLrNfy2yQv9mUWvTb+RlEahFuapEQKKCw= X-Received: by 2002:a05:600c:a44:b0:40d:7822:bf54 with SMTP id c4-20020a05600c0a4400b0040d7822bf54mr2417553wmq.132.1704211524670; Tue, 02 Jan 2024 08:05:24 -0800 (PST) Received: from m1x-phil.lan (sal63-h02-176-184-16-71.dsl.sta.abo.bbox.fr. [176.184.16.71]) by smtp.gmail.com with ESMTPSA id h15-20020a05600c314f00b0040d5f466deesm22836750wmo.38.2024.01.02.08.05.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 02 Jan 2024 08:05:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Eric Blake , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Luc Michel , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Mark Cave-Ayland , Eduardo Habkost , Frederic Konrad , Markus Armbruster , Paolo Bonzini , Kevin Wolf , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 4/5] hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp property Date: Tue, 2 Jan 2024 17:04:53 +0100 Message-ID: <20240102160455.68612-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240102160455.68612-1-philmd@linaro.org> References: <20240102160455.68612-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Do not ignore impossible configuration requested by the user. For example, when trying to enable VFP on a Cortex-M33 we now get: qemu-system-arm: 'cortex-m33-arm-cpu' does not support VFP Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/armv7m.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 3610f6f4a1..12cdad09f9 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -328,6 +328,9 @@ static void armv7m_realize(DeviceState *dev, Error **errp) if (!object_property_set_bool(OBJECT(s->cpu), "vfp", s->vfp, errp)) { return; } + } else if (s->vfp == OPTIONAL_BOOL_TRUE) { + error_setg(errp, "'%s' does not support VFP", s->cpu_type); + return; } if (object_property_find(OBJECT(s->cpu), "dsp")) { if (!object_property_set_bool(OBJECT(s->cpu), "dsp", s->dsp, errp)) {