[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] target/i386/cpu: Add dependencies of CPUID 0x12 leaves
From: |
Zhao Liu |
Subject: |
[PATCH 3/4] target/i386/cpu: Add dependencies of CPUID 0x12 leaves |
Date: |
Tue, 30 Jul 2024 12:55:43 +0800 |
As SDM stated, CPUID 0x12 leaves depend on CPUID_7_0_EBX_SGX (SGX
feature word).
Since FEAT_SGX_12_0_EAX, FEAT_SGX_12_0_EBX and FEAT_SGX_12_1_EAX define
multiple feature words, add the dependencies of those registers to
report the warning to user if SGX is absent.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
target/i386/cpu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 7a6d0b05ce27..7f55e9ba3ed8 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1734,6 +1734,18 @@ static FeatureDep feature_dependencies[] = {
.from = { FEAT_7_0_EBX, CPUID_7_0_EBX_SGX },
.to = { FEAT_7_0_ECX, CPUID_7_0_ECX_SGX_LC },
},
+ {
+ .from = { FEAT_7_0_EBX, CPUID_7_0_EBX_SGX },
+ .to = { FEAT_SGX_12_0_EAX, ~0ull },
+ },
+ {
+ .from = { FEAT_7_0_EBX, CPUID_7_0_EBX_SGX },
+ .to = { FEAT_SGX_12_0_EBX, ~0ull },
+ },
+ {
+ .from = { FEAT_7_0_EBX, CPUID_7_0_EBX_SGX },
+ .to = { FEAT_SGX_12_1_EAX, ~0ull },
+ },
};
typedef struct X86RegisterInfo32 {
--
2.34.1
- [PATCH 0/4] i386: Clean up SGX for microvm, completely, Zhao Liu, 2024/07/30
- [PATCH 1/4] target/i386/cpu: Remove unnecessary SGX feature words checks, Zhao Liu, 2024/07/30
- [PATCH 2/4] target/i386/cpu: Explicitly express SGX_LC and SGX feature words dependency, Zhao Liu, 2024/07/30
- [PATCH 3/4] target/i386/cpu: Add dependencies of CPUID 0x12 leaves,
Zhao Liu <=
- [PATCH 4/4] target/i386/cpu: Mask off SGX/SGX_LC feature words for non-PC machine, Zhao Liu, 2024/07/30
- Re: [PATCH 0/4] i386: Clean up SGX for microvm, completely, Paolo Bonzini, 2024/07/30