mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Chao Gao <chao.gao@intel.com>
Subject: [PATCH 0/5] KVM: nVMX: Honor event priority for PI ack at VM-Enter
Date: Fri,  1 Nov 2024 12:14:42 -0700	[thread overview]
Message-ID: <20241101191447.1807602-1-seanjc@google.com> (raw)

Rework and cleanup KVM's event handling during nested VM-Enter emulation,
and ultimately fix a bug where KVM doesn't honor event priority when
delivering a nested posted interrupt.  Specifically, if there is a posted
interrupt *notification* IRQ in L1's vIRR, the IRQ should not be acked by
the CPU if a higher priority event is recognized after VM-Enter (which
unblocks L1 IRQs).

FWIW, I don't exactly love the resulting code in vmx_check_nested_events(),
so if someone has a better idea...

Sean Christopherson (5):
  KVM: nVMX: Explicitly update vPPR on successful nested VM-Enter
  KVM: nVMX: Check for pending INIT/SIPI after entering non-root mode
  KVM: nVMX: Drop manual vmcs01.GUEST_INTERRUPT_STATUS.RVI check at
    VM-Enter
  KVM: nVMX: Use vmcs01's controls shadow to check for IRQ/NMI windows
    at VM-Enter
  KVM: nVMX: Honor event priority when emulating PI delivery during
    VM-Enter

 arch/x86/kvm/vmx/nested.c | 77 ++++++++++++++++++++++-----------------
 1 file changed, 44 insertions(+), 33 deletions(-)


base-commit: e466901b947d529f7b091a3b00b19d2bdee206ee
-- 
2.47.0.163.g1226f6d8fa-goog


             reply	other threads:[~2024-11-01 19:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 19:14 Sean Christopherson [this message]
2024-11-01 19:14 ` [PATCH 1/5] KVM: nVMX: Explicitly update vPPR on successful nested VM-Enter Sean Christopherson
2024-11-01 19:14 ` [PATCH 2/5] KVM: nVMX: Check for pending INIT/SIPI after entering non-root mode Sean Christopherson
2024-11-01 19:14 ` [PATCH 3/5] KVM: nVMX: Drop manual vmcs01.GUEST_INTERRUPT_STATUS.RVI check at VM-Enter Sean Christopherson
2024-11-01 19:14 ` [PATCH 4/5] KVM: nVMX: Use vmcs01's controls shadow to check for IRQ/NMI windows " Sean Christopherson
2024-11-01 19:14 ` [PATCH 5/5] KVM: nVMX: Honor event priority when emulating PI delivery during VM-Enter Sean Christopherson
2024-11-12  9:04   ` Chao Gao
2024-11-14 15:27     ` Sean Christopherson
2024-12-19  2:41 ` [PATCH 0/5] KVM: nVMX: Honor event priority for PI ack at VM-Enter 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=20241101191447.1807602-1-seanjc@google.com \
    --to=seanjc@google.com \
    --cc=chao.gao@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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

all inboxes | Powered by JetHome®