[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 14/14] hw/arm: Prefer cpu_isar_feature(aa64_mte) over property
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 14/14] hw/arm: Prefer cpu_isar_feature(aa64_mte) over property_find(tag-memory) |
Date: |
Wed, 10 Jan 2024 20:53:28 +0100 |
The "tag-memory" property is added to ARMCPU when the
A64_MTE bit is set in the feature ID register. Rather
than checking whether the QOM property is present, directly
check the feature bit.
Since when ARM_FEATURE_AARCH64 is disabled the isar_aa64_mte
register is invalid, also check for it (see the 'aarch64'
variable set in the previous commit).
Signed-off-by: Philippe Mathieu-Daudé <philmd@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 a43e87874c..7fd7173b5b 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2188,7 +2188,7 @@ static void machvirt_init(MachineState *machine)
* The property exists only if MemTag is supported.
* If it is, we must allocate the ram to back that up.
*/
- if (!object_property_find(cpuobj, "tag-memory")) {
+ if (!aarch64 || !cpu_isar_feature(aa64_mte, ARM_CPU(cs))) {
error_report("MTE requested, but not supported "
"by the guest CPU");
exit(1);
--
2.41.0
- [PATCH v3 08/14] hw/arm: Prefer arm_feature(EL3) over object_property_find(has_el3), (continued)
- [PATCH v3 08/14] hw/arm: Prefer arm_feature(EL3) over object_property_find(has_el3), Philippe Mathieu-Daudé, 2024/01/10
- [PATCH v3 09/14] hw/arm: Prefer arm_feature(EL2) over object_property_find(has_el2), Philippe Mathieu-Daudé, 2024/01/10
- [PATCH v3 10/14] hw/arm: Prefer arm_feature(CBAR*) over object_property_find(reset-cbar), Philippe Mathieu-Daudé, 2024/01/10
- [PATCH v3 11/14] hw/arm: Prefer arm_feature(PMU) over object_property_find(pmu), Philippe Mathieu-Daudé, 2024/01/10
- [PATCH v3 12/14] hw/arm: Prefer arm_feature(GENERIC_TMR) over 'kvm-no-adjvtime' property, Philippe Mathieu-Daudé, 2024/01/10
- [PATCH v3 13/14] hw/arm: Prefer arm_feature(AARCH64) over object_property_find(aarch64), Philippe Mathieu-Daudé, 2024/01/10
[PATCH v3 14/14] hw/arm: Prefer cpu_isar_feature(aa64_mte) over property_find(tag-memory),
Philippe Mathieu-Daudé <=
Re: [PATCH v3 00/14] hw/arm: Prefer arm_feature() over object_property_find(), Peter Maydell, 2024/01/13