[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v4 20/43] i386: Add feature control MSR dependency when SGX is ena
From: |
Paolo Bonzini |
Subject: |
[PULL v4 20/43] i386: Add feature control MSR dependency when SGX is enabled |
Date: |
Wed, 8 Sep 2021 12:04:03 +0200 |
From: Sean Christopherson <sean.j.christopherson@intel.com>
SGX adds multiple flags to FEATURE_CONTROL to enable SGX and Flexible
Launch Control.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210719112136.57018-12-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/kvm/kvm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 11551648f9..6dc40161e0 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -1877,6 +1877,11 @@ int kvm_arch_init_vcpu(CPUState *cs)
!!(c->ecx & CPUID_EXT_SMX);
}
+ c = cpuid_find_entry(&cpuid_data.cpuid, 7, 0);
+ if (c && (c->ebx & CPUID_7_0_EBX_SGX)) {
+ has_msr_feature_control = true;
+ }
+
if (env->mcg_cap & MCG_LMCE_P) {
has_msr_mcg_ext_ctl = has_msr_feature_control = true;
}
--
2.31.1
- [PULL v4 33/43] sgx-epc: Avoid bios reset during sgx epc initialization, (continued)
- [PULL v4 33/43] sgx-epc: Avoid bios reset during sgx epc initialization, Paolo Bonzini, 2021/09/08
- [PULL v4 37/43] docs: standardize book titles to === with overline, Paolo Bonzini, 2021/09/08
- [PULL v4 34/43] hostmem-epc: Make prealloc consistent with qemu cmdline during reset, Paolo Bonzini, 2021/09/08
- [PULL v4 35/43] Kconfig: Add CONFIG_SGX support, Paolo Bonzini, 2021/09/08
- [PULL v4 38/43] docs: standardize directory index to --- with overline, Paolo Bonzini, 2021/09/08
- [PULL v4 41/43] docs/system: Add SGX documentation to the system manual, Paolo Bonzini, 2021/09/08
- [PULL v4 16/43] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EBX, Paolo Bonzini, 2021/09/08
- [PULL v4 30/43] i440fx: Add support for SGX EPC, Paolo Bonzini, 2021/09/08
- [PULL v4 20/43] i386: Add feature control MSR dependency when SGX is enabled,
Paolo Bonzini <=
- [PULL v4 42/43] meson.build: Do not look for VNC-related libraries if have_system is not set, Paolo Bonzini, 2021/09/08
- [PULL v4 43/43] ebpf: only include in system emulators, Paolo Bonzini, 2021/09/08
- Re: [PULL v4 00/43] (Mostly) x86 changes for 2021-09-06, Peter Maydell, 2021/09/09
- Re: [PULL v4 00/43] (Mostly) x86 changes for 2021-09-06, Peter Maydell, 2021/09/11