KVM: selftests: Remove duplicate LAUNCH_UPDATE_VMSA call in SEV-ES migrate test
Subsystems (3)
Sean Christopherson
reviewerPATCH 1/1 KVM: selftests: Remove duplicate LAUNCH_UPDATE_VMSA call in SEV-ES migrate test
Drop the explicit KVM_SEV_LAUNCH_UPDATE_VMSA call when creating an SEV-ES VM in the SEV migration test, as sev_vm_create() automatically updates the VMSA pages for SEV-ES guests. The only reason the duplicate call doesn't cause visible problems is because the test doesn't actually try to run the vCPUs. That will change when KVM adds a check to prevent userspace from re-launching a VMSA (which corrupts the VMSA page due to KVM writing encrypted private memory).
--- tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c | 2 -- 1 file changed, 2 deletions(-)
tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c +0 -2
@@ -36,8 +36,6 @@ static struct kvm_vm *sev_vm_create(bool es)sev_vm_launch (vm, es ?SEV_POLICY_ES :0 ); -if (es) -vm_sev_ioctl (vm,KVM_SEV_LAUNCH_UPDATE_VMSA ,NULL );return vm; }
base-commit: f717995cb7dcd8998ab15516b8006aea09cfde0d
Signature · 1 line
2.55.0.970.g62bdec98f9-goog
Quoted 3 lines
Drop the explicit
KVM_SEV_LAUNCH_UPDATE_VMSAcall when creating an SEV-ES VM in the SEV migration test, assev_vm_create()automatically updates the VMSA pages for SEV-ES guests.
Queued for 6.12, thanks.
Signature · 2 lines
Thanks, Sasha