* [PATCH] KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled
@ 2021-11-30 12:37 Paolo Bonzini
2021-11-30 20:32 ` Sean Christopherson
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2021-11-30 12:37 UTC (permalink / raw)
To: linux-kernel, kvm
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>
---
arch/x86/kvm/vmx/vmx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index ca1fd93c1dc9..9453743ce0c4 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -7778,10 +7778,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;
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled
2021-11-30 12:37 [PATCH] KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled Paolo Bonzini
@ 2021-11-30 20:32 ` Sean Christopherson
2021-11-30 21:09 ` Maxim Levitsky
0 siblings, 1 reply; 3+ messages in thread
From: Sean Christopherson @ 2021-11-30 20:32 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: linux-kernel, kvm
On Tue, Nov 30, 2021, Paolo Bonzini wrote:
> 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>
> ---
Reviewed-by: Sean Christopherson <seanjc@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled
2021-11-30 20:32 ` Sean Christopherson
@ 2021-11-30 21:09 ` Maxim Levitsky
0 siblings, 0 replies; 3+ messages in thread
From: Maxim Levitsky @ 2021-11-30 21:09 UTC (permalink / raw)
To: Sean Christopherson, Paolo Bonzini; +Cc: linux-kernel, kvm
On Tue, 2021-11-30 at 20:32 +0000, Sean Christopherson wrote:
> On Tue, Nov 30, 2021, Paolo Bonzini wrote:
> > 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>
> > ---
>
> Reviewed-by: Sean Christopherson <seanjc@google.com>
>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-30 21:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-30 12:37 [PATCH] KVM: VMX: clear vmx_x86_ops.sync_pir_to_irr if APICv is disabled Paolo Bonzini
2021-11-30 20:32 ` Sean Christopherson
2021-11-30 21:09 ` Maxim Levitsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox