Page MenuHomeFreeBSD

x86: Add definitions for Intel PT XSAVE state
AbandonedPublic

Authored by bnovkov on Oct 7 2024, 4:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 30, 10:56 PM
Unknown Object (File)
Sat, Dec 14, 4:45 PM
Unknown Object (File)
Dec 5 2024, 2:49 AM
Unknown Object (File)
Dec 5 2024, 1:57 AM
Unknown Object (File)
Dec 1 2024, 11:10 PM
Unknown Object (File)
Nov 20 2024, 9:02 AM
Unknown Object (File)
Nov 6 2024, 9:21 AM
Unknown Object (File)
Nov 6 2024, 5:41 AM
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.

Dropping this revision since it was made obsolete by D47394.