kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: stable@vger.kernel.org, Sean Christopherson <seanjc@google.com>
Subject: Re: [PATCH v2] KVM: x86: check PIR even for vCPUs with disabled APICv
Date: Thu, 18 Nov 2021 12:11:02 +0100	[thread overview]
Message-ID: <4ee9fe58-73ca-98fd-3d79-198e1093f722@redhat.com> (raw)
In-Reply-To: <8ad47d43a7c8ae19f09cc6ada73665d6e348e213.camel@redhat.com>

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.

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.


  reply	other threads:[~2021-11-18 11:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18  7:25 [PATCH v2] KVM: x86: check PIR even for vCPUs with disabled APICv Paolo Bonzini
2021-11-18  9:56 ` Maxim Levitsky
2021-11-18 11:11   ` Paolo Bonzini [this message]
2021-11-18 11:17     ` Maxim Levitsky
2021-11-18 16:17     ` Sean Christopherson
2021-11-18 17:56       ` Paolo Bonzini
2021-11-18 16:18 ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ee9fe58-73ca-98fd-3d79-198e1093f722@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=seanjc@google.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).