diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-21 14:49:40 +0300 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-09-22 11:55:26 +0300 |
commit | 7deda2ce5b33edc6d689e429e3fe75382468b030 (patch) | |
tree | b3e6adcdb4ac6674cd693bbf95a5658f6a459a35 /arch/x86/include/asm/svm.h | |
parent | ce9ecca0238b140b88f43859b211c9fdfd8e5b70 (diff) | |
download | linux-7deda2ce5b33edc6d689e429e3fe75382468b030.tar.xz |
x86/cpu: Clear SVM feature if disabled by BIOS
When SVM is disabled by BIOS, one cannot use KVM but the
SVM feature is still shown in the output of /proc/cpuinfo.
On Intel machines, VMX is cleared by init_ia32_feat_ctl(),
so do the same on AMD and Hygon processors.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230921114940.957141-1-pbonzini@redhat.com
Diffstat (limited to 'arch/x86/include/asm/svm.h')
-rw-r--r-- | arch/x86/include/asm/svm.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 19bf955b67e0..fb8366af59da 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -229,10 +229,6 @@ struct __attribute__ ((__packed__)) vmcb_control_area { #define SVM_IOIO_SIZE_MASK (7 << SVM_IOIO_SIZE_SHIFT) #define SVM_IOIO_ASIZE_MASK (7 << SVM_IOIO_ASIZE_SHIFT) -#define SVM_VM_CR_VALID_MASK 0x001fULL -#define SVM_VM_CR_SVM_LOCK_MASK 0x0008ULL -#define SVM_VM_CR_SVM_DIS_MASK 0x0010ULL - #define SVM_NESTED_CTL_NP_ENABLE BIT(0) #define SVM_NESTED_CTL_SEV_ENABLE BIT(1) #define SVM_NESTED_CTL_SEV_ES_ENABLE BIT(2) @@ -571,8 +567,6 @@ struct vmcb { #define SVM_CPUID_FUNC 0x8000000a -#define SVM_VM_CR_SVM_DISABLE 4 - #define SVM_SELECTOR_S_SHIFT 4 #define SVM_SELECTOR_DPL_SHIFT 5 #define SVM_SELECTOR_P_SHIFT 7 |