public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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: SVM changes for 6.15
Date: Tue, 18 Mar 2025 11:03:01 -0700	[thread overview]
Message-ID: <20250318180303.283401-7-seanjc@google.com> (raw)
In-Reply-To: <20250318180303.283401-1-seanjc@google.com>

Misc cleanups, a pile of fixes related to SNP's AP Creation hypercall, and
support for Idle HLT interception.

Note, Manali wrote a selftest for Idle HLT, but unfortunately it can't be
merged at this time as the test has no way to know if _KVM_ support Idle HLT;
the CPUID feature bit enumerates KVM emulation of Idle HLT for nested VMs,
and there was no strong reason to expose a module param, let alone a capability.

The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3:

  Linux 6.14-rc2 (2025-02-09 12:45:03 -0800)

are available in the Git repository at:

  https://github.com/kvm-x86/linux.git tags/kvm-x86-svm-6.15

for you to fetch changes up to 4e96f010afb2815e33c9b15a695e0e0b4cb3cea6:

  KVM: SVM: Invalidate "next" SNP VMSA GPA even on failure (2025-03-03 07:34:56 -0800)

----------------------------------------------------------------
KVM SVM changes for 6.15

 - Ensure the PSP driver is initialized when both the PSP and KVM modules are
   built-in (the initcall framework doesn't handle dependencies).

 - Use long-term pins when registering encrypted memory regions, so that the
   pages are migrated out of MIGRATE_CMA/ZONE_MOVABLE and don't lead to
   excessive fragmentation.

 - Add macros and helpers for setting GHCB return/error codes.

 - Add support for Idle HLT interception, which elides interception if the vCPU
   has a pending, unmasked virtual IRQ when HLT is executed.

 - Fix a bug in INVPCID emulation where KVM fails to check for a non-canonical
   address.

 - Don't attempt VMRUN for SEV-ES+ guests if the vCPU's VMSA is invalid, e.g.
   because the vCPU was "destroyed" via SNP's AP Creation hypercall.

 - Reject SNP AP Creation if the requested SEV features for the vCPU don't
   match the VM's configured set of features.

 - Misc cleanups

----------------------------------------------------------------
Ge Yang (1):
      KVM: SEV: Use long-term pin when registering encrypted memory regions

Manali Shukla (2):
      x86/cpufeatures: Add CPUID feature bit for Idle HLT intercept
      KVM: SVM: Add Idle HLT intercept support

Melody Wang (2):
      KVM: SVM: Convert plain error code numbers to defines
      KVM: SVM: Provide helpers to set the error code

Nikunj A Dadhania (1):
      KVM: SEV: Use to_kvm_sev_info() for fetching kvm_sev_info struct

Sean Christopherson (11):
      crypto: ccp: Add external API interface for PSP module initialization
      KVM: SVM: Ensure PSP module is initialized if KVM module is built-in
      KVM: SVM: Inject #GP if memory operand for INVPCID is non-canonical
      KVM: SVM: Refuse to attempt VRMUN if an SEV-ES+ guest has an invalid VMSA
      KVM: SVM: Don't change target vCPU state on AP Creation VMGEXIT error
      KVM: SVM: Require AP's "requested" SEV_FEATURES to match KVM's view
      KVM: SVM: Simplify request+kick logic in SNP AP Creation handling
      KVM: SVM: Use guard(mutex) to simplify SNP AP Creation error handling
      KVM: SVM: Mark VMCB dirty before processing incoming snp_vmsa_gpa
      KVM: SVM: Use guard(mutex) to simplify SNP vCPU state updates
      KVM: SVM: Invalidate "next" SNP VMSA GPA even on failure

 arch/x86/include/asm/cpufeatures.h |   1 +
 arch/x86/include/asm/sev-common.h  |  12 +-
 arch/x86/include/asm/svm.h         |   5 +-
 arch/x86/include/uapi/asm/svm.h    |   2 +
 arch/x86/kvm/svm/sev.c             | 380 +++++++++++++++++--------------------
 arch/x86/kvm/svm/svm.c             |  39 +++-
 arch/x86/kvm/svm/svm.h             |  39 +++-
 drivers/crypto/ccp/sp-dev.c        |  14 ++
 include/linux/psp-sev.h            |   9 +
 9 files changed, 269 insertions(+), 232 deletions(-)

  parent reply	other threads:[~2025-03-18 18:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 18:02 [GIT PULL] KVM: x86: Changes for 6.15 Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: x86: Misc changes " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: x86: PV clock " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: Selftests changes for 6.15, part 2 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: Selftests changes for 6.15, part 1 Sean Christopherson
2025-03-18 18:03 ` Sean Christopherson [this message]
2025-03-18 18:03 ` [GIT PULL] KVM: x86: VMX changes for 6.15 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: x86: Xen " Sean Christopherson
2025-03-19 17:53 ` [GIT PULL] KVM: x86: Changes " Paolo Bonzini
2025-03-19 19:42   ` 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=20250318180303.283401-7-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