]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: SEV: Do not allow intra-host migration/mirroring of SNP VMs
authorAtish Patra <atishp@meta.com>
Tue, 2 Jun 2026 22:36:32 +0000 (15:36 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 10 Jul 2026 15:55:40 +0000 (08:55 -0700)
commit6ee4140788234a6fabf59e6a50e38cdb936008cd
tree64df3b2bcb664644bd3e628795057db6d5d77c05
parent3e6dd2b9b7b2884743ed7a0873b8743cc0df6d40
KVM: SEV: Do not allow intra-host migration/mirroring of SNP VMs

The intra-host migration/mirroring feature is not fully implemented for
SEV-SNP VMs. The proper migration requires additional SNP-specific
state such as guest_req_mutex, guest_req_buf, and guest_resp_buf to be
transferred or initialized on the destination.

The SNP VM mirroring requires vmsa features to be copied as well otherwise
ASID would be bound to SNP range while VM is detected as a SEV VM.

Reject SNP source VMs in migration/mirroring until proper SNP state
transfer is implemented.

Fixes: 1dfe571c12cf ("KVM: SEV: Add initial SEV-SNP support")
Reported-by: Chris Mason <clm@meta.com>
Reported-by: Sashiko <sashiko-bot@kernel.org>
Assisted-by: Claude:claude-opus-4-6
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Atish Patra <atishp@meta.com>
Link: https://patch.msgid.link/20260602-sev_snp_fixes-v3-1-24bfd3ae047c@meta.com
Cc: stable@vger.kernel.org
[sean: let lines poke past 80 chars, tag for stable]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c