Skip to content

Commit

Permalink
KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paolo Bonzini committed Nov 30, 2021
1 parent c9d61dc commit e90e51d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kvm/vmx/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e90e51d

Please sign in to comment.