diff mbox series

x86: Use CHECK_FEATURE_PRESENT on PCONFIG

Message ID 20220126202824.1810825-1-hjl.tools@gmail.com
State Committed
Commit 6229aa74fb47af17744d765cc49dbf94d3cefe12
Headers show
Series x86: Use CHECK_FEATURE_PRESENT on PCONFIG | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

H.J. Lu Jan. 26, 2022, 8:28 p.m. UTC
PCONFIG is a privileged instruction.  Use CHECK_FEATURE_PRESENT, instead
of CHECK_FEATURE_ACTIVE, on PCONFIG in tst-cpu-features-supports.c.
---
 sysdeps/x86/tst-cpu-features-supports.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

H.J. Lu Feb. 12, 2022, 3:51 p.m. UTC | #1
On Wed, Jan 26, 2022 at 12:28 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> PCONFIG is a privileged instruction.  Use CHECK_FEATURE_PRESENT, instead
> of CHECK_FEATURE_ACTIVE, on PCONFIG in tst-cpu-features-supports.c.
> ---
>  sysdeps/x86/tst-cpu-features-supports.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c
> index 46b2c7bf83..997b641449 100644
> --- a/sysdeps/x86/tst-cpu-features-supports.c
> +++ b/sysdeps/x86/tst-cpu-features-supports.c
> @@ -143,7 +143,7 @@ do_test (int argc, char **argv)
>    fails += CHECK_FEATURE_ACTIVE (movdiri, MOVDIRI);
>    fails += CHECK_FEATURE_ACTIVE (movdir64b, MOVDIR64B);
>    fails += CHECK_FEATURE_ACTIVE (osxsave, OSXSAVE);
> -  fails += CHECK_FEATURE_ACTIVE (pconfig, PCONFIG);
> +  fails += CHECK_FEATURE_PRESENT (pconfig, PCONFIG);
>    fails += CHECK_FEATURE_ACTIVE (pku, PKU);
>  #endif
>    fails += CHECK_FEATURE_ACTIVE (popcnt, POPCNT);
> --
> 2.34.1
>

I will check in this next Monday to fix the test on Intel Alder Lake.
diff mbox series

Patch

diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c
index 46b2c7bf83..997b641449 100644
--- a/sysdeps/x86/tst-cpu-features-supports.c
+++ b/sysdeps/x86/tst-cpu-features-supports.c
@@ -143,7 +143,7 @@  do_test (int argc, char **argv)
   fails += CHECK_FEATURE_ACTIVE (movdiri, MOVDIRI);
   fails += CHECK_FEATURE_ACTIVE (movdir64b, MOVDIR64B);
   fails += CHECK_FEATURE_ACTIVE (osxsave, OSXSAVE);
-  fails += CHECK_FEATURE_ACTIVE (pconfig, PCONFIG);
+  fails += CHECK_FEATURE_PRESENT (pconfig, PCONFIG);
   fails += CHECK_FEATURE_ACTIVE (pku, PKU);
 #endif
   fails += CHECK_FEATURE_ACTIVE (popcnt, POPCNT);