i386: Add feature control MSR dependency when SGX is enabled
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>
This commit is contained in:
parent
db88806523
commit
a04835414b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user