]> 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)
commit2b28dd0a23c0239c03cc49ecd3526b1a1ddbddb2
treead89951488764d965ac69175b4b4a6bf5160cc3b
parent0458ecd09054a588547586527a35e97225473230
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: 096ffbe6aef9 ("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