[PATCH v1 1/6] x86/fpu: Introduce new fpu state for Intel processor trace

Luwei Kang
2019-05-16T08:26:45Z

Introduce new fpu state structure pt_state to save Intel
processor trace configuration. The upcoming using
XSAVES/XRSTORS to switch the Intel PT configuration
on VM-Entry/Exit will use this structure.

Signed-off-by: Luwei Kang <luwei.kang@intel.com>
---
arch/x86/include/asm/fpu/types.h | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h
index 2e32e17..8cbb42e 100644
--- a/arch/x86/include/asm/fpu/types.h
+++ b/arch/x86/include/asm/fpu/types.h
@@ -221,6 +221,19 @@ struct avx_512_hi16_state {
} __packed;

/*
+ * State component 8 is used for some 64-bit registers
+ * of Intel processor trace.
+ */
+struct pt_state {
+ u64 rtit_ctl;
+ u64 rtit_output_base;
+ u64 rtit_output_mask;
+ u64 rtit_status;
+ u64 rtit_cr3_match;
+ u64 rtit_addrx_ab[0];
+} __packed;
+
+/*
* State component 9: 32-bit PKRU register. The state is
* 8 bytes long but only 4 bytes is used currently.
*/
--
1.8.3.1