diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2024-07-30 12:55:43 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-31 13:13:31 +0200 |
commit | 3722a98948d4fedec7a8c4575f520b346b6bc923 (patch) | |
tree | ac7cc9cb9ee0f2768fcf49d91f39b3e57a94a8c2 /target | |
parent | 4912d6990b806177733efc1365110cd2d92513fa (diff) |
target/i386/cpu: Add dependencies of CPUID 0x12 leaves
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: https://lore.kernel.org/r/20240730045544.2516284-4-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/cpu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index e864f55d4f..28b46ef536 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 { |