Page MenuHomeFreeBSD

x86: Add definitions for Intel PT XSAVE state
Needs ReviewPublic

Authored by bnovkov on Oct 7 2024, 4:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 1, 11:10 PM
Unknown Object (File)
Wed, Nov 20, 9:02 AM
Unknown Object (File)
Wed, Nov 6, 9:21 AM
Unknown Object (File)
Wed, Nov 6, 5:41 AM
Unknown Object (File)
Oct 31 2024, 10:38 AM
Unknown Object (File)
Oct 13 2024, 6:38 AM
Unknown Object (File)
Oct 11 2024, 5:54 AM
Unknown Object (File)
Oct 8 2024, 5:50 PM
Subscribers

Details

Reviewers
br
kib
Summary

This change adds definitions for the Intel Processor Trace XSAVE state, according to the specification in the Intel SDM, Vol. 1 13-13.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Since XSAVES always use the compact format, and since we already handle the save area format differently for XSAVE. I suggest to not add the pt_save_area structure definition as is. If we ever want to add yet another system feature from XSAVES, using such structures cause exponential explosion of the needed definitions. It is better to define the pt_ext_area, and then calculate the position of it in the save area based on the feature bitmap.

sys/x86/include/fpu.h
199

This probably should be struct fpusave, but see below.

In D46985#1071417, @kib wrote:

Since XSAVES always use the compact format, and since we already handle the save area format differently for XSAVE. I suggest to not add the pt_save_area structure definition as is. If we ever want to add yet another system feature from XSAVES, using such structures cause exponential explosion of the needed definitions. It is better to define the pt_ext_area, and then calculate the position of it in the save area based on the feature bitmap.

Right, I agree, I'll rework this and the xrstors/xsaves patch to follow Intel's compacted format byte offset algorithm.