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,
Maxim Levitsky <mlevitsk@redhat.com>,
Jim Mattson <jmattson@google.com>
Subject: [PATCH 0/6] KVM: nVMX: Fix nested posted intr vs. HLT
Date: Fri, 7 Jun 2024 10:26:03 -0700 [thread overview]
Message-ID: <20240607172609.3205077-1-seanjc@google.com> (raw)
Fix the nested posted interrupts bug Jim reported a while back[*], where
KVM fails to detect that a pending virtual interrupt for a halted L2 is a
valid wake event. My original analysis and the basic gits of my hack-a-
patch was correct, I just botched a few mundane details (I kept forgetting
the PIR is physically contiguous, while the ISR and IRR are not, *sigh*).
[*] https://lore.kernel.org/all/20231207010302.2240506-1-jmattson@google.com
Sean Christopherson (6):
KVM: nVMX: Add a helper to get highest pending from Posted Interrupt
vector
KVM: nVMX: Request immediate exit iff pending nested event needs
injection
KVM: VMX: Split out the non-virtualization part of
vmx_interrupt_blocked()
KVM: nVMX: Check for pending posted interrupts when looking for nested
events
KVM: nVMX: Fold requested virtual interrupt check into
has_nested_events()
KVM: x86: WARN if a vCPU gets a valid wakeup that KVM can't yet inject
arch/x86/include/asm/kvm-x86-ops.h | 1 -
arch/x86/include/asm/kvm_host.h | 3 +-
arch/x86/kvm/vmx/main.c | 1 -
arch/x86/kvm/vmx/nested.c | 47 ++++++++++++++++++++++++++----
arch/x86/kvm/vmx/posted_intr.h | 10 +++++++
arch/x86/kvm/vmx/vmx.c | 33 ++++++---------------
arch/x86/kvm/vmx/vmx.h | 1 +
arch/x86/kvm/vmx/x86_ops.h | 1 -
arch/x86/kvm/x86.c | 19 +++++-------
9 files changed, 70 insertions(+), 46 deletions(-)
base-commit: af0903ab52ee6d6f0f63af67fa73d5eb00f79b9a
--
2.45.2.505.gda0bf45e8d-goog
next reply other threads:[~2024-06-07 17:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 17:26 Sean Christopherson [this message]
2024-06-07 17:26 ` [PATCH 1/6] KVM: nVMX: Add a helper to get highest pending from Posted Interrupt vector Sean Christopherson
2024-06-07 17:26 ` [PATCH 2/6] KVM: nVMX: Request immediate exit iff pending nested event needs injection Sean Christopherson
2024-06-07 17:26 ` [PATCH 3/6] KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked() Sean Christopherson
2024-06-07 17:26 ` [PATCH 4/6] KVM: nVMX: Check for pending posted interrupts when looking for nested events Sean Christopherson
2024-06-07 17:26 ` [PATCH 5/6] KVM: nVMX: Fold requested virtual interrupt check into has_nested_events() Sean Christopherson
2024-06-07 17:26 ` [PATCH 6/6] KVM: x86: WARN if a vCPU gets a valid wakeup that KVM can't yet inject Sean Christopherson
2024-06-28 22:55 ` [PATCH 0/6] KVM: nVMX: Fix nested posted intr vs. HLT 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=20240607172609.3205077-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--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®