]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Serialize access to the SEV ASID bitmap
authorTom Lendacky <thomas.lendacky@amd.com>
Thu, 3 Oct 2019 21:17:43 +0000 (21:17 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Oct 2019 11:34:06 +0000 (13:34 +0200)
commit749670093ed097c090a0b514c87563714eb22642
treead89951488764d965ac69175b4b4a6bf5160cc3b
parent49fae657f44cef3e33dbdfffb1afdd83f7e7001e
KVM: SVM: Serialize access to the SEV ASID bitmap

The SEV ASID bitmap currently is not protected against parallel SEV guest
startups. This can result in an SEV guest failing to start because another
SEV guest could have been assigned the same ASID value. Use a mutex to
serialize access to the SEV ASID bitmap.

Fixes: 527390bcc2f8 ("KVM: SVM: Add KVM_SEV_INIT command")
Tested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c