From: "Naveen N Rao (AMD)" <naveen@kernel.org>
To: Sean Christopherson <seanjc@google.com>, Borislav Petkov <bp@alien8.de>
Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Nikunj A Dadhania <nikunj@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Neeraj Upadhyay <neeraj.upadhyay@amd.com>,
Tianyu Lan <tiala@microsoft.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@kernel.org>
Subject: [RFC PATCH v3 00/27] KVM: SVM: Add support for SEV-SNP Secure AVIC
Date: Wed, 8 Jul 2026 12:01:58 +0530 [thread overview]
Message-ID: <cover.1783490022.git.naveen@kernel.org> (raw)
This is RFC v3 of the patches adding KVM support for Secure AVIC. RFC v2:
http://lore.kernel.org/r/20250923050317.205482-1-Neeraj.Upadhyay@amd.com
There are significant changes throughout the series since the last RFC,
with some of the highlights being:
- Integrate with AVIC code since Secure AVIC is APICv, but for protected
APIC guests. This aligns with TDX which also requires APICv and
enables reuse of APICv code paths in KVM. Patches #8 to #14.
- Mandate use of split irqchip, and drop changes related to the KVM
IOAPIC. KVM PIC/PIT can't be supported (described more fully in the
commit log of the relevant patches). Patch #24.
- Enable use of SVM_AVIC_INCOMPLETE_IPI VMGEXIT for vCPU notification
request from the guest. Patch #22.
- Utilize vNMI injection path for NMI handling. Patch #23.
- Introduce a new kvm_x86_op to distinguish need for injectable
interrupts vs. IPI notifications. Patches #18 and #19.
- Retain KVM PV ops, and instead require guests to opt-in/disable.
Patch #3.
Patches #1 to #4 are changes to the guest x2APIC Secure AVIC driver.
These patches apply on top of Sean's recent fixes changing AVIC init
code (since I was carrying a similar patch):
http://lore.kernel.org/r/20260630210156.457151-1-seanjc@google.com
There are still some rough edges to iron out, but I wanted to get some
feedback on the overall direction. Please let me know if you see any
major red flags.
Thanks,
- Naveen
Kishon Vijay Abraham I (2):
KVM: SVM: Set VGIF in VMSA area for Secure AVIC guests
KVM: SVM: Do not inject exceptions for Secure AVIC
Naveen N Rao (AMD) (20):
x86/apic: Drop savic_eoi() in favor of native_apic_msr_eoi() for
Secure AVIC
x86/kvm: Disable PV_SEND_IPI if Secure AVIC is enabled
x86/apic: Use AVIC_INCOMPLETE_IPI VMGEXIT for Secure AVIC IPI handling
KVM: SVM: Add helper to check if Secure AVIC is enabled for a guest
KVM: SVM: Set guest_apic_protected if Secure AVIC is enabled
kvm: irqfd: Have kvm_arch_has_irq_bypass() take struct kvm pointer
KVM: SVM: Disable IRQ bypass for Secure AVIC
KVM: SVM: Add avic_ipiv_is_soft_disabled() as a wrapper around
enable_ipiv
KVM: SVM: Disable IPIv for Secure AVIC
KVM: SVM: Short-circuit a few AVIC flows for Secure AVIC
KVM: SVM: Warn if we ever receive AVIC_UNACCELERATED_ACCESS #VMEXIT
KVM: SVM: Do not inhibit AVIC for SEV-SNP guests if Secure AVIC is
enabled
KVM: x86: Add a new kvm_x86_op protected_apic_has_injectable_intr()
KVM: SVM: Implement kvm_x86_ops->protected_apic_has_injectable_intr()
for Secure AVIC
KVM: SVM: Implement kvm_x86_ops->protected_apic_has_interrupt() for
Secure AVIC
KVM: SVM: Add interrupt delivery support for Secure AVIC guests
KVM: SVM: Add support for incomplete IPI handling for Secure AVIC
KVM: SVM: Add support for injecting NMIs for Secure AVIC guests
KVM: SVM: Mandate use of split irqchip for Secure AVIC
KVM: SVM: Advertise Secure AVIC support for SEV-SNP guests
Neeraj Upadhyay (5):
x86/apic: Propagate APIC_SPIV writes to hv for Secure AVIC
x86/cpufeatures: Add Secure AVIC CPU feature
KVM: SVM: Add handler for VMGEXIT Secure AVIC NAE event
KVM: SVM: Do not intercept SECURE_AVIC_CONTROL MSR for Secure AVIC
guests
KVM: SVM: Do not intercept exceptions for Secure AVIC guests
arch/arm64/include/asm/kvm_host.h | 2 +-
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/include/asm/kvm-x86-ops.h | 1 +
arch/x86/include/asm/kvm_host.h | 9 +-
arch/x86/include/asm/svm.h | 9 +-
arch/x86/include/uapi/asm/svm.h | 1 +
arch/x86/kvm/svm/svm.h | 12 ++
include/linux/kvm_host.h | 2 +-
arch/powerpc/kvm/powerpc.c | 2 +-
arch/x86/coco/sev/core.c | 18 ++-
arch/x86/kernel/apic/x2apic_savic.c | 36 +-----
arch/x86/kernel/kvm.c | 3 +-
arch/x86/kvm/irq.c | 5 +-
arch/x86/kvm/svm/avic.c | 105 ++++++++++++++++--
arch/x86/kvm/svm/sev.c | 164 +++++++++++++++++++++++++++-
arch/x86/kvm/svm/svm.c | 59 ++++++++--
arch/x86/kvm/vmx/posted_intr.c | 2 +-
arch/x86/kvm/x86.c | 21 +++-
virt/kvm/eventfd.c | 2 +-
19 files changed, 382 insertions(+), 72 deletions(-)
base-commit: 50406d35f5635e1cc523e61409d57e851b5f5df8
prerequisite-patch-id: 1428b4903537b426ee3822a74adf29fbbbeb8e02
prerequisite-patch-id: c88b0c2cb26fb85fc7ef07409aeaf643565b8600
prerequisite-patch-id: a3f8fc507b7809645b001e9394a51f8b299aae47
--
2.54.0
next reply other threads:[~2026-07-08 6:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 6:31 Naveen N Rao (AMD) [this message]
2026-07-08 6:31 ` [RFC PATCH v3 01/27] x86/apic: Propagate APIC_SPIV writes to hv for Secure AVIC Naveen N Rao (AMD)
2026-07-10 2:03 ` Borislav Petkov
2026-07-10 15:02 ` Naveen N Rao
2026-07-11 4:37 ` Borislav Petkov
2026-07-08 6:32 ` [RFC PATCH v3 02/27] x86/apic: Drop savic_eoi() in favor of native_apic_msr_eoi() " Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 03/27] x86/kvm: Disable PV_SEND_IPI if Secure AVIC is enabled Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 04/27] x86/apic: Use AVIC_INCOMPLETE_IPI VMGEXIT for Secure AVIC IPI handling Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 05/27] x86/cpufeatures: Add Secure AVIC CPU feature Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 06/27] KVM: SVM: Add helper to check if Secure AVIC is enabled for a guest Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 07/27] KVM: SVM: Set guest_apic_protected if Secure AVIC is enabled Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 08/27] kvm: irqfd: Have kvm_arch_has_irq_bypass() take struct kvm pointer Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 09/27] KVM: SVM: Disable IRQ bypass for Secure AVIC Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 10/27] KVM: SVM: Add avic_ipiv_is_soft_disabled() as a wrapper around enable_ipiv Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 11/27] KVM: SVM: Disable IPIv for Secure AVIC Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 12/27] KVM: SVM: Short-circuit a few AVIC flows " Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 13/27] KVM: SVM: Warn if we ever receive AVIC_UNACCELERATED_ACCESS #VMEXIT Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 14/27] KVM: SVM: Do not inhibit AVIC for SEV-SNP guests if Secure AVIC is enabled Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 15/27] KVM: SVM: Set VGIF in VMSA area for Secure AVIC guests Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 16/27] KVM: SVM: Add handler for VMGEXIT Secure AVIC NAE event Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 17/27] KVM: SVM: Do not intercept SECURE_AVIC_CONTROL MSR for Secure AVIC guests Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 18/27] KVM: x86: Add a new kvm_x86_op protected_apic_has_injectable_intr() Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 19/27] KVM: SVM: Implement kvm_x86_ops->protected_apic_has_injectable_intr() for Secure AVIC Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 20/27] KVM: SVM: Implement kvm_x86_ops->protected_apic_has_interrupt() " Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 21/27] KVM: SVM: Add interrupt delivery support for Secure AVIC guests Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 22/27] KVM: SVM: Add support for incomplete IPI handling for Secure AVIC Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 23/27] KVM: SVM: Add support for injecting NMIs for Secure AVIC guests Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 24/27] KVM: SVM: Mandate use of split irqchip for Secure AVIC Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 25/27] KVM: SVM: Do not inject exceptions " Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 26/27] KVM: SVM: Do not intercept exceptions for Secure AVIC guests Naveen N Rao (AMD)
2026-07-08 6:32 ` [RFC PATCH v3 27/27] KVM: SVM: Advertise Secure AVIC support for SEV-SNP guests Naveen N Rao (AMD)
2026-07-08 9:20 ` [RFC PATCH v3 00/27] KVM: SVM: Add support for SEV-SNP Secure AVIC Naveen N Rao
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=cover.1783490022.git.naveen@kernel.org \
--to=naveen@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraj.upadhyay@amd.com \
--cc=nikunj@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=tiala@microsoft.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