Skip to contentSkip to conversation

Fix some feature names for i386

PATCH Superseded Tim Wiederhake 2 participants 6 messages Aug 24, 2023 – Aug 25, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Fix some feature names for i386

Some feature names were missing, wrong, or duplicated in the feature_word_info table. See individual commits for details.

This introduces some merge conflicts for
https://lists.nongnu.org/archive/html/qemu-devel/2023-08/msg02005.html
but that series might need to be reworked anyway.

Regards,
Tim

Tim Wiederhake (3):
target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS target/i386: Fix duplicated feature name in FEAT_KVM

 target/i386/cpu.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/3 target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS

Add the missing feature names for two bits in the FEAT_VMX_EPT_VPID_CAPS cpuid leaf. "vmx-ept-uc" is currently unused, but "vmx-ept-wb" is enabled for multiple cpu models.

---
 target/i386/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/i386/cpu.c +2 -2
index 97ad229d8b..e6b8c62b92 100644
@@ -1314,8 +1314,8 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             "vmx-ept-execonly", NULL, NULL, NULL,
             NULL, NULL, "vmx-page-walk-4", "vmx-page-walk-5",
-            NULL, NULL, NULL, NULL,
-            NULL, NULL, NULL, NULL,
+            "vmx-ept-uc", NULL, NULL, NULL,
+            NULL, NULL, "vmx-ept-wb", NULL,
             "vmx-ept-2mb", "vmx-ept-1gb", NULL, NULL,
             "vmx-invept", "vmx-eptad", "vmx-ept-advanced-exitinfo", NULL,
             NULL, "vmx-invept-single-context", "vmx-invept-all-context", NULL,
Signature · 1 line
2.39.2
#2 lore raw

PATCH 2/3 target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS

In reply to Tim Wiederhake

Fix a copy-paste-mistake in the FEAT_VMX_EPT_VIPD_CAPS cpuid leaf. The mistake became apparent as there were two features with the same name in this cpuid leaf. The names are now in line with SDM volume 3, appendix A, section 10.

Fixes 20a78b02d3 ("target/i386: add VMX features")
---
 target/i386/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/i386/cpu.c +2 -2
index e6b8c62b92..0b74d80371 100644
@@ -1322,8 +1322,8 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
             NULL, NULL, NULL, NULL,
             "vmx-invvpid", NULL, NULL, NULL,
             NULL, NULL, NULL, NULL,
-            "vmx-invvpid-single-addr", "vmx-invept-single-context",
-                "vmx-invvpid-all-context", "vmx-invept-single-context-noglobals",
+            "vmx-invvpid-single-addr", "vmx-invvpid-single-context",
+                "vmx-invvpid-all-context", "vmx-invvpid-single-context-noglobals",
             NULL, NULL, NULL, NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, NULL, NULL,
Signature · 1 line
2.39.2
#3 lore raw

PATCH 3/3 target/i386: Fix duplicated feature name in FEAT_KVM

In reply to Tim Wiederhake

The mistake became apparent as there were two features with the same name in this cpuid leaf. The names are now in line with the documentation from
https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html

---
 target/i386/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/cpu.c +1 -1
index 0b74d80371..ceb291f8a8 100644
@@ -852,7 +852,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
     [FEAT_KVM] = {
         .type = CPUID_FEATURE_WORD,
         .feat_names = {
-            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock",
+            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock2",
             "kvm-asyncpf", "kvm-steal-time", "kvm-pv-eoi", "kvm-pv-unhalt",
             NULL, "kvm-pv-tlb-flush", NULL, "kvm-pv-ipi",
             "kvm-poll-control", "kvm-pv-sched-yield", "kvm-asyncpf-int", "kvm-msi-ext-dest-id",
Signature · 1 line
2.39.2
#4 lore raw

Re: [PATCH 3/3] target/i386: Fix duplicated feature name in FEAT_KVM

Quoted 4 lines · Tim Wiederhake

The mistake became apparent as there were two features with the same name in this cpuid leaf. The names are now in line with the documentation from
https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html

Fixes 642258c6c7 ("kvm: add kvmclock to its second bit")

?

Quoted 18 lines
---
  target/i386/cpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/cpu.c +1 -1
index 0b74d80371..ceb291f8a8 100644
@@ -852,7 +852,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
      [FEAT_KVM] = {
          .type = CPUID_FEATURE_WORD,
          .feat_names = {
-            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock",
+            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock2",
              "kvm-asyncpf", "kvm-steal-time", "kvm-pv-eoi", "kvm-pv-unhalt",
              NULL, "kvm-pv-tlb-flush", NULL, "kvm-pv-ipi",
              "kvm-poll-control", "kvm-pv-sched-yield", "kvm-asyncpf-int", "kvm-msi-ext-dest-id",
#5 lore raw

Re: [PATCH 3/3] target/i386: Fix duplicated feature name in FEAT_KVM

Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 6 lines · Tim Wiederhake

The mistake became apparent as there were two features with the same name
in this cpuid leaf. The names are now in line with the documentation from
https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html

Fixes 642258c6c7 ("kvm: add kvmclock to its second bit")

?

Right, added that locally. Thanks!

Quoted 22 lines
Quoted 21 lines

---
  target/i386/cpu.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/cpu.c +1 -1
index 0b74d80371..ceb291f8a8 100644
@@ -852,7 +852,7 @@ FeatureWordInfo
 feature_word_info[FEATURE_WORDS] = {
       [FEAT_KVM] = {
           .type = CPUID_FEATURE_WORD,
           .feat_names = {
-            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock",
+            "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock2",

              "kvm-asyncpf", "kvm-steal-time", "kvm-pv-eoi", "kvm- pv-unhalt",
              NULL, "kvm-pv-tlb-flush", NULL, "kvm-pv-ipi", "kvm-poll-control", "kvm-pv-sched-yield", "kvm- asyncpf-int", "kvm-msi-ext-dest-id",