From patchwork Tue Jan 9 18:09:23 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: 761062 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp1495456wrz; Tue, 9 Jan 2024 10:11:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWH0RTTqFXY+18Dd07P+TnuNXgrcTDxtEY1Ljr0o9Y1fel498dph6kNFkloOJs8PPpgbmY X-Received: by 2002:a0c:e84d:0:b0:680:f847:e6a9 with SMTP id l13-20020a0ce84d000000b00680f847e6a9mr5875856qvo.27.1704823890044; Tue, 09 Jan 2024 10:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704823890; cv=none; d=google.com; s=arc-20160816; b=WnuL6Kn3YhZDAqi78n6Bb+c8PIjcTAR1yEvQmg2Ruk0oBtQ7k5d+j/UcLQai4kwNIF /i/jbPJYXFixIc7Oak6IznizOlOu7SwMBem7T4OLu4nYt+/y1SD/FBI+gbX0tMdaI7Oh uyo0+AfogztWEeyoeAvw0XJ2/oVUipDQxut46dYlId8fLvQT5NaOVThItylrMQErIvjw suvXmFf3ax89n9TN2vBWL28pdB04OcJoO7YwFlN4eJ45pjh+SP3+hSPBWBSwMbd3qep8 yVXYktv0b6MKAMCyivJhsj02b9U8suDgO3v+/Hz9xswoGYHO+8Hvea8PBmVWoqeHJyDT 7Akg== 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=4lFs+peHffZXBVVkShWxuZ7VjcO+rV+nUwkZ0/LL7Zg=; fh=v69mdd+nxs/0WeTIWzLZOPCx0ynE2o0vtvId2fSwkBY=; b=tF3N4Ytitb+EkdivN+tBS/rHCto98j62Wl6DsAYAbPFdXEvquAQTjprpy6jx9FsWA0 z8LE9Rs8GhB2Q8qONFV287lMJvd0hd7NO+HlRv+t2/KA1ctdizfIRVBdIwmKn5HHbltl 4D+0+1OJP807VrFLUSff+x4WgxkwxeEnz/3hB2Py3/I6gLVIXCherusD0BC/4/U0gRCw VkRVEEn+sy15NEbgwLIA/5QOFmXUs5MlE97TnNuRSh9cw5ggXlrbg+hl7DCwGbLG6O9R 2QEqXLy/ZicK7Wtu52WfzstDpFtl+SVHebQtNWn3ZUYnqBIAV++Z+7ueJnce2Z8h3pNK CY9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GBnNFNk2; 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 h17-20020a0cf211000000b0067f8d8402dcsi2771229qvk.174.2024.01.09.10.11.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jan 2024 10:11:30 -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=GBnNFNk2; 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 1rNGZA-0003pR-CA; Tue, 09 Jan 2024 13:11:09 -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 1rNGYb-0002r4-M5 for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:10:37 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNGYX-0004Mw-K9 for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:10:32 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40e5508ecb5so455015e9.1 for ; Tue, 09 Jan 2024 10:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704823825; x=1705428625; 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=4lFs+peHffZXBVVkShWxuZ7VjcO+rV+nUwkZ0/LL7Zg=; b=GBnNFNk23Yt4nxc0ZZK3NEloLeH18SRXEO4mzrbT1+hJ8NJRzFf1l39eq7FXEqgCU8 aqg32aztE4MBH88qxG6lEapyuc6g3R6Wr2KNr6LHa/qeA/rIdO6hnQu/QK0uX255fjkc ZJQ63Atuu1ogTLQm+22Y3xxmwEMtRd0gVzk45x5vDcpb45X1Ra8pui/JfoTwAxWfHhRN KPtX2J2oXomjGGf5knKtesxneRbni5s66dZK9Jd/nbTTXvVvvc0/Nk4SLrY+xx+ENALQ 3Uxa3WbGIYl/GzY/VbzoEp7s7x0qhK3+JQa9VtQ9fqLmhsuVmtcDNjAy8NWmBuihdtRd fIvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704823825; x=1705428625; 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=4lFs+peHffZXBVVkShWxuZ7VjcO+rV+nUwkZ0/LL7Zg=; b=nGqjBSZh31sZ4e7Th9KcSgFfL4i00nW6ydwoxc+nLDdzBUipKJsXQiDUpRsCx2vCrO +o4LOc4JZOqKtlfy+b35EXjC+X6bEJdwOQfFXm2nZjm+oRWZnYwRRVbM77yyVEvxLwTf +xsRK+u1TT90GVsnvsM0LiIc7Zk+UALMSEFtR4aNK0JCI0mlu1USGbPNZstgZXG8JgV6 sdApVxq9X5Tj++0kxfde4SNwIO3fBZ5hxscGPFJDSKbIcEYs2ueXdH2e3iwgSg/17V8D DpZEdLwhXVZFD4CXFV1VNdxydu0VDdwF08t1/5Kv+UpI24qf53A/b7buCzW/PRwhZlcv r98A== X-Gm-Message-State: AOJu0YyFv2NaissxXM5IlRVK8EKsxyEydWbrE/zwwpFATCL1iqVIfFYX 4Mi30B/UsTcWi6WxT3i8Gs3+9iAjbCUqZdOJtXo04/qClkpXaQ== X-Received: by 2002:a05:600c:3143:b0:40d:7247:b00c with SMTP id h3-20020a05600c314300b0040d7247b00cmr3411464wmo.163.1704823825185; Tue, 09 Jan 2024 10:10:25 -0800 (PST) Received: from m1x-phil.lan (rsa59-h02-176-184-32-47.dsl.sta.abo.bbox.fr. [176.184.32.47]) by smtp.gmail.com with ESMTPSA id je4-20020a05600c1f8400b0040e38b7cfdasm15763276wmb.4.2024.01.09.10.10.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 09 Jan 2024 10:10:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Leif Lindholm , Radoslaw Biernacki , Kevin Wolf , Markus Armbruster , "Edgar E. Iglesias" , Igor Mitsyanko , Rob Herring , Alistair Francis , Peter Maydell , Marcin Juszkiewicz , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= Subject: [PATCH v2 08/14] hw/arm: Prefer arm_feature(V7) over object_property_find(pmsav7-dregion) Date: Tue, 9 Jan 2024 19:09:23 +0100 Message-ID: <20240109180930.90793-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240109180930.90793-1-philmd@linaro.org> References: <20240109180930.90793-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 The "pmsav7-dregion" property is added to ARMCPU when the ARM_FEATURE_V7 feature is available. Rather than checking whether the QOM property is present, directly check the feature. Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/armv7m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 0a7ad2b762..7f15318ae3 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -338,8 +338,8 @@ static void armv7m_realize(DeviceState *dev, Error **errp) "mpu-ns-regions and mpu-s-regions properties must have the same value"); return; } - if (s->mpu_ns_regions != UINT_MAX && - object_property_find(OBJECT(s->cpu), "pmsav7-dregion")) { + if (s->mpu_ns_regions != UINT_MAX && arm_feature(&s->cpu->env, + ARM_FEATURE_V7)) { if (!object_property_set_uint(OBJECT(s->cpu), "pmsav7-dregion", s->mpu_ns_regions, errp)) { return;