Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvm: sev: Fail KVM_SEV_INIT if already initialized
By code inspection, it was found that multiple calls to KVM_SEV_INIT could deplete asid bits and overwrite kvm_sev_info's regions_list. Multiple calls to KVM_SVM_INIT is not likely to occur with QEMU, but this should likely be fixed anyway. This code is serialized by kvm->lock. Fixes: 1654efc ("KVM: SVM: Add KVM_SEV_INIT command") Reported-by: Cfir Cohen <[email protected]> Signed-off-by: David Rientjes <[email protected]> Signed-off-by: Radim Krčmář <[email protected]>
- Loading branch information