* [Qemu-devel] [PATCH] x86: add AVX512_VPOPCNTDQ features
@ 2017-01-10 7:07 He Chen
2017-01-12 17:10 ` Eduardo Habkost
0 siblings, 1 reply; 4+ messages in thread
From: He Chen @ 2017-01-10 7:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Richard Henderson, Eduardo Habkost, He Chen
AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords.
variable precision.
Signed-off-by: He Chen <he.chen@linux.intel.com>
---
target/i386/cpu.c | 2 +-
target/i386/cpu.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index b0640f1..ae900b5 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -435,7 +435,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
NULL, "avx512vbmi", "umip", "pku",
"ospke", NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
+ NULL, NULL, "vpopcntdq", NULL,
"la57", NULL, NULL, NULL,
NULL, NULL, "rdpid", NULL,
NULL, NULL, NULL, NULL,
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index a7f2f60..73edc60 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -630,6 +630,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
#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_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
#define CPUID_7_0_ECX_LA57 (1U << 16)
#define CPUID_7_0_ECX_RDPID (1U << 22)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] x86: add AVX512_VPOPCNTDQ features
2017-01-10 7:07 [Qemu-devel] [PATCH] x86: add AVX512_VPOPCNTDQ features He Chen
@ 2017-01-12 17:10 ` Eduardo Habkost
2017-01-12 18:18 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Habkost @ 2017-01-12 17:10 UTC (permalink / raw)
To: He Chen; +Cc: qemu-devel, Paolo Bonzini, He Chen, Richard Henderson
On Tue, Jan 10, 2017 at 03:07:31PM +0800, He Chen wrote:
> AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords.
> variable precision.
>
> Signed-off-by: He Chen <he.chen@linux.intel.com>
> ---
> target/i386/cpu.c | 2 +-
> target/i386/cpu.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index b0640f1..ae900b5 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -435,7 +435,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
> NULL, "avx512vbmi", "umip", "pku",
> "ospke", NULL, NULL, NULL,
> NULL, NULL, NULL, NULL,
> - NULL, NULL, NULL, NULL,
> + NULL, NULL, "vpopcntdq", NULL,
The patches I see on linux-kernel use the "avx512_vpopcntdq"
name. Why not use "avx512-vpopcntdq" in QEMU to avoid confusion?
> "la57", NULL, NULL, NULL,
> NULL, NULL, "rdpid", NULL,
> NULL, NULL, NULL, NULL,
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index a7f2f60..73edc60 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -630,6 +630,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
> #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_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
> #define CPUID_7_0_ECX_LA57 (1U << 16)
> #define CPUID_7_0_ECX_RDPID (1U << 22)
>
> --
> 2.7.4
>
>
--
Eduardo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] x86: add AVX512_VPOPCNTDQ features
2017-01-12 17:10 ` Eduardo Habkost
@ 2017-01-12 18:18 ` Paolo Bonzini
2017-01-12 18:35 ` Eduardo Habkost
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2017-01-12 18:18 UTC (permalink / raw)
To: Eduardo Habkost, He Chen; +Cc: qemu-devel, He Chen, Richard Henderson
On 12/01/2017 18:10, Eduardo Habkost wrote:
> On Tue, Jan 10, 2017 at 03:07:31PM +0800, He Chen wrote:
>> AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords.
>> variable precision.
>>
>> Signed-off-by: He Chen <he.chen@linux.intel.com>
>> ---
>> target/i386/cpu.c | 2 +-
>> target/i386/cpu.h | 1 +
>> 2 files changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
>> index b0640f1..ae900b5 100644
>> --- a/target/i386/cpu.c
>> +++ b/target/i386/cpu.c
>> @@ -435,7 +435,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
>> NULL, "avx512vbmi", "umip", "pku",
>> "ospke", NULL, NULL, NULL,
>> NULL, NULL, NULL, NULL,
>> - NULL, NULL, NULL, NULL,
>> + NULL, NULL, "vpopcntdq", NULL,
>
> The patches I see on linux-kernel use the "avx512_vpopcntdq"
> name. Why not use "avx512-vpopcntdq" in QEMU to avoid confusion?
Or without the dash too, for consistency with avx512vbmi.
Paolo
>
>> "la57", NULL, NULL, NULL,
>> NULL, NULL, "rdpid", NULL,
>> NULL, NULL, NULL, NULL,
>> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
>> index a7f2f60..73edc60 100644
>> --- a/target/i386/cpu.h
>> +++ b/target/i386/cpu.h
>> @@ -630,6 +630,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
>> #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_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
>> #define CPUID_7_0_ECX_LA57 (1U << 16)
>> #define CPUID_7_0_ECX_RDPID (1U << 22)
>>
>> --
>> 2.7.4
>>
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] x86: add AVX512_VPOPCNTDQ features
2017-01-12 18:18 ` Paolo Bonzini
@ 2017-01-12 18:35 ` Eduardo Habkost
0 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2017-01-12 18:35 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: He Chen, qemu-devel, He Chen, Richard Henderson
On Thu, Jan 12, 2017 at 07:18:20PM +0100, Paolo Bonzini wrote:
> On 12/01/2017 18:10, Eduardo Habkost wrote:
> > On Tue, Jan 10, 2017 at 03:07:31PM +0800, He Chen wrote:
> >> AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords.
> >> variable precision.
> >>
> >> Signed-off-by: He Chen <he.chen@linux.intel.com>
> >> ---
> >> target/i386/cpu.c | 2 +-
> >> target/i386/cpu.h | 1 +
> >> 2 files changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> >> index b0640f1..ae900b5 100644
> >> --- a/target/i386/cpu.c
> >> +++ b/target/i386/cpu.c
> >> @@ -435,7 +435,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
> >> NULL, "avx512vbmi", "umip", "pku",
> >> "ospke", NULL, NULL, NULL,
> >> NULL, NULL, NULL, NULL,
> >> - NULL, NULL, NULL, NULL,
> >> + NULL, NULL, "vpopcntdq", NULL,
> >
> > The patches I see on linux-kernel use the "avx512_vpopcntdq"
> > name. Why not use "avx512-vpopcntdq" in QEMU to avoid confusion?
>
> Or without the dash too, for consistency with avx512vbmi.
I would agree if Linux was consistent and used "avx512vpopcntdq"
instead of "avx512_vpopcntdq". But if Linux choose to use
"avx512_vpopcntdq", I would like to use a compatible name in
QEMU.
Other software components are likely to use the same flag names
as Linux. If we use a different name, they will need to manually
translate the Linux names to QEMU names.
--
Eduardo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-12 18:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-10 7:07 [Qemu-devel] [PATCH] x86: add AVX512_VPOPCNTDQ features He Chen
2017-01-12 17:10 ` Eduardo Habkost
2017-01-12 18:18 ` Paolo Bonzini
2017-01-12 18:35 ` Eduardo Habkost
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.