Message ID | 20230227163718.62003-6-miguel.luis@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | QEMU v7.2.0 aarch64 Nested Virtualization Support | expand |
On 2/27/23 06:37, Miguel Luis wrote: > - if (vms->virt && (kvm_enabled() || hvf_enabled())) { > + if (vms->virt && (kvm_enabled() || hvf_enabled()) > + && !kvm_arm_el2_supported()) { The ordering of the tests isn't right -- shouldn't test kvm_arm_* for hvf. virt && ((kvm && !kvm_el2) || hvf) r~
Hi Richard, > On 27 Feb 2023, at 18:26, Richard Henderson <richard.henderson@linaro.org> wrote: > > On 2/27/23 06:37, Miguel Luis wrote: >> - if (vms->virt && (kvm_enabled() || hvf_enabled())) { >> + if (vms->virt && (kvm_enabled() || hvf_enabled()) >> + && !kvm_arm_el2_supported()) { > > The ordering of the tests isn't right -- shouldn't test kvm_arm_* for hvf. > > virt && ((kvm && !kvm_el2) || hvf) > Agree. It will be fixed on the next version. Thank you! Miguel > > r~
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 377181e009..7103aecf3f 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2093,7 +2093,8 @@ static void machvirt_init(MachineState *machine) exit(1); } - if (vms->virt && (kvm_enabled() || hvf_enabled())) { + if (vms->virt && (kvm_enabled() || hvf_enabled()) + && !kvm_arm_el2_supported()) { error_report("mach-virt: %s does not support providing " "Virtualization extensions to the guest CPU", kvm_enabled() ? "KVM" : "HVF");