Expand description
The probe’s measured windows, written in assembly (https://github.com/rrnewton/hermit/issues/4243).
Each arm runs from “every register of every enabled component holds a known
value” through “the case’s initializing step” to “XSAVE of every enabled
component” inside one assembly function. No compiler-generated code runs in
that window, so nothing Rust emits (a memcpy using SSE, say) can change the
state being measured. The Rust driver prepares the buffers before a call and
reads the certificates (interrupt counter, getrusage, schedstat) outside it.
Structs§
- ArmCtx
- The state of one arm call, shared with the assembly. Field offsets are fixed
by the assembly below; the test
arm_ctx_layout_matches_the_assemblychecks them. - PeerCtx
- The peer thread’s state, shared with the assembly; offsets as noted.
Enums§
- ArmStatus
- How an arm call ended. Anything but
Okvoids the trial. - Kind
- The initializing step of a probe case. The numbering is shared with the assembly dispatch below.
- Mode
- What an arm does after its initializing step and before its XSAVE.
- Peer
State - The state the peer leaves on the shared CPU before it replies.
Constants§
- PEER_
EXIT - The handshake byte that ends the peer loop.
Functions§
- hermit_
xinuse_ ⚠arm - Runs one arm and returns its
ArmStatus. The save area receives the XSAVE image andpkru_outthe RDPKRU value. - hermit_
xinuse_ ⚠cpuid_ cycles - The TSC cycles of one CPUID leaf 0.
- hermit_
xinuse_ ⚠peer_ loop - Serves handshakes until it reads
PEER_EXITor a call fails. - hermit_
xinuse_ ⚠save_ restore_ cycles - The TSC cycles of one plain XSAVE plus standard XRSTOR of
xcr0. - hermit_
xinuse_ ⚠syscall_ cycles - The TSC cycles of one
getppidround trip.