Skip to contentSkip to conversation

kvm: x86: Add "significant index" flag to a few CPUID leaves

PATCH Applied Jim Mattson 3 participants 5 messages Sep 12, 2019 – Sep 24, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: x86: Add "significant index" flag to a few CPUID leaves

According to the Intel SDM, volume 2, "CPUID," the index is significant (or partially significant) for CPUID leaves 0FH, 10H, 12H, 17H, 18H, and 1FH.

Add the corresponding flag to these CPUID leaves in do_host_cpuid().

Fixes a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
---
 arch/x86/kvm/cpuid.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/x86/kvm/cpuid.c +6 -0
index 22c2720cd948e..e7d25f4364664 100644
@@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
 	case 7:
 	case 0xb:
 	case 0xd:
+	case 0xf:
+	case 0x10:
+	case 0x12:
 	case 0x14:
+	case 0x17:
+	case 0x18:
+	case 0x1f:
 	case 0x8000001d:
 		entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
 		break;
Signature · 1 line
2.23.0.237.gc6a4ce50a0-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Jim Mattson

According to the Intel SDM, volume 2, "CPUID," the index is significant (or partially significant) for CPUID leaves 0FH, 10H, 12H, 17H, 18H, and 1FH.

Add the corresponding flag to these CPUID leaves in do_host_cpuid().

Fixes a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
---
  arch/x86/kvm/cpuid.c | 6 ++++++
  1 file changed, 6 insertions(+)
arch/x86/kvm/cpuid.c +0 -0
index 22c2720cd948e..e7d25f4364664 100644
@@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
  	case 7:
  	case 0xb:
  	case 0xd:

arch/x86/kvm/cpuid.c static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function, · line 316

Quoted 10 lines
arch/x86/kvm/cpuid.c +6 -0
+	case 0xf:
+	case 0x10:
+	case 0x12:
  	case 0x14:
+	case 0x17:
+	case 0x18:
+	case 0x1f:
  	case 0x8000001d:
  		entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
  		break;
#2 lore raw
Quoted 30 lines · Krish Sadhukhan
Quoted 27 lines · Jim Mattson

According to the Intel SDM, volume 2, "CPUID," the index is significant (or partially significant) for CPUID leaves 0FH, 10H, 12H, 17H, 18H, and 1FH.

Add the corresponding flag to these CPUID leaves in do_host_cpuid().

Fixes a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
---
  arch/x86/kvm/cpuid.c | 6 ++++++
  1 file changed, 6 insertions(+)
arch/x86/kvm/cpuid.c +4 -0
index 22c2720cd948e..e7d25f4364664 100644
@@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
      case 7:
      case 0xb:
      case 0xd:
+     case 0xf:
+     case 0x10:
+     case 0x12:
      case 0x14:
+     case 0x17:
Quoted 8 lines

arch/x86/kvm/cpuid.c static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function, · line 316

Quoted 5 lines
arch/x86/kvm/cpuid.c +2 -0
+     case 0x18:
+     case 0x1f:
      case 0x8000001d:
              entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
              break;

Ping.

maintainer Applied
#3 lore raw
Quoted 42 lines · Jim Mattson
Quoted 30 lines · Krish Sadhukhan
Quoted 27 lines · Jim Mattson

According to the Intel SDM, volume 2, "CPUID," the index is significant (or partially significant) for CPUID leaves 0FH, 10H, 12H, 17H, 18H, and 1FH.

Add the corresponding flag to these CPUID leaves in do_host_cpuid().

Fixes a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
---
  arch/x86/kvm/cpuid.c | 6 ++++++
  1 file changed, 6 insertions(+)
arch/x86/kvm/cpuid.c +4 -0
index 22c2720cd948e..e7d25f4364664 100644
@@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
      case 7:
      case 0xb:
      case 0xd:
+     case 0xf:
+     case 0x10:
+     case 0x12:
      case 0x14:
+     case 0x17:
Quoted 8 lines

arch/x86/kvm/cpuid.c static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function, · line 316

Quoted 5 lines
arch/x86/kvm/cpuid.c +2 -0
+     case 0x18:
+     case 0x1f:
      case 0x8000001d:
              entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
              break;
Quoted 2 lines

Ping.

Queued, thanks.

Paolo

maintainer Applied
#4 lore raw
In reply to Jim Mattson
Quoted 23 lines · Jim Mattson

According to the Intel SDM, volume 2, "CPUID," the index is significant (or partially significant) for CPUID leaves 0FH, 10H, 12H, 17H, 18H, and 1FH.

Add the corresponding flag to these CPUID leaves in do_host_cpuid().

Fixes a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
---
 arch/x86/kvm/cpuid.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/x86/kvm/cpuid.c +0 -0
index 22c2720cd948e..e7d25f4364664 100644
@@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
 	case 7:
 	case 0xb:
 	case 0xd:

arch/x86/kvm/cpuid.c static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function, · line 316

Quoted 10 lines
arch/x86/kvm/cpuid.c +6 -0
+	case 0xf:
+	case 0x10:
+	case 0x12:
 	case 0x14:
+	case 0x17:
+	case 0x18:
+	case 0x1f:
 	case 0x8000001d:
 		entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
 		break;

Queued, thanks.

Paolo