On 10/1/24 20:53, Philippe Mathieu-Daudé 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.

Suggested-by: Markus Armbruster <arm...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  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 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 &= object_property_get_bool(cpuobj, "aarch64", NULL);
+        aarch64 &= arm_feature(cpu_env(cs), ARM_FEATURE_AARCH64);

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...)?

Thanks,

Phil.


Reply via email to