[PATCH 0/2] Clean up and enhance of feature_word_description()

Xiaoyao Li posted 2 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20241217123932.948789-1-xiaoyao.li@intel.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>
target/i386/cpu.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
[PATCH 0/2] Clean up and enhance of feature_word_description()
Posted by Xiaoyao Li 1 year, 1 month ago
This series grabs two patches related to feature_word_description() from
two different old threads, they are simple and straightforward. 

Patch 1 is grabbed from [1] while patch 2 is grabbed from [2].

[1]: https://lore.kernel.org/qemu-devel/20230106083826.5384-3-lei4.wang@intel.com/
[2]: https://lore.kernel.org/qemu-devel/20220808085834.3227541-2-xiaoyao.li@intel.com/

Lei Wang (1):
  i386: Remove unused parameter "uint32_t bit" in
    feature_word_description()

Xiaoyao Li (1):
  target/i386: Print CPUID subleaf info for unsupported feature

 target/i386/cpu.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
2.34.1
Re: [PATCH 0/2] Clean up and enhance of feature_word_description()
Posted by Xiaoyao Li 1 year ago
On 12/17/2024 8:39 PM, Xiaoyao Li wrote:
> This series grabs two patches related to feature_word_description() from
> two different old threads, they are simple and straightforward.
> 
> Patch 1 is grabbed from [1] while patch 2 is grabbed from [2].

Ping...

> [1]: https://lore.kernel.org/qemu-devel/20230106083826.5384-3-lei4.wang@intel.com/
> [2]: https://lore.kernel.org/qemu-devel/20220808085834.3227541-2-xiaoyao.li@intel.com/
> 
> Lei Wang (1):
>    i386: Remove unused parameter "uint32_t bit" in
>      feature_word_description()
> 
> Xiaoyao Li (1):
>    target/i386: Print CPUID subleaf info for unsupported feature
> 
>   target/i386/cpu.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
Re: [PATCH 0/2] Clean up and enhance of feature_word_description()
Posted by Paolo Bonzini 8 months, 2 weeks ago
On 1/13/25 09:04, Xiaoyao Li wrote:
> On 12/17/2024 8:39 PM, Xiaoyao Li wrote:
>> This series grabs two patches related to feature_word_description() from
>> two different old threads, they are simple and straightforward.
>>
>> Patch 1 is grabbed from [1] while patch 2 is grabbed from [2].
> 
> Ping...

Applied, thanks---with a slightly fancier formatting for patch 2:

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 8589391023d..446924be90f 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5780,12 +5780,15 @@ 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_%02XH:%s",
-                                   f->cpuid.eax,
-                                   f->cpuid.needs_ecx ? f->cpuid.ecx : 0, reg);
+            if (!f->cpuid.needs_ecx) {
+                return g_strdup_printf("CPUID[eax=%02Xh].%s", f->cpuid.eax, reg);
+            } else {
+                return g_strdup_printf("CPUID[eax=%02Xh,ecx=%02Xh].%s",
+                                       f->cpuid.eax, f->cpuid.ecx : 0, reg);
+            }
          }
      case MSR_FEATURE_WORD:
-        return g_strdup_printf("MSR(%02XH)",
+        return g_strdup_printf("MSR(%02Xh)",
                                 f->msr.index);
      }
  

Paolo