diff options
| author | Sean Christopherson <[email protected]> | 2021-03-30 20:19:35 -0700 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2021-04-17 08:30:57 -0400 |
| commit | 9fa1521daafb58d878d03d75f6863a11312fae22 (patch) | |
| tree | 31e977ffdfd344f680a9dfd6c2e8f8a4e0d1e753 /tools/perf/scripts/python | |
| parent | c36b16d29f3af5f32fc1b2a3401bf48f71cabee1 (diff) | |
KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes
Set sev->es_active only after the guts of KVM_SEV_ES_INIT succeeds. If
the command fails, e.g. because SEV is already active or there are no
available ASIDs, then es_active will be left set even though the VM is
not fully SEV-ES capable.
Refactor the code so that "es_active" is passed on the stack instead of
being prematurely shoved into sev_info, both to avoid having to unwind
sev_info and so that it's more obvious what actually consumes es_active
in sev_guest_init() and its helpers.
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')
0 files changed, 0 insertions, 0 deletions