diff options
author | Sean Christopherson <seanjc@google.com> | 2023-08-24 18:36:19 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-08-25 09:00:40 -0700 |
commit | 80d0f521d59e08eeaa0bc5d624da139448fb99b8 (patch) | |
tree | fd8edcc490ee545e81543888adb6ee087b167055 /arch/x86/kvm/svm/svm.h | |
parent | cb49631ad111570f1bad37702c11c2ae07fa2e3c (diff) | |
download | lwn-80d0f521d59e08eeaa0bc5d624da139448fb99b8.tar.gz lwn-80d0f521d59e08eeaa0bc5d624da139448fb99b8.zip |
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>
Diffstat (limited to 'arch/x86/kvm/svm/svm.h')
-rw-r--r-- | arch/x86/kvm/svm/svm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h index 800ca1776b59..1498956a589f 100644 --- a/arch/x86/kvm/svm/svm.h +++ b/arch/x86/kvm/svm/svm.h @@ -33,6 +33,7 @@ #define MSRPM_OFFSETS 32 extern u32 msrpm_offsets[MSRPM_OFFSETS] __read_mostly; extern bool npt_enabled; +extern int nrips; extern int vgif; extern bool intercept_smi; extern bool x2avic_enabled; |