[PATCH 0/6] KVM: SEV: Bug fix, cleanups and enhancements

From: Sean Christopherson
Date: Tue Nov 09 2021 - 16:53:18 EST


Bug fix for COPY_ENC_CONTEXT_FROM that IIRC is very belated feedback (git
says its been sitting in my local repo since at least early September).

The other patches are tangentially related cleanups and enhancements for
the SEV and SEV-ES info, e.g. active flag, ASID, etc...

Booted an SEV guest, otherwise it's effectively all compile-tested only.

Sean Christopherson (6):
KVM: SEV: Disallow COPY_ENC_CONTEXT_FROM if target has created vCPUs
KVM: SEV: Explicitly document that there are no TOCTOU races in copy
ASID
KVM: SEV: Set sev_info.active after initial checks in sev_guest_init()
KVM: SEV: WARN if SEV-ES is marked active but SEV is not
KVM: SEV: Drop a redundant setting of sev->asid during initialization
KVM: SEV: Fix typo in and tweak name of cmd_allowed_from_miror()

arch/x86/kvm/svm/sev.c | 42 +++++++++++++++++++++++++++---------------
arch/x86/kvm/svm/svm.h | 2 +-
2 files changed, 28 insertions(+), 16 deletions(-)

--
2.34.0.rc0.344.g81b53c2807-goog