Skip to contentSkip to conversation

target/arm: Reinstate "vfp" property on AArch32 CPUs

PATCH In review Peter Maydell 2 participants 2 messages Jan 26, 2024 – Jan 27, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/arm: Reinstate "vfp" property on AArch32 CPUs

In commit 4315f7c614743 we restructured the logic for creating the VFP related properties to avoid testing the aa32_simd_r32 feature on AArch64 CPUs. However in the process we accidentally stopped exposing the "vfp" QOM property on AArch32 TCG CPUs.

This mostly hasn't had any ill effects because not many people want to disable VFP, but it wasn't intentional. Reinstate the property.

Fixes 4315f7c614743 ("target/arm: Restructure has_vfp_d32 test")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2098

---
 target/arm/cpu.c | 4 ++++
 1 file changed, 4 insertions(+)
target/arm/cpu.c +4 -0
index 593695b4247..2bed5987619 100644
@@ -1620,6 +1620,10 @@ void arm_cpu_post_init(Object *obj)
         }
     } else if (cpu_isar_feature(aa32_vfp, cpu)) {
         cpu->has_vfp = true;
+        if (tcg_enabled() || qtest_enabled()) {
+            qdev_property_add_static(DEVICE(obj),
+                                     &arm_cpu_has_vfp_property);
+        }
         if (cpu_isar_feature(aa32_simd_r32, cpu)) {
             cpu->has_vfp_d32 = true;
             /*
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Peter Maydell

In commit 4315f7c614743 we restructured the logic for creating the VFP related properties to avoid testing the aa32_simd_r32 feature on AArch64 CPUs. However in the process we accidentally stopped exposing the "vfp" QOM property on AArch32 TCG CPUs.

This mostly hasn't had any ill effects because not many people want to disable VFP, but it wasn't intentional. Reinstate the property.

Quoted 7 lines
Fixes 4315f7c614743 ("target/arm: Restructure has_vfp_d32 test")

Resolves:https://gitlab.com/qemu-project/qemu/-/issues/2098

---
  target/arm/cpu.c | 4 ++++
  1 file changed, 4 insertions(+)

r~