[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/10] target/i386/cpu: Add dependencies of CPUID 0x12 leaves
From: |
Paolo Bonzini |
Subject: |
[PULL 05/10] target/i386/cpu: Add dependencies of CPUID 0x12 leaves |
Date: |
Wed, 31 Jul 2024 13:18:01 +0200 |
From: Zhao Liu <zhao1.liu@intel.com>
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>
Link: 20240730045544.2516284-4-zhao1.liu@intel.com">https://lore.kernel.org/r/20240730045544.2516284-4-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/cpu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index e864f55d4fc..28b46ef536f 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.45.2
- [PULL 00/10] i386, tests/vm changes for QEMU 9.1-rc, Paolo Bonzini, 2024/07/31
- [PULL 01/10] tests/vm/openbsd: Install tomli, Paolo Bonzini, 2024/07/31
- [PULL 02/10] target/i386: Change unavail from u32 to u64, Paolo Bonzini, 2024/07/31
- [PULL 03/10] target/i386/cpu: Remove unnecessary SGX feature words checks, Paolo Bonzini, 2024/07/31
- [PULL 04/10] target/i386/cpu: Explicitly express SGX_LC and SGX feature words dependency, Paolo Bonzini, 2024/07/31
- [PULL 05/10] target/i386/cpu: Add dependencies of CPUID 0x12 leaves,
Paolo Bonzini <=
- [PULL 07/10] target/i386: Fix typo that assign same value twice, Paolo Bonzini, 2024/07/31
- [PULL 08/10] target/i386: Clean up error cases for vmsr_read_thread_stat(), Paolo Bonzini, 2024/07/31
- [PULL 06/10] target/i386/cpu: Mask off SGX/SGX_LC feature words for non-PC machine, Paolo Bonzini, 2024/07/31
- [PULL 09/10] qemu-vmsr-helper: fix socket loop breakage, Paolo Bonzini, 2024/07/31
- [PULL 10/10] qemu-vmsr-helper: implement --verbose/-v, Paolo Bonzini, 2024/07/31
- Re: [PULL 00/10] i386, tests/vm changes for QEMU 9.1-rc, Richard Henderson, 2024/07/31