
This reverts commit 9db5487d84eef5ba38adefb70138644d1012f05f. This patch will cause virsh to fail to start because libvirt first starts a QEMU process with `-machine none` for initialization, and then starts one with `-machine virt`. When using `-machine none`, the VIRT_MACHINE conversion will result in an error. Signed-off-by: Jinqian Yang <yangjinqian1@huawei.com> --- hw/arm/virt.c | 19 ------------------- include/hw/arm/virt.h | 1 - target/arm/kvm.c | 10 ++-------- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index db1b9715e0..f7a9ba9a58 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3044,20 +3044,6 @@ static void virt_set_its(Object *obj, bool value, Error **errp) vms->its = value; } -static bool virt_get_ipiv(Object *obj, Error **errp) -{ - VirtMachineState *vms = VIRT_MACHINE(obj); - - return vms->ipiv; -} - -static void virt_set_ipiv(Object *obj, bool value, Error **errp) -{ - VirtMachineState *vms = VIRT_MACHINE(obj); - - vms->ipiv = value; -} - static void virt_get_dtb_randomness(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { @@ -4100,11 +4086,6 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) "in ACPI table header." "The string may be up to 8 bytes in size"); - object_class_property_add_bool(oc, "ipiv", - virt_get_ipiv, - virt_set_ipiv); - object_class_property_set_description(oc, "ipiv", - "Set on/off to enable/disable IPIV"); } static char *virt_get_kvm_type(Object *obj, Error **errp G_GNUC_UNUSED) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index a54b0057fb..fee7c27e0c 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -225,7 +225,6 @@ struct VirtMachineState { bool cpu_hotplug_enabled; bool ras; bool mte; - bool ipiv; OnOffAuto dtb_randomness; bool pmu; int smmu_accel_count; diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 7d443a967d..f45783a9da 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -34,7 +34,6 @@ #include "hw/irq.h" #include "qapi/visitor.h" #include "qemu/log.h" -#include "hw/arm/virt.h" const KVMCapabilityInfo kvm_arch_required_capabilities[] = { KVM_CAP_LAST_INFO @@ -260,15 +259,10 @@ int kvm_arch_get_default_type(MachineState *ms) return fixed_ipa ? 0 : size; } -static void kvm_update_ipiv_cap(MachineState *ms, KVMState *s) +static void kvm_update_ipiv_cap(KVMState *s) { - VirtMachineState *vms = VIRT_MACHINE(ms); int ret; - if (!vms->ipiv) { - return; - } - if (!kvm_check_extension(s, KVM_CAP_ARM_HISI_IPIV)) { return; } @@ -355,7 +349,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) } kvm_arm_init_debug(s); - kvm_update_ipiv_cap(ms, s); + kvm_update_ipiv_cap(s); ret = kvm_arm_rme_init(ms); if (ret) { -- 2.33.0