From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Sean Christopherson <seanjc@google.com>
Subject: [GIT PULL] KVM: x86: VMX changes for 6.12
Date: Fri, 13 Sep 2024 18:13:48 -0700 [thread overview]
Message-ID: <20240914011348.2558415-8-seanjc@google.com> (raw)
In-Reply-To: <20240914011348.2558415-1-seanjc@google.com>
The highlight is a fix for nested posted interrupts that shows up on CPUs with
IPI virtualization. If KVM ends up handling an L1 virtual IRQ for L2's posted
interrupt notification vector, KVM will incorrectly synthesize a VM-Exit to L1
instead of processing pending posted interrupts.
I am very confident in the fix itself. The refactorings to land the fix without
creating a TOCTOU bug on the other hand... I did my best to test that I didn't
botch anything, but my first attempt went poorly, and as a result the changes
haven't been in -next for as long as I'd normally prefer.
The following changes since commit 47ac09b91befbb6a235ab620c32af719f8208399:
Linux 6.11-rc4 (2024-08-18 13:17:27 -0700)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-vmx-6.12
for you to fetch changes up to f3009482512eb057e7161214a068c6bd7bae83a4:
KVM: VMX: Set PFERR_GUEST_{FINAL,PAGE}_MASK if and only if the GVA is valid (2024-09-09 20:33:22 -0700)
----------------------------------------------------------------
KVM VMX changes for 6.12:
- Set FINAL/PAGE in the page fault error code for EPT Violations if and only
if the GVA is valid. If the GVA is NOT valid, there is no guest-side page
table walk and so stuffing paging related metadata is nonsensical.
- Fix a bug where KVM would incorrectly synthesize a nested VM-Exit instead of
emulating posted interrupt delivery to L2.
- Add a lockdep assertion to detect unsafe accesses of vmcs12 structures.
- Harden eVMCS loading against an impossible NULL pointer deref (really truly
should be impossible).
- Minor SGX fix and a cleanup.
----------------------------------------------------------------
Kai Huang (2):
KVM: VMX: Do not account for temporary memory allocation in ECREATE emulation
KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled
Maxim Levitsky (1):
KVM: nVMX: Use vmx_segment_cache_clear() instead of open coded equivalent
Qiang Liu (1):
KVM: VMX: Modify the BUILD_BUG_ON_MSG of the 32-bit field in the vmcs_check16 function
Sean Christopherson (9):
KVM: nVMX: Honor userspace MSR filter lists for nested VM-Enter/VM-Exit
KVM: x86: Move "ack" phase of local APIC IRQ delivery to separate API
KVM: nVMX: Get to-be-acknowledge IRQ for nested VM-Exit at injection site
KVM: nVMX: Suppress external interrupt VM-Exit injection if there's no IRQ
KVM: nVMX: Detect nested posted interrupt NV at nested VM-Exit injection
KVM: x86: Fold kvm_get_apic_interrupt() into kvm_cpu_get_interrupt()
KVM: nVMX: Explicitly invalidate posted_intr_nv if PI is disabled at VM-Enter
KVM: nVMX: Assert that vcpu->mutex is held when accessing secondary VMCSes
KVM: VMX: Set PFERR_GUEST_{FINAL,PAGE}_MASK if and only if the GVA is valid
Vitaly Kuznetsov (1):
KVM: VMX: hyper-v: Prevent impossible NULL pointer dereference in evmcs_load()
Documentation/virt/kvm/api.rst | 23 ++++++++++---
arch/x86/include/asm/kvm_host.h | 3 ++
arch/x86/kvm/irq.c | 10 ++++--
arch/x86/kvm/lapic.c | 9 +++---
arch/x86/kvm/lapic.h | 2 +-
arch/x86/kvm/vmx/nested.c | 72 ++++++++++++++++++++++++++++++-----------
arch/x86/kvm/vmx/nested.h | 6 ++++
arch/x86/kvm/vmx/sgx.c | 2 +-
arch/x86/kvm/vmx/vmx.c | 17 ++++++----
arch/x86/kvm/vmx/vmx.h | 5 +++
arch/x86/kvm/vmx/vmx_onhyperv.h | 8 +++++
arch/x86/kvm/vmx/vmx_ops.h | 2 +-
arch/x86/kvm/x86.c | 6 ++--
13 files changed, 124 insertions(+), 41 deletions(-)
next prev parent reply other threads:[~2024-09-14 1:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 1:13 [GIT PULL] KVM: x86 pull requests " Sean Christopherson
2024-09-14 1:13 ` [GIT PULL] KVM: Common changes " Sean Christopherson
2024-09-14 13:35 ` Paolo Bonzini
2024-09-14 1:13 ` [GIT PULL] KVM: x86: Misc " Sean Christopherson
2024-09-14 1:13 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
2024-09-14 13:50 ` Paolo Bonzini
2024-09-14 1:13 ` [GIT PULL] KVM: x86: VMX and PAT MSRs cleanup Sean Christopherson
2024-09-14 1:13 ` [GIT PULL] KVM: Selftests changes for 6.12 Sean Christopherson
2024-09-14 1:13 ` [GIT PULL] KVM: x86: SVM " Sean Christopherson
2024-09-14 1:13 ` Sean Christopherson [this message]
2024-09-14 14:54 ` [GIT PULL] KVM: x86 pull requests " Paolo Bonzini
2024-09-15 6:32 ` Paolo Bonzini
2024-09-16 18:24 ` 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=20240914011348.2558415-8-seanjc@google.com \
--to=seanjc@google.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®