KVM: SVM: Require nrips support for SEV guests (and beyond)
authorSean Christopherson <seanjc@google.com>
Fri, 25 Aug 2023 01:36:19 +0000 (18:36 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 25 Aug 2023 16:00:40 +0000 (09:00 -0700)
commit80d0f521d59e08eeaa0bc5d624da139448fb99b8
treefd8edcc490ee545e81543888adb6ee087b167055
parentcb49631ad111570f1bad37702c11c2ae07fa2e3c
KVM: SVM: Require nrips support for SEV guests (and beyond)

Disallow SEV (and beyond) if nrips is disabled via module param, as KVM
can't read guest memory to partially emulate and skip an instruction.  All
CPUs that support SEV support NRIPS, i.e. this is purely stopping the user
from shooting themselves in the foot.

Cc: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20230825013621.2845700-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h