@@ -211,7 +211,8 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
object_property_set_int(cpuobj, "psci-conduit", QEMU_PSCI_CONDUIT_SMC,
&error_abort);
- if (object_property_find(cpuobj, "reset-cbar")) {
+ if (arm_feature(&cpu->env, ARM_FEATURE_CBAR) ||
+ arm_feature(&cpu->env, ARM_FEATURE_CBAR_RO)) {
object_property_set_int(cpuobj, "reset-cbar", MPCORE_PERIPHBASE,
&error_abort);
}
@@ -770,7 +770,8 @@ static void sbsa_ref_init(MachineState *machine)
numa_cpu_pre_plug(&possible_cpus->cpus[cs->cpu_index], DEVICE(cpuobj),
&error_fatal);
- if (object_property_find(cpuobj, "reset-cbar")) {
+ if (arm_feature(cpu_env(cs), ARM_FEATURE_CBAR) ||
+ arm_feature(cpu_env(cs), ARM_FEATURE_CBAR_RO)) {
object_property_set_int(cpuobj, "reset-cbar",
sbsa_ref_memmap[SBSA_CPUPERIPHS].base,
&error_abort);
@@ -229,7 +229,8 @@ static void init_cpus(MachineState *ms, const char *cpu_type,
}
}
- if (object_property_find(cpuobj, "reset-cbar")) {
+ if (arm_feature(&cpu->env, ARM_FEATURE_CBAR) ||
+ arm_feature(&cpu->env, ARM_FEATURE_CBAR_RO)) {
object_property_set_int(cpuobj, "reset-cbar", periphbase,
&error_abort);
}
@@ -2168,7 +2168,8 @@ static void machvirt_init(MachineState *machine)
object_property_set_bool(cpuobj, "lpa2", false, NULL);
}
- if (object_property_find(cpuobj, "reset-cbar")) {
+ if (arm_feature(cpu_env(cs), ARM_FEATURE_CBAR) ||
+ arm_feature(cpu_env(cs), ARM_FEATURE_CBAR_RO)) {
object_property_set_int(cpuobj, "reset-cbar",
vms->memmap[VIRT_CPUPERIPHS].base,
&error_abort);
The "reset-cbar" property is added to ARMCPU when the ARM_FEATURE_CBAR[_RO] features are available. Rather than checking whether the QOM property is present, directly check the features. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/arm/highbank.c | 3 ++- hw/arm/sbsa-ref.c | 3 ++- hw/arm/vexpress.c | 3 ++- hw/arm/virt.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-)