diff options
| author | Sean Christopherson <[email protected]> | 2021-03-30 20:19:36 -0700 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2021-04-17 08:30:58 -0400 |
| commit | 8727906fde6ea665b52e68ddc58833772537f40a (patch) | |
| tree | 4d7bcb868fb8cdf87883a0fa38a9158f86bfdbe3 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 9fa1521daafb58d878d03d75f6863a11312fae22 (diff) | |
KVM: SVM: Do not allow SEV/SEV-ES initialization after vCPUs are created
Reject KVM_SEV_INIT and KVM_SEV_ES_INIT if they are attempted after one
or more vCPUs have been created. KVM assumes a VM is tagged SEV/SEV-ES
prior to vCPU creation, e.g. init_vmcb() needs to mark the VMCB as SEV
enabled, and svm_create_vcpu() needs to allocate the VMSA. At best,
creating vCPUs before SEV/SEV-ES init will lead to unexpected errors
and/or behavior, and at worst it will crash the host, e.g.
sev_launch_update_vmsa() will dereference a null svm->vmsa pointer.
Fixes: 1654efcbc431 ("KVM: SVM: Add KVM_SEV_INIT command")
Fixes: ad73109ae7ec ("KVM: SVM: Provide support to launch and run an SEV-ES guest")
Cc: [email protected]
Cc: Brijesh Singh <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions