]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: SVM: Pass through GHCB MSR if and only if VM is an SEV-ES guest
authorSean Christopherson <seanjc@google.com>
Tue, 10 Jun 2025 22:57:20 +0000 (15:57 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:07:26 +0000 (13:07 -0700)
commit3a0f09b361e1c6245c544f9ea9e14ab651979a4f
treef07744d8a531be8cb8defdb752dc89af3281e57e
parent6b7315fe54ce24e65ba2c7b13ae22c6ab6caac5a
KVM: SVM: Pass through GHCB MSR if and only if VM is an SEV-ES guest

Disable interception of the GHCB MSR if and only if the VM is an SEV-ES
guest.  While the exact behavior is completely undocumented in the APM,
common sense and testing on SEV-ES capable CPUs says that accesses to the
GHCB from non-SEV-ES guests will #GP.  I.e. from the guest's perspective,
no functional change intended.

Fixes: 376c6d285017 ("KVM: SVM: Provide support for SEV-ES vCPU creation/loading")
Link: https://lore.kernel.org/r/20250610225737.156318-16-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.c