diff mbox series

[4/5] <sys/platform/x86.h>: Add Intel HRESET support

Message ID 20201008161232.135513-5-hjl.tools@gmail.com
State New
Headers show
Series Update <sys/platform/x86.h> for ISE revision 041 | expand

Commit Message

H.J. Lu Oct. 8, 2020, 4:12 p.m. UTC
Add Intel HRESET support to <sys/platform/x86.h>.
---
 manual/platform.texi               | 3 +++
 sysdeps/x86/sys/platform/x86.h     | 3 +++
 sysdeps/x86/tst-get-cpu-features.c | 1 +
 3 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/manual/platform.texi b/manual/platform.texi
index 283f255679..1e44525552 100644
--- a/manual/platform.texi
+++ b/manual/platform.texi
@@ -346,6 +346,9 @@  extensions.
 @item
 @code{HTT} -- Max APIC IDs reserved field is Valid.
 
+@item
+@code{HRESET} -- History reset.
+
 @item
 @code{HYBRID} -- Hybrid processor.
 
diff --git a/sysdeps/x86/sys/platform/x86.h b/sysdeps/x86/sys/platform/x86.h
index 276de1eb6b..394f1c41a6 100644
--- a/sysdeps/x86/sys/platform/x86.h
+++ b/sysdeps/x86/sys/platform/x86.h
@@ -313,6 +313,7 @@  extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
 /* EAX.  */
 #define bit_cpu_AVX_VNNI	(1u << 4)
 #define bit_cpu_AVX512_BF16	(1u << 5)
+#define bit_cpu_HRESET		(1u << 22)
 
 /* COMMON_CPUID_INDEX_19.  */
 
@@ -533,6 +534,7 @@  extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
 /* EAX.  */
 #define index_cpu_AVX_VNNI	COMMON_CPUID_INDEX_7_ECX_1
 #define index_cpu_AVX512_BF16	COMMON_CPUID_INDEX_7_ECX_1
+#define index_cpu_HRESET	COMMON_CPUID_INDEX_7_ECX_1
 
 /* COMMON_CPUID_INDEX_19.  */
 
@@ -753,6 +755,7 @@  extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
 /* EAX.  */
 #define reg_AVX_VNNI		eax
 #define reg_AVX512_BF16		eax
+#define reg_HRESET		eax
 
 /* COMMON_CPUID_INDEX_19.  */
 
diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c
index e87158d45b..aacaa49045 100644
--- a/sysdeps/x86/tst-get-cpu-features.c
+++ b/sysdeps/x86/tst-get-cpu-features.c
@@ -223,6 +223,7 @@  do_test (void)
   CHECK_CPU_FEATURE (WBNOINVD);
   CHECK_CPU_FEATURE (AVX_VNNI);
   CHECK_CPU_FEATURE (AVX512_BF16);
+  CHECK_CPU_FEATURE (HRESET);
   CHECK_CPU_FEATURE (AESKLE);
   CHECK_CPU_FEATURE (WIDE_KL);