* x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
@ 2023-03-10 3:43 DJ Delorie
2023-03-10 5:01 ` Noah Goldstein
2023-03-10 7:04 ` Noah Goldstein
0 siblings, 2 replies; 8+ messages in thread
From: DJ Delorie @ 2023-03-10 3:43 UTC (permalink / raw)
To: libc-alpha; +Cc: hjl.tools
As not noted in the kernel sources:
> /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
> #define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
> #define X86_FEATURE_UMIP (16*32+ 2) /* User Mode Instruction Protection */
vs glibc:
> /* ECX. */
> #define bit_cpu_PREFETCHWT1 (1u << 0)
> #define bit_cpu_AVX512_VBMI (1u << 1)
> #define bit_cpu_UMIP (1u << 2)
Tested on the one machine I could find in our inventory that set that flag:
- FAIL: elf/tst-cpu-features-cpuinfo
- FAIL: elf/tst-cpu-features-cpuinfo-static
- 27 FAIL
+ 23 FAIL
(there were two unrelated timeouts in the "before" results)
From c4a62abbeac4ced531ced3999a2cd2d4fab6bdc6 Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@redhat.com>
Date: Thu, 9 Mar 2023 22:32:54 -0500
Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
Don't check PREFETCHWT1 against /proc/cpuinfo since kernel doesn't report
PREFETCHWT1 in /proc/cpuinfo.
diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
index c25240774e..e963592c4b 100644
--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
+++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
@@ -217,7 +217,10 @@ do_test (int argc, char **argv)
fails += CHECK_PROC (pku, PKU);
fails += CHECK_PROC (popcnt, POPCNT);
fails += CHECK_PROC (3dnowprefetch, PREFETCHW);
+#if 0
+ /* NB: /proc/cpuinfo doesn't report this feature. */
fails += CHECK_PROC (prefetchwt1, PREFETCHWT1);
+#endif
#if 0
/* NB: /proc/cpuinfo doesn't report this feature. */
fails += CHECK_PROC (ptwrite, PTWRITE);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
2023-03-10 3:43 x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c DJ Delorie
@ 2023-03-10 5:01 ` Noah Goldstein
2023-03-10 5:10 ` DJ Delorie
2023-03-10 7:04 ` Noah Goldstein
1 sibling, 1 reply; 8+ messages in thread
From: Noah Goldstein @ 2023-03-10 5:01 UTC (permalink / raw)
To: DJ Delorie; +Cc: libc-alpha, hjl.tools
On Thu, Mar 9, 2023 at 9:43 PM DJ Delorie via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
>
> As not noted in the kernel sources:
>
> > /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
> > #define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
> > #define X86_FEATURE_UMIP (16*32+ 2) /* User Mode Instruction Protection */
>
> vs glibc:
>
> > /* ECX. */
> > #define bit_cpu_PREFETCHWT1 (1u << 0)
Does platform/x86.h need to be updated as well? Although that might be harder
to change as its user facing.
> > #define bit_cpu_AVX512_VBMI (1u << 1)
> > #define bit_cpu_UMIP (1u << 2)
>
> Tested on the one machine I could find in our inventory that set that flag:
>
> - FAIL: elf/tst-cpu-features-cpuinfo
> - FAIL: elf/tst-cpu-features-cpuinfo-static
> - 27 FAIL
> + 23 FAIL
>
> (there were two unrelated timeouts in the "before" results)
>
> From c4a62abbeac4ced531ced3999a2cd2d4fab6bdc6 Mon Sep 17 00:00:00 2001
> From: DJ Delorie <dj@redhat.com>
> Date: Thu, 9 Mar 2023 22:32:54 -0500
> Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
>
> Don't check PREFETCHWT1 against /proc/cpuinfo since kernel doesn't report
> PREFETCHWT1 in /proc/cpuinfo.
>
> diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
> index c25240774e..e963592c4b 100644
> --- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
> +++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
> @@ -217,7 +217,10 @@ do_test (int argc, char **argv)
> fails += CHECK_PROC (pku, PKU);
> fails += CHECK_PROC (popcnt, POPCNT);
> fails += CHECK_PROC (3dnowprefetch, PREFETCHW);
> +#if 0
> + /* NB: /proc/cpuinfo doesn't report this feature. */
> fails += CHECK_PROC (prefetchwt1, PREFETCHWT1);
> +#endif
> #if 0
> /* NB: /proc/cpuinfo doesn't report this feature. */
> fails += CHECK_PROC (ptwrite, PTWRITE);
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
2023-03-10 5:01 ` Noah Goldstein
@ 2023-03-10 5:10 ` DJ Delorie
2023-03-10 7:04 ` Noah Goldstein
0 siblings, 1 reply; 8+ messages in thread
From: DJ Delorie @ 2023-03-10 5:10 UTC (permalink / raw)
To: Noah Goldstein; +Cc: libc-alpha, hjl.tools
Noah Goldstein <goldstein.w.n@gmail.com> writes:
> Does platform/x86.h need to be updated as well? Although that might be harder
> to change as its user facing.
I'm not taking support for that bit out of glibc, just tweaking the
consistency check to not care that the kernel doesn't report it in
/proc/cpuinfo yet.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
2023-03-10 5:10 ` DJ Delorie
@ 2023-03-10 7:04 ` Noah Goldstein
0 siblings, 0 replies; 8+ messages in thread
From: Noah Goldstein @ 2023-03-10 7:04 UTC (permalink / raw)
To: DJ Delorie; +Cc: libc-alpha, hjl.tools
On Thu, Mar 9, 2023 at 11:10 PM DJ Delorie <dj@redhat.com> wrote:
>
> Noah Goldstein <goldstein.w.n@gmail.com> writes:
> > Does platform/x86.h need to be updated as well? Although that might be harder
> > to change as its user facing.
>
> I'm not taking support for that bit out of glibc, just tweaking the
> consistency check to not care that the kernel doesn't report it in
> /proc/cpuinfo yet.
>
Oh, woops, I misread the patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
2023-03-10 3:43 x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c DJ Delorie
2023-03-10 5:01 ` Noah Goldstein
@ 2023-03-10 7:04 ` Noah Goldstein
2023-03-20 19:01 ` DJ Delorie
2023-03-21 18:01 ` Noah Goldstein
1 sibling, 2 replies; 8+ messages in thread
From: Noah Goldstein @ 2023-03-10 7:04 UTC (permalink / raw)
To: DJ Delorie; +Cc: libc-alpha, hjl.tools
On Thu, Mar 9, 2023 at 9:43 PM DJ Delorie via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
>
> As not noted in the kernel sources:
>
> > /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
> > #define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
> > #define X86_FEATURE_UMIP (16*32+ 2) /* User Mode Instruction Protection */
>
> vs glibc:
>
> > /* ECX. */
> > #define bit_cpu_PREFETCHWT1 (1u << 0)
> > #define bit_cpu_AVX512_VBMI (1u << 1)
> > #define bit_cpu_UMIP (1u << 2)
>
> Tested on the one machine I could find in our inventory that set that flag:
>
> - FAIL: elf/tst-cpu-features-cpuinfo
> - FAIL: elf/tst-cpu-features-cpuinfo-static
> - 27 FAIL
> + 23 FAIL
>
> (there were two unrelated timeouts in the "before" results)
>
> From c4a62abbeac4ced531ced3999a2cd2d4fab6bdc6 Mon Sep 17 00:00:00 2001
> From: DJ Delorie <dj@redhat.com>
> Date: Thu, 9 Mar 2023 22:32:54 -0500
> Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
>
> Don't check PREFETCHWT1 against /proc/cpuinfo since kernel doesn't report
> PREFETCHWT1 in /proc/cpuinfo.
>
> diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
> index c25240774e..e963592c4b 100644
> --- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
> +++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
> @@ -217,7 +217,10 @@ do_test (int argc, char **argv)
> fails += CHECK_PROC (pku, PKU);
> fails += CHECK_PROC (popcnt, POPCNT);
> fails += CHECK_PROC (3dnowprefetch, PREFETCHW);
> +#if 0
> + /* NB: /proc/cpuinfo doesn't report this feature. */
> fails += CHECK_PROC (prefetchwt1, PREFETCHWT1);
> +#endif
> #if 0
> /* NB: /proc/cpuinfo doesn't report this feature. */
> fails += CHECK_PROC (ptwrite, PTWRITE);
>
LGTM.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
2023-03-10 7:04 ` Noah Goldstein
@ 2023-03-20 19:01 ` DJ Delorie
2023-03-21 18:01 ` Noah Goldstein
1 sibling, 0 replies; 8+ messages in thread
From: DJ Delorie @ 2023-03-20 19:01 UTC (permalink / raw)
To: Noah Goldstein; +Cc: libc-alpha, hjl.tools
Could you add a Reviewed-by to your review so I can give credit in the
commit message?
Thanks!
DJ
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
2023-03-10 7:04 ` Noah Goldstein
2023-03-20 19:01 ` DJ Delorie
@ 2023-03-21 18:01 ` Noah Goldstein
2023-03-22 0:08 ` DJ Delorie
1 sibling, 1 reply; 8+ messages in thread
From: Noah Goldstein @ 2023-03-21 18:01 UTC (permalink / raw)
To: DJ Delorie; +Cc: libc-alpha, hjl.tools
On Fri, Mar 10, 2023 at 1:04 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> On Thu, Mar 9, 2023 at 9:43 PM DJ Delorie via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
> >
> >
> > As not noted in the kernel sources:
> >
> > > /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
> > > #define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
> > > #define X86_FEATURE_UMIP (16*32+ 2) /* User Mode Instruction Protection */
> >
> > vs glibc:
> >
> > > /* ECX. */
> > > #define bit_cpu_PREFETCHWT1 (1u << 0)
> > > #define bit_cpu_AVX512_VBMI (1u << 1)
> > > #define bit_cpu_UMIP (1u << 2)
> >
> > Tested on the one machine I could find in our inventory that set that flag:
> >
> > - FAIL: elf/tst-cpu-features-cpuinfo
> > - FAIL: elf/tst-cpu-features-cpuinfo-static
> > - 27 FAIL
> > + 23 FAIL
> >
> > (there were two unrelated timeouts in the "before" results)
> >
> > From c4a62abbeac4ced531ced3999a2cd2d4fab6bdc6 Mon Sep 17 00:00:00 2001
> > From: DJ Delorie <dj@redhat.com>
> > Date: Thu, 9 Mar 2023 22:32:54 -0500
> > Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
> >
> > Don't check PREFETCHWT1 against /proc/cpuinfo since kernel doesn't report
> > PREFETCHWT1 in /proc/cpuinfo.
> >
> > diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
> > index c25240774e..e963592c4b 100644
> > --- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
> > +++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
> > @@ -217,7 +217,10 @@ do_test (int argc, char **argv)
> > fails += CHECK_PROC (pku, PKU);
> > fails += CHECK_PROC (popcnt, POPCNT);
> > fails += CHECK_PROC (3dnowprefetch, PREFETCHW);
> > +#if 0
> > + /* NB: /proc/cpuinfo doesn't report this feature. */
> > fails += CHECK_PROC (prefetchwt1, PREFETCHWT1);
> > +#endif
> > #if 0
> > /* NB: /proc/cpuinfo doesn't report this feature. */
> > fails += CHECK_PROC (ptwrite, PTWRITE);
> >
>
> LGTM.
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
2023-03-21 18:01 ` Noah Goldstein
@ 2023-03-22 0:08 ` DJ Delorie
0 siblings, 0 replies; 8+ messages in thread
From: DJ Delorie @ 2023-03-22 0:08 UTC (permalink / raw)
To: Noah Goldstein; +Cc: libc-alpha, hjl.tools
Noah Goldstein <goldstein.w.n@gmail.com> writes:
> Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Thanks! Pushed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-22 0:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 3:43 x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c DJ Delorie
2023-03-10 5:01 ` Noah Goldstein
2023-03-10 5:10 ` DJ Delorie
2023-03-10 7:04 ` Noah Goldstein
2023-03-10 7:04 ` Noah Goldstein
2023-03-20 19:01 ` DJ Delorie
2023-03-21 18:01 ` Noah Goldstein
2023-03-22 0:08 ` DJ Delorie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).