From patchwork Tue Jan 9 18:09:27 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: 761060 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp1495444wrz; Tue, 9 Jan 2024 10:11:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFw2YZzKR4iZraanNcj4lHOqFcDvPj6Ytku6tZUtpDYKp0dSa7Uh368wslzjZiaKj5mIkCJ X-Received: by 2002:ae9:e90f:0:b0:783:2be5:eb92 with SMTP id x15-20020ae9e90f000000b007832be5eb92mr1477980qkf.53.1704823888880; Tue, 09 Jan 2024 10:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704823888; cv=none; d=google.com; s=arc-20160816; b=sflcET1Ei+mnpAweD/1DPOfovu4QKvzUxHymbSBZOJH/mZQnzBnbayvGm8/STDIK+Q Af6tEVrDjR8iFoWoUYL/Nz0molBnojJSf/9px0Vfegy/byjLoeNnlWFtaNqjk5q5af2Y TPcqjwyUnmZNoVQ0Nyz5jigB1tjuZ0/a662Ji6dXqQbGuXOJsoGP1e8quzoLNWThNmkb htenWrXLJE/wD/TyEK2DeoFoxOTivLxg/GGV/2J+52hs5i/V6Prvm6KwU3eadNmJyQLU xVy4mcg2TZvf/50rgQU6pvWaMgsCK3Qi8OD9/49wAC7NEdHhEdBd6XeJY0WKIhQbCudt cdcw== 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=6/Hk2SmJl7pABngKVtRs+8Jo9OKAAK/e6Yxa8zZeHcw=; fh=v69mdd+nxs/0WeTIWzLZOPCx0ynE2o0vtvId2fSwkBY=; b=OfcIhCMi+QmSFhA8FQnSBG3yqjl0w6IjiyUO2b/1fTFI23dELWXgjZU9HgPIF9XnEs 5COtfBG/vQYF3DI+Od0FF9VkM3EU19dO2rWZ0F6d5xndWOYSIaO/ftwxVyUkUT002aNg ONOo4KvbV1DgjJ8uLB5H77/9f59hQPE7ytGpzR7SCQl7vRTDiYx+2HvEFHqZyM77bB77 Ow7etzpgNGyILapD4EHEQl/F5CI8kwtw1SG2w0B0eGYlGdMUaj/ivG7RWNQTjrevfToH I7ACWHP1ezcUaWp3WN5k1nJ8OZnnenfREeoqVzNknsgDSjK8LHttpp7ZA/l/KhTTz0f0 TFyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i2fOY1kt; 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 bq40-20020a05620a46a800b0078320120654si2759514qkb.351.2024.01.09.10.11.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jan 2024 10:11:28 -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=i2fOY1kt; 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 1rNGZC-0003rr-2Q; Tue, 09 Jan 2024 13:11:11 -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 1rNGZ2-0003Dh-10 for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:11:00 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNGYx-0004Su-Da for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:10:59 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-336788cb261so2943034f8f.3 for ; Tue, 09 Jan 2024 10:10:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704823851; x=1705428651; 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=6/Hk2SmJl7pABngKVtRs+8Jo9OKAAK/e6Yxa8zZeHcw=; b=i2fOY1ktgha4L+5k2r1rMm8v9EKXXHT4l9L5d1tP2GhpwxOlbavit4KbWQhw26oytK Ip4TCPSRbiitZzRkGM2xvaYDcI4eeEJjUrGcYZh2Su/pm68Q02eDm+MXS5PqyRJHZmrZ rp0GOgC/jIdVZA6nHPFOXIyTqgmb0WO0I4TzYHpMiEOKVAg0JCynnzJzgC1+FNSdgihO i/ZEh2eJitA5C7tQVd3pyJH0P7bnYEQFXrY9u5F+RlmHFjtGwubE2/1a2iX45rqd3IVA yrhcPxgh4otDHzgbKQn1ZLOszTVmkVuP1bhCQs/PPmAXfo+KydUPC+Bh1tqXL/NnuTbc sbYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704823851; x=1705428651; 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=6/Hk2SmJl7pABngKVtRs+8Jo9OKAAK/e6Yxa8zZeHcw=; b=PlifAHMs+5OkV4l2Q8hyyqBReyH+HFrXrERTvmXi56S+TM+861pxclZbSAQ0tM3xi9 s6vXU4uOcTsfkE1hZOQ2is9vTU/d3gCb2L841sJdnASZgdJYU97kYXv1pcowbkirEqDG VGBBw4ZpQJm10QMxsB/O2A1hGCHsH11MYFsMObiJz+ajoDRW4JQugdy1+qjZgr76Cj55 +P0zv3IRO3F5Go5BilAVvPHHVGUMWP9fj0Pm1sxyy9rTZZXbd/xbjEVx1SqIwkbbJugE /G0AnUomKrEWstvkUsgGOwQt2TD/J2IsDct7as1UTcLvMYYdb374dV1EYouBccu5XR51 B0mg== X-Gm-Message-State: AOJu0Yy3QKAziTDIxsLpQSJiPXK/YKs06XZ4cd+JD6e/CljkLPMkULP0 13JEaTTyl+zWwmnOR/O1N+hR9WNznnGYO30OsdnLks44646Ogw== X-Received: by 2002:a5d:4cc9:0:b0:336:c4c1:2d77 with SMTP id c9-20020a5d4cc9000000b00336c4c12d77mr740810wrt.73.1704823850830; Tue, 09 Jan 2024 10:10:50 -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 l8-20020adfe9c8000000b003365951cef9sm2990208wrn.55.2024.01.09.10.10.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 09 Jan 2024 10:10:50 -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 12/14] hw/arm: Prefer arm_feature(PMU) over object_property_find(pmu) Date: Tue, 9 Jan 2024 19:09:27 +0100 Message-ID: <20240109180930.90793-13-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::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 "pmu" property is added to ARMCPU when the ARM_FEATURE_PMU 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/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 7e7350fec2..6d1cb24a6e 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2160,7 +2160,7 @@ static void machvirt_init(MachineState *machine) object_property_set_bool(cpuobj, "kvm-steal-time", false, NULL); } - if (vmc->no_pmu && object_property_find(cpuobj, "pmu")) { + if (arm_feature(cpu_env(cs), ARM_FEATURE_PMU) && vmc->no_pmu) { object_property_set_bool(cpuobj, "pmu", false, NULL); }