diff options
author | Peter Maydell | 2020-01-27 10:44:03 +0100 |
---|---|---|
committer | Peter Maydell | 2020-01-27 10:44:04 +0100 |
commit | 760df0d121a836dcbf3726b80b820115aef21b30 (patch) | |
tree | 6c45419b94179514c09b0270ed31326fe83f874b /target/arm | |
parent | Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-5.0-sf1' i... (diff) | |
parent | build-sys: clean up flags included in the linker command line (diff) | |
download | qemu-760df0d121a836dcbf3726b80b820115aef21b30.tar.gz qemu-760df0d121a836dcbf3726b80b820115aef21b30.tar.xz qemu-760df0d121a836dcbf3726b80b820115aef21b30.zip |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Register qdev properties as class properties (Marc-André)
* Cleanups (Philippe)
* virtio-scsi fix (Pan Nengyuan)
* Tweak Skylake-v3 model id (Kashyap)
* x86 UCODE_REV support and nested live migration fix (myself)
* Advisory mode for pvpanic (Zhenwei)
# gpg: Signature made Fri 24 Jan 2020 20:16:23 GMT
# gpg: using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream: (58 commits)
build-sys: clean up flags included in the linker command line
target/i386: Add the 'model-id' for Skylake -v3 CPU models
qdev: use object_property_help()
qapi/qmp: add ObjectPropertyInfo.default-value
qom: introduce object_property_help()
qom: simplify qmp_device_list_properties()
vl: print default value in object help
qdev: register properties as class properties
qdev: move instance properties to class properties
qdev: rename DeviceClass.props
qdev: set properties with device_class_set_props()
object: return self in object_ref()
object: release all props
object: add object_class_property_add_link()
object: express const link with link property
object: add direct link flag
object: rename link "child" to "target"
object: check strong flag with &
object: do not free class properties
object: add object_property_set_default
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm')
-rw-r--r-- | target/arm/cpu.c | 41 | ||||
-rw-r--r-- | target/arm/kvm.c | 4 | ||||
-rw-r--r-- | target/arm/kvm64.c | 5 |
3 files changed, 17 insertions, 33 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 64cd0a7d73..06907b36d7 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1104,26 +1104,22 @@ void arm_cpu_post_init(Object *obj) if (arm_feature(&cpu->env, ARM_FEATURE_CBAR) || arm_feature(&cpu->env, ARM_FEATURE_CBAR_RO)) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_cbar_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_cbar_property); } if (!arm_feature(&cpu->env, ARM_FEATURE_M)) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_hivecs_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_hivecs_property); } if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_rvbar_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_rvbar_property); } if (arm_feature(&cpu->env, ARM_FEATURE_EL3)) { /* Add the has_el3 state CPU property only if EL3 is allowed. This will * prevent "has_el3" from existing on CPUs which cannot support EL3. */ - qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el3_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el3_property); #ifndef CONFIG_USER_ONLY object_property_add_link(obj, "secure-memory", @@ -1136,8 +1132,7 @@ void arm_cpu_post_init(Object *obj) } if (arm_feature(&cpu->env, ARM_FEATURE_EL2)) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el2_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_has_el2_property); } if (arm_feature(&cpu->env, ARM_FEATURE_PMU)) { @@ -1154,32 +1149,27 @@ void arm_cpu_post_init(Object *obj) if (arm_feature(&cpu->env, ARM_FEATURE_VFP)) { cpu->has_vfp = true; if (!kvm_enabled()) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_has_vfp_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_has_vfp_property); } } if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) { cpu->has_neon = true; if (!kvm_enabled()) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_property); } } if (arm_feature(&cpu->env, ARM_FEATURE_M) && arm_feature(&cpu->env, ARM_FEATURE_THUMB_DSP)) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_has_dsp_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_has_dsp_property); } if (arm_feature(&cpu->env, ARM_FEATURE_PMSA)) { - qdev_property_add_static(DEVICE(obj), &arm_cpu_has_mpu_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_has_mpu_property); if (arm_feature(&cpu->env, ARM_FEATURE_V7)) { qdev_property_add_static(DEVICE(obj), - &arm_cpu_pmsav7_dregion_property, - &error_abort); + &arm_cpu_pmsav7_dregion_property); } } @@ -1198,12 +1188,10 @@ void arm_cpu_post_init(Object *obj) NULL, NULL, &error_abort); } - qdev_property_add_static(DEVICE(obj), &arm_cpu_cfgend_property, - &error_abort); + qdev_property_add_static(DEVICE(obj), &arm_cpu_cfgend_property); if (arm_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER)) { - qdev_property_add_static(DEVICE(cpu), &arm_cpu_gt_cntfrq_property, - &error_abort); + qdev_property_add_static(DEVICE(cpu), &arm_cpu_gt_cntfrq_property); } } @@ -2706,10 +2694,9 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data) device_class_set_parent_realize(dc, arm_cpu_realizefn, &acc->parent_realize); - dc->props = arm_cpu_properties; - acc->parent_reset = cc->reset; - cc->reset = arm_cpu_reset; + device_class_set_props(dc, arm_cpu_properties); + cpu_class_set_parent_reset(cc, arm_cpu_reset, &acc->parent_reset); cc->class_by_name = arm_cpu_class_by_name; cc->has_work = arm_cpu_has_work; diff --git a/target/arm/kvm.c b/target/arm/kvm.c index b87b59a02a..8d82889150 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -181,9 +181,7 @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu) bool kvm_arm_pmu_supported(CPUState *cpu) { - KVMState *s = KVM_STATE(current_machine->accelerator); - - return kvm_check_extension(s, KVM_CAP_ARM_PMU_V3); + return kvm_check_extension(cpu->kvm_state, KVM_CAP_ARM_PMU_V3); } int kvm_arm_get_max_vm_ipa_size(MachineState *ms) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index e2da756e65..6344113a68 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -26,7 +26,6 @@ #include "sysemu/kvm.h" #include "sysemu/kvm_int.h" #include "kvm_arm.h" -#include "hw/boards.h" #include "internals.h" static bool have_guest_debug; @@ -613,14 +612,14 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) bool kvm_arm_aarch32_supported(CPUState *cpu) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); return kvm_check_extension(s, KVM_CAP_ARM_EL1_32BIT); } bool kvm_arm_sve_supported(CPUState *cpu) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); return kvm_check_extension(s, KVM_CAP_ARM_SVE); } |