lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] KVM: x86: check PIR even for vCPUs with disabled APICv
From
Date
On Thu, 2021-11-18 at 12:11 +0100, Paolo Bonzini wrote:
> On 11/18/21 10:56, Maxim Levitsky wrote:
> > vmx_sync_pir_to_irr has 'if (KVM_BUG_ON(!vcpu->arch.apicv_active,
> > vcpu->kvm))' That has to be removed I think for this to work.
>
> Good point.
>
> > Plus the above calls now can happen when APICv is fully disabled (and
> > not just inhibited), which is also something that I think that
> > vmx_sync_pir_to_irr should be fixed to be aware of.
>
> No, that works because sync_pir_to_irr is set to NULL as you point out
> below. static_call sites are updated right after ops->hardware_setup(),
> in kvm_arch_hardware_setup.

I understand now. Thanks!

Best regards,
Maxim Levitsky

>
> Paolo
>
> > Also note that VMX has code that sets vmx_x86_ops.sync_pir_to_irr to
> > NULL in its 'hardware_setup' if APICv is disabled. I wonder if that
> > done befor or after the static_call_cond sites are updated.
> >
> > I think that this code should be removed as well, and
> > vmx_sync_pir_to_irr should just do nothing when APICv is fully
> > disabled.


\
 
 \ /
  Last update: 2021-11-18 12:19    [W:0.490 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site