]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
i386: Add CPUID bit for CLZERO and XSAVEERPTR
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 25 Sep 2019 21:49:48 +0000 (23:49 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 4 Oct 2019 16:49:17 +0000 (18:49 +0200)
The CPUID bits CLZERO and XSAVEERPTR are availble on AMD's ZEN platform
and could be passed to the guest.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c
target/i386/cpu.h

index 9e0bac31e8b537559075cb7b1968c7b574185e16..2b7225f875d6f41924b3f443330ab02844a523f2 100644 (file)
@@ -1134,7 +1134,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
     [FEAT_8000_0008_EBX] = {
         .type = CPUID_FEATURE_WORD,
         .feat_names = {
-            NULL, NULL, NULL, NULL,
+            "clzero", NULL, "xsaveerptr", NULL,
             NULL, NULL, NULL, NULL,
             NULL, "wbnoinvd", NULL, NULL,
             "ibpb", NULL, NULL, NULL,
index 5f6e3a029a8b0d1a024c8585662da1c606fa72ec..87f4afbfd6fb3e328f6fd25fb59c0acbc6891f09 100644 (file)
@@ -695,6 +695,8 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
 
 #define CPUID_7_1_EAX_AVX512_BF16 (1U << 5) /* AVX512 BFloat16 Instruction */
 
+#define CPUID_8000_0008_EBX_CLZERO             (1U << 0) /* CLZERO instruction */
+#define CPUID_8000_0008_EBX_XSAVEERPTR (1U << 2) /* Always save/restore FP error pointers */
 #define CPUID_8000_0008_EBX_WBNOINVD  (1U << 9)  /* Write back and
                                                                              do not invalidate cache */
 #define CPUID_8000_0008_EBX_IBPB    (1U << 12) /* Indirect Branch Prediction Barrier */