Re: [PATCH v3 0/4] KVM: Miscellaneous SEV/SNP related fixes

From: Herbert Xu

Date: Sun Jul 12 2026 - 23:36:06 EST


On Tue, Jun 02, 2026 at 03:36:31PM -0700, Atish Patra wrote:
> This series addresses a few issues found during code audit of the
> KVM SEV/SNP and CCP driver code. The fixes include a incorrect lock state
> and incomplete state handling during intra-host migration for SNP VMs.
>
> To: Sean Christopherson <seanjc@xxxxxxxxxx>
> To: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> To: Borislav Petkov <bp@xxxxxxxxx>
> To: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> To: x86@xxxxxxxxxx
> To: H. Peter Anvin <hpa@xxxxxxxxx>
> To: Tom Lendacky <thomas.lendacky@xxxxxxx>
> To: Peter Gonda <pgonda@xxxxxxxxxx>
> To: Brijesh Singh <brijesh.singh@xxxxxxx>
> To: Youngjae Lee <youngjaelee@xxxxxxxx>
> To: Ashish Kalra <ashish.kalra@xxxxxxx>
> To: Michael Roth <michael.roth@xxxxxxx>
> To: John Allen <john.allen@xxxxxxx>
> To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Cc: clm@xxxxxxxx
> Cc: kvm@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: linux-crypto@xxxxxxxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx
>
> Signed-off-by: Atish Patra <atishp@xxxxxxxx>
> ---
> Changes in v3:
> - Added comments, fixed commit messages and fixes tag as per discussions on v2.
> - sev_init_ex_buffer initialized with zero at allocation to prevent any kernel
> data leak in case of init_ex_file is not present. Reported by Sashiko
> - Link to v2: https://lore.kernel.org/r/20260601-sev_snp_fixes-v2-0-611891b28a86@xxxxxxxx
>
> Changes in v2:
> - Added fixes based on the reports by Sashiko.
> - Added a kselftest for validating SNP VM mirroring/migration rejection.
> - Link to v1: https://lore.kernel.org/r/20260528-sev_snp_fixes-v1-0-d67a08151779@xxxxxxxx
>
> ---
> Atish Patra (4):
> KVM: SEV: Do not allow intra-host migration/mirroring of SNP VMs
> KVM: selftests: Verify SNP VMs are rejected from migration and mirroring
> crypto: ccp: Fix possible deadlock in SEV init failure path
> crypto: ccp: Fix memory leak in SEV INIT_EX path
>
> arch/x86/kvm/svm/sev.c | 6 ++-
> drivers/crypto/ccp/sev-dev.c | 19 +++++++--
> .../testing/selftests/kvm/x86/sev_migrate_tests.c | 47 ++++++++++++++++++++++
> 3 files changed, 67 insertions(+), 5 deletions(-)
> ---
> base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
> change-id: 20260525-sev_snp_fixes-0b73789c1a91

Patches 3-4 applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt