[v2,1/2] kvm: x86: Clear {ebx,ecx,edx} from CPUID leaf 0x8000001a
diff mbox series

Message ID 20190208214557.5735-1-jmattson@google.com
State New
Headers show
Series
  • [v2,1/2] kvm: x86: Clear {ebx,ecx,edx} from CPUID leaf 0x8000001a
Related show

Commit Message

Jim Mattson Feb. 8, 2019, 9:45 p.m. UTC
According to volume 3 of the APM, appendix E, CPUID
Fn8000_001A_E[D,C,B]X are reserved. Since we have no way of knowing
what these fields will be used for, they should not be whitelisted.

Fixes: 24c82e576b78 ("KVM: Sanitize cpuid")
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kvm/cpuid.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index bbffa6c54697..183f40cd3362 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -696,6 +696,7 @@  static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 		entry->ecx = entry->edx = 0;
 		break;
 	case 0x8000001a:
+		entry->ebx = entry->ecx = entry->edx = 0;
 		break;
 	case 0x8000001d:
 		break;