* [PATCH v2] x86/cpufeatures: Add macros for Intel's new fast rep string features
@ 2022-08-31 21:18 Jim Mattson
2022-09-01 16:35 ` Sean Christopherson
0 siblings, 1 reply; 3+ messages in thread
From: Jim Mattson @ 2022-08-31 21:18 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin
Cc: kvm, Jim Mattson, linux-kernel
KVM_GET_SUPPORTED_CPUID should reflect these host CPUID bits. The bits
are already cached in word 12. Give the bits X86_FEATURE names, so
that they can be easily referenced. Hide these bits from
/proc/cpuinfo, since the host kernel makes no use of them at present.
Signed-off-by: Jim Mattson <jmattson@google.com>
---
v1 -> v2: Hide from /proc/cpuinfo [Dave Hansen]
arch/x86/include/asm/cpufeatures.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index ef4775c6db01..454f0faa8e90 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -308,6 +308,9 @@
/* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
#define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */
#define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */
+#define X86_FEATURE_FZRM (12*32+10) /* "" Fast zero-length REP MOVSB */
+#define X86_FEATURE_FSRS (12*32+11) /* "" Fast short REP STOSB */
+#define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */
/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */
--
2.37.2.672.g94769d06f0-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] x86/cpufeatures: Add macros for Intel's new fast rep string features
2022-08-31 21:18 [PATCH v2] x86/cpufeatures: Add macros for Intel's new fast rep string features Jim Mattson
@ 2022-09-01 16:35 ` Sean Christopherson
2022-09-01 21:13 ` Jim Mattson
0 siblings, 1 reply; 3+ messages in thread
From: Sean Christopherson @ 2022-09-01 16:35 UTC (permalink / raw)
To: Jim Mattson
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, kvm, linux-kernel
On Wed, Aug 31, 2022, Jim Mattson wrote:
> KVM_GET_SUPPORTED_CPUID should reflect these host CPUID bits. The bits
Why not provide the KVM support in the same patch/series?
> are already cached in word 12. Give the bits X86_FEATURE names, so
> that they can be easily referenced. Hide these bits from
> /proc/cpuinfo, since the host kernel makes no use of them at present.
>
> Signed-off-by: Jim Mattson <jmattson@google.com>
> ---
> v1 -> v2: Hide from /proc/cpuinfo [Dave Hansen]
>
> arch/x86/include/asm/cpufeatures.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
> index ef4775c6db01..454f0faa8e90 100644
> --- a/arch/x86/include/asm/cpufeatures.h
> +++ b/arch/x86/include/asm/cpufeatures.h
> @@ -308,6 +308,9 @@
> /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
> #define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */
> #define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */
> +#define X86_FEATURE_FZRM (12*32+10) /* "" Fast zero-length REP MOVSB */
> +#define X86_FEATURE_FSRS (12*32+11) /* "" Fast short REP STOSB */
> +#define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */
>
> /* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
> #define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */
> --
> 2.37.2.672.g94769d06f0-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] x86/cpufeatures: Add macros for Intel's new fast rep string features
2022-09-01 16:35 ` Sean Christopherson
@ 2022-09-01 21:13 ` Jim Mattson
0 siblings, 0 replies; 3+ messages in thread
From: Jim Mattson @ 2022-09-01 21:13 UTC (permalink / raw)
To: Sean Christopherson
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, kvm, linux-kernel
On Thu, Sep 1, 2022 at 9:36 AM Sean Christopherson <seanjc@google.com> wrote:
>
> On Wed, Aug 31, 2022, Jim Mattson wrote:
> > KVM_GET_SUPPORTED_CPUID should reflect these host CPUID bits. The bits
>
> Why not provide the KVM support in the same patch/series?
>
Coming up.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-01 21:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 21:18 [PATCH v2] x86/cpufeatures: Add macros for Intel's new fast rep string features Jim Mattson
2022-09-01 16:35 ` Sean Christopherson
2022-09-01 21:13 ` Jim Mattson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox