From patchwork Wed Jan 10 19:53:25 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: 761449 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2053086wrz; Wed, 10 Jan 2024 11:55:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoLPinwjn+EJb6obyOIfldEJ8pCWoVFqwlvcbUS0Rj/mnrqCtmpS2vu92l8uVBboY3/Ldu X-Received: by 2002:a05:6830:2aac:b0:6dc:10f:8da0 with SMTP id s44-20020a0568302aac00b006dc010f8da0mr178735otu.63.1704916502483; Wed, 10 Jan 2024 11:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704916502; cv=none; d=google.com; s=arc-20160816; b=KSSZJ6wbKInqnXMv7cXARGL9rPWUOtPdRxyxiOAl1f4w2TkRwmStYfONARVz3D2kL9 LX/QJDUseTV5/zBPkF3wpyePFXULQpW5sen2YRIk+wn5XBcWZGRHyzbNWT3VUht37N1j oeriWM82gSZwVK5SqefA9w82ZXVS66HQksxo0sZ9K0fT2sldt5O4KHeMrxJChTX7OR32 I7PPNaAGdtwAPjJWntQ9DM8POyRAW1zCuDm5RuDxx02WCWAds68LBfA59RW2iMj//lna CetdOYKfa3OOD8NE+qI2u243tL5rX/ztED48wA7aDijH6TLO6SuyiSNwYNeEkNKf5bPF gF9g== 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=0Bn9ysFO5uhdOoEvdDNDnkwY7yFMuDt2XLw3k0zcWt8=; b=pQ2YKq/T+RfbGC3BE3/whTGfV0++LPzIxMi6+OLIkgbUkrxEP/f3vHuBJHZmIJQnvY TEgwI8xMgvy4HriTBY5PdRJ1ZOfNb2SV8QZA0jjSg8jmQLqT8vVpgkqg5uF9gVNQz8mj c8BFSs0GTcUSZQZcORcwSIcHaJ8me6u0qBrGt6i2jUO3RK+wAR+XvXwwvY3ksHgjyqbj CRGS3BKIkCPYpNWxGlvyUOwoqk8zbB40LfX+Qx3/SjI7CLlQHXJvkGm9FxqlKT2SGdHa KAYjTqsTDRqevN6ZEHTp53L+IeXXARizzEHjxGMnTgrDas3VRsxAgpbdstTFIFuLO5Ia ibrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=quuyPhhe; 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 4-20020ac85904000000b0042991c9e3c9si4900659qty.423.2024.01.10.11.55.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2024 11:55:02 -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=quuyPhhe; 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 1rNef9-0001pO-JZ; Wed, 10 Jan 2024 14:54:55 -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 1rNef7-0001gj-MF for qemu-devel@nongnu.org; Wed, 10 Jan 2024 14:54:53 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNef6-0002dB-1X for qemu-devel@nongnu.org; Wed, 10 Jan 2024 14:54:53 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40e5508ecb9so17794965e9.3 for ; Wed, 10 Jan 2024 11:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704916490; x=1705521290; 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=quuyPhheOx7P2sVv5vBD7IAouYsfyt119BXc7g8v2AqoTdORDHzSTZvUU/zn3fKVYw 03HrO1SyGBdQQKIRdGnuSu0COF3eq17EBr5TKmbBAWfqj+2mWryKcZF5C8mlqm0XD8Vv 0fmPJqhyp4kMZ4vIsyWa8WpXdCUIpZXZAFdVFcjKLj449O7d6u4Zc1VSvupP6w/P2RxY XD3mjiPVwtXbYE+oZWU+0eopzZxHZf6K1phZ8U6murfd8T+TlwytR0vbFVQsW1oNviMr KWqfUYUK3/rBTjxkk6Jqf00VC5yH91dJ5OY2GgqxmUDHWgJ3tJDtCtxB/3bOsP88/cyw 0tAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704916490; x=1705521290; 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=xFHPfBvMcNAEvWv/HyV/VzauCKkEeWcF8jVcXyBlSN6Mcid4GxhhIAznynX7jJ6TJN KO+OQuFuFwTlfZfTxaUGPM78DGHVzmMgUt12LlWQ8kMeeHdnCHdKydLX3yMZH77/wdCL /6/V11xVUgLq75El7q7m9pOY+BBbL+QkI77MOPkCTjm0AbcUpbNU7ggGzxDMRtWZCuJ3 coDMuct3eZLQilKI7s8ugShz9jr0dz5ukt0tf3FKR2GGnCqRW3hFTv28jCfg8t/rUl/A 0DJY1HxTpxk/Rp9H1X4MUnmcjVeVrkN5nUKT5Xh7n/8HAfXSU10Do6b5vFoJJ4MR6a6k ZNCA== X-Gm-Message-State: AOJu0Yzq5Tt/BQA5eIX82C1hBAHUSdo8RhyT/RCQKVHsxbUW5Vel5zpt nig4WZRZyw9k4f4nRclV9EA4SbRO6ZCSzuEp4jhSZQ/esFo= X-Received: by 2002:a05:600c:2102:b0:40e:5598:be43 with SMTP id u2-20020a05600c210200b0040e5598be43mr984802wml.29.1704916490381; Wed, 10 Jan 2024 11:54:50 -0800 (PST) Received: from m1x-phil.lan (vau06-h02-176-184-43-236.dsl.sta.abo.bbox.fr. [176.184.43.236]) by smtp.gmail.com with ESMTPSA id n10-20020a5d420a000000b0033719111458sm5550921wrq.36.2024.01.10.11.54.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 10 Jan 2024 11:54:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcin Juszkiewicz , qemu-arm@nongnu.org, Kevin Wolf , Igor Mitsyanko , =?utf-8?q?Alex_Benn=C3=A9e?= , Radoslaw Biernacki , "Edgar E. Iglesias" , Leif Lindholm , Rob Herring , Markus Armbruster , Alistair Francis , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v3 11/14] hw/arm: Prefer arm_feature(PMU) over object_property_find(pmu) Date: Wed, 10 Jan 2024 20:53:25 +0100 Message-ID: <20240110195329.3995-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240110195329.3995-1-philmd@linaro.org> References: <20240110195329.3995-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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); }