]> Git Repo - qemu.git/commitdiff
target-i386: Add support for UMIP and RDPID CPUID bits
authorPaolo Bonzini <[email protected]>
Tue, 12 Jul 2016 09:15:44 +0000 (11:15 +0200)
committerEduardo Habkost <[email protected]>
Wed, 20 Jul 2016 15:02:18 +0000 (12:02 -0300)
These are both stored in CPUID[EAX=7,EBX=0].ECX.  KVM is going to
be able to emulate both (albeit with a performance loss in the case
of RDPID, which therefore will be in KVM_GET_EMULATED_CPUID rather
than KVM_GET_SUPPORTED_CPUID).

It's also possible to implement both in TCG, but this is for 2.8.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
target-i386/cpu.c
target-i386/cpu.h

index de0295a51f12d811f6244029ff31d8e3b69b2ec3..c36441d30c86aa47a3667746fc37c554a54a8757 100644 (file)
@@ -305,12 +305,12 @@ static const char *cpuid_7_0_ebx_feature_name[] = {
 };
 
 static const char *cpuid_7_0_ecx_feature_name[] = {
-    NULL, NULL, NULL, "pku",
+    NULL, NULL, "umip", "pku",
     "ospke", NULL, NULL, NULL,
     NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL,
+    NULL, NULL, "rdpid", NULL,
     NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL,
 };
index c883cd563190c467916acbc160e11ea4321c7553..65615c0f3bff6e64c55b165846ff23a370d391f2 100644 (file)
@@ -616,8 +616,10 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
 #define CPUID_7_0_EBX_AVX512ER (1U << 27) /* AVX-512 Exponential and Reciprocal */
 #define CPUID_7_0_EBX_AVX512CD (1U << 28) /* AVX-512 Conflict Detection */
 
+#define CPUID_7_0_ECX_UMIP     (1U << 2)
 #define CPUID_7_0_ECX_PKU      (1U << 3)
 #define CPUID_7_0_ECX_OSPKE    (1U << 4)
+#define CPUID_7_0_ECX_RDPID    (1U << 22)
 
 #define CPUID_XSAVE_XSAVEOPT   (1U << 0)
 #define CPUID_XSAVE_XSAVEC     (1U << 1)
This page took 0.0341 seconds and 4 git commands to generate.