Message ID | 20241217123932.948789-3-xiaoyao.li@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Clean up and enhance of feature_word_description() | expand |
On Tue, Dec 17, 2024 at 07:39:32AM -0500, Xiaoyao Li wrote: > Date: Tue, 17 Dec 2024 07:39:32 -0500 > From: Xiaoyao Li <xiaoyao.li@intel.com> > Subject: [PATCH 2/2] target/i386: Print CPUID subleaf info for unsupported > feature > X-Mailer: git-send-email 2.34.1 > > Some CPUID leaves have meaningful subleaf index. Print the subleaf info > in feature_word_description for CPUID features. > > Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> > Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> > --- > target/i386/cpu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index d09e2f868c35..3a697834e3ad 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5460,8 +5460,9 @@ static char *feature_word_description(FeatureWordInfo *f) { const char *reg = get_register_name_32(f->cpuid.reg); assert(reg); - return g_strdup_printf("CPUID.%02XH:%s", - f->cpuid.eax, reg); + return g_strdup_printf("CPUID.%02XH_%02XH:%s", + f->cpuid.eax, + f->cpuid.needs_ecx ? f->cpuid.ecx : 0, reg); } case MSR_FEATURE_WORD: return g_strdup_printf("MSR(%02XH)",