[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/33] Adjust min CPUID level to 0x12 when SGX is enabled
From: |
Paolo Bonzini |
Subject: |
[PULL 16/33] Adjust min CPUID level to 0x12 when SGX is enabled |
Date: |
Tue, 28 Sep 2021 14:50:59 +0200 |
From: Sean Christopherson <sean.j.christopherson@intel.com>
SGX capabilities are enumerated through CPUID_0x12.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210719112136.57018-16-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/cpu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index de58599a3d..cacec605bf 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6154,6 +6154,11 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
if (sev_enabled()) {
x86_cpu_adjust_level(cpu, &env->cpuid_min_xlevel, 0x8000001F);
}
+
+ /* SGX requires CPUID[0x12] for EPC enumeration */
+ if (env->features[FEAT_7_0_EBX] & CPUID_7_0_EBX_SGX) {
+ x86_cpu_adjust_level(cpu, &env->cpuid_min_level, 0x12);
+ }
}
/* Set cpuid_*level* based on cpuid_min_*level, if not explicitly set */
--
2.31.1
- [PULL 08/33] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EAX, (continued)
- [PULL 08/33] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EAX, Paolo Bonzini, 2021/09/28
- [PULL 06/33] vl: Add sgx compound properties to expose SGX EPC sections to guest, Paolo Bonzini, 2021/09/28
- [PULL 07/33] i386: Add primary SGX CPUID and MSR defines, Paolo Bonzini, 2021/09/28
- [PULL 01/33] memory: Add RAM_PROTECTED flag to skip IOMMU mappings, Paolo Bonzini, 2021/09/28
- [PULL 09/33] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EBX, Paolo Bonzini, 2021/09/28
- [PULL 14/33] i386: kvm: Add support for exposing PROVISIONKEY to guest, Paolo Bonzini, 2021/09/28
- [PULL 10/33] i386: Add SGX CPUID leaf FEAT_SGX_12_1_EAX, Paolo Bonzini, 2021/09/28
- [PULL 12/33] i386: Add feature control MSR dependency when SGX is enabled, Paolo Bonzini, 2021/09/28
- [PULL 13/33] i386: Update SGX CPUID info according to hardware/KVM/user input, Paolo Bonzini, 2021/09/28
- [PULL 11/33] i386: Add get/set/migrate support for SGX_LEPUBKEYHASH MSRs, Paolo Bonzini, 2021/09/28
- [PULL 16/33] Adjust min CPUID level to 0x12 when SGX is enabled,
Paolo Bonzini <=
- [PULL 22/33] i440fx: Add support for SGX EPC, Paolo Bonzini, 2021/09/28
- [PULL 26/33] target/i386: Add the query-sgx-capabilities QMP command, Paolo Bonzini, 2021/09/28
- [PULL 31/33] memory: Add tracepoint for dirty sync, Paolo Bonzini, 2021/09/28
- [PULL 28/33] tests: qtest: bios-tables-test depends on the unpacked edk2 ROMs, Paolo Bonzini, 2021/09/28
- [PULL 33/33] meson_options.txt: Switch the default value for the vnc option to 'auto', Paolo Bonzini, 2021/09/28
- [PULL 02/33] Kconfig: Add CONFIG_SGX support, Paolo Bonzini, 2021/09/28
- [PULL 05/33] i386: Add 'sgx-epc' device to expose EPC sections to guest, Paolo Bonzini, 2021/09/28
- [PULL 15/33] i386: Propagate SGX CPUID sub-leafs to KVM, Paolo Bonzini, 2021/09/28
- [PULL 18/33] hw/i386/pc: Account for SGX EPC sections when calculating device memory, Paolo Bonzini, 2021/09/28
- [PULL 17/33] hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly, Paolo Bonzini, 2021/09/28