qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/2] target/i386: drop the duplicated definition of cpuid


From: Tao Xu
Subject: Re: [PATCH v3 2/2] target/i386: drop the duplicated definition of cpuid AVX512_VBMI marco
Date: Mon, 23 Sep 2019 16:35:22 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 9/23/2019 4:08 PM, Stefano Garzarella wrote:
On Mon, Sep 23, 2019 at 02:30:41PM +0800, Tao Xu wrote:
Drop the duplicated definition of cpuid AVX512_VBMI marco and rename it
as CPUID_7_0_ECX_AVX512_VBMI.

Signed-off-by: Tao Xu <address@hidden>
---
  target/i386/cpu.c           | 4 ++--
  target/i386/cpu.h           | 3 +--
  target/i386/hvf/x86_cpuid.c | 2 +-
  3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 9e0bac31e8..f87fe88259 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -2412,7 +2412,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
              CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
              CPUID_7_0_EBX_SMAP,
          .features[FEAT_7_0_ECX] =
-            CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
+            CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU 
|
              CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
              CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
              CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
@@ -2470,7 +2470,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
              CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
              CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
          .features[FEAT_7_0_ECX] =
-            CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
+            CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU 
|
              CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
              CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
              CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index fa4c4cad79..61f6287294 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -695,8 +695,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
  #define CPUID_7_0_EBX_AVX512VL          (1U << 31)
/* AVX-512 Vector Byte Manipulation Instruction */
-#define CPUID_7_0_ECX_AVX512BMI         (1U << 1)
-#define CPUID_7_0_ECX_VBMI              (1U << 1)
+#define CPUID_7_0_ECX_AVX512_VBMI       (1U << 1)

Since we're here, should we also update CPUID_7_0_ECX_VBMI2?

Thanks,
Stefano

Thank you for reminding me. I check the vmbi2's flag is 'avx512_vbmi2'. And linux kernel source and SDM also use AVX512_VBMI2. I will update this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]