diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-30 13:36:41 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-30 13:40:47 +0100 |
commit | e90e51d5f01d2baae5dcce280866bbb96816e978 (patch) | |
tree | 5f681d2760b84da951da182382994ae0b29c9922 /arch/x86 | |
parent | KVM: SEV: accept signals in sev_lock_two_vms (diff) | |
download | linux-e90e51d5f01d2baae5dcce280866bbb96816e978.tar.xz linux-e90e51d5f01d2baae5dcce280866bbb96816e978.zip |
KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled
There is nothing to synchronize if APICv is disabled, since neither
other vCPUs nor assigned devices can set PIR.ON.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/vmx/vmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 1fadec8cbf96..f90448809690 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -7777,10 +7777,10 @@ static __init int hardware_setup(void) ple_window_shrink = 0; } - if (!cpu_has_vmx_apicv()) { + if (!cpu_has_vmx_apicv()) enable_apicv = 0; + if (!enable_apicv) vmx_x86_ops.sync_pir_to_irr = NULL; - } if (cpu_has_vmx_tsc_scaling()) { kvm_has_tsc_control = true; |