Page MenuHomeFreeBSD

x86: Add definitions for Intel PT XSAVE state
Needs ReviewPublic

Authored by bnovkov on Mon, Oct 7, 4:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 10:38 AM
Unknown Object (File)
Sun, Oct 13, 6:38 AM
Unknown Object (File)
Fri, Oct 11, 5:54 AM
Unknown Object (File)
Tue, Oct 8, 5:50 PM
Unknown Object (File)
Tue, Oct 8, 7:47 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.