From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4FD9AC47077 for ; Thu, 11 Jan 2024 09:48:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNrfT-0002ho-Jv; Thu, 11 Jan 2024 04:48:07 -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 1rNrfR-0002hV-AF; Thu, 11 Jan 2024 04:48:05 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNrfP-0000SH-FC; Thu, 11 Jan 2024 04:48:05 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A9BBD619EC; Thu, 11 Jan 2024 09:47:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DD29C433F1; Thu, 11 Jan 2024 09:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704966479; bh=sdXGVlU/cbOcnVnihltP6gl3LWUXUYXfMsu8Vi8kA0A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=U19qhGQjwGHqgoT/AscpE4/Irp6jVLpERHgnwQdh7uZLkhmypHHjck/e3IVZMDZyg fxbWVLtPHq/6CsWnxC3vHJP+DuWk7KAD5+eF6Q1ORb4BDGDb2Be1r2k2ys3ls27zce qC7BA6xAQ/iVsm/mo0i+GtqvCZQE+MZWd4MVhy6eMhMnNp5TPrshvo/yotdWngY/de XOKn1rQqfJvyvxQeUDuLBGwealqC1aIV1C84Wqd7oSRfghSUHmL1TixGKMrTapvpCy q2iZ1G9rTFPNYN7CUNuB2u3s6N1SGIQezeyiuKbg6mgp10kp67uf85rnIi6ei4e7cm Kb1g4HXNsJvbg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rNrfI-00AlsT-MK; Thu, 11 Jan 2024 09:47:56 +0000 Date: Thu, 11 Jan 2024 09:47:56 +0000 Message-ID: <865y009p6b.wl-maz@kernel.org> From: Marc Zyngier To: Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= Cc: qemu-devel@nongnu.org, Peter Maydell , Andrew Jones , Marcin Juszkiewicz , qemu-arm@nongnu.org, Kevin Wolf , Igor Mitsyanko , Alex =?UTF-8?B?QmVubsOpZQ==?= , Radoslaw Biernacki , "Edgar E. Iglesias" , Leif Lindholm , Rob Herring , Markus Armbruster , Alistair Francis Subject: Re: [PATCH v3 13/14] hw/arm: Prefer arm_feature(AARCH64) over object_property_find(aarch64) In-Reply-To: References: <20240110195329.3995-1-philmd@linaro.org> <20240110195329.3995-14-philmd@linaro.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: philmd@linaro.org, qemu-devel@nongnu.org, peter.maydell@linaro.org, ajones@ventanamicro.com, marcin.juszkiewicz@linaro.org, qemu-arm@nongnu.org, kwolf@redhat.com, i.mitsyanko@gmail.com, alex.bennee@linaro.org, rad@semihalf.com, edgar.iglesias@gmail.com, quic_llindhol@quicinc.com, robh@kernel.org, armbru@redhat.com, alistair@alistair23.me X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Received-SPF: pass client-ip=139.178.84.217; envelope-from=maz@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -88 X-Spam_score: -8.9 X-Spam_bar: -------- X-Spam_report: (-8.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.774, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Thu, 11 Jan 2024 09:39:18 +0000, Philippe Mathieu-Daud=C3=A9 wrote: >=20 > On 10/1/24 20:53, Philippe Mathieu-Daud=C3=A9 wrote: > > The "aarch64" property is added to ARMCPU when the > > ARM_FEATURE_AARCH64 feature is available. Rather than > > checking whether the QOM property is present, directly > > check the feature. > >=20 > > Suggested-by: Markus Armbruster > > Signed-off-by: Philippe Mathieu-Daud=C3=A9 > > --- > > hw/arm/virt.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > > index 49ed5309ff..a43e87874c 100644 > > --- a/hw/arm/virt.c > > +++ b/hw/arm/virt.c > > @@ -2140,7 +2140,7 @@ static void machvirt_init(MachineState *machine) > > numa_cpu_pre_plug(&possible_cpus->cpus[cs->cpu_index], DEVICE= (cpuobj), > > &error_fatal); > > - aarch64 &=3D object_property_get_bool(cpuobj, "aarch64", > > NULL); > > + aarch64 &=3D arm_feature(cpu_env(cs), ARM_FEATURE_AARCH64); >=20 > So after this patch there are no more use of the ARMCPU "aarch64" > property from code. Still it is exposed via the qom-tree. Thus it > can be set (see aarch64_cpu_set_aarch64). I could understand one > flip this feature to create a custom CPU (as a big-LITTLE setup > as Marc mentioned on IRC), but I don't understand what is the > expected behavior when this is flipped at runtime. Can that > happen in real hardware (how could the guest react to that...)? I don't think it makes any sense to do that while a guest is running (and no HW I'm aware of would do this). However, it all depends what you consider "run time". You could imagine creating a skeletal VM with all features, and then apply a bunch of changes before the guest actually runs. I don't know enough about the qom-tree and dynamic manipulation of these properties though, and I'm likely to be wrong about the expected usage model. Thanks, M. --=20 Without deviation from the norm, progress is not possible.