STRUCT TSM_MEASUREMENT_REGISTER(9)
π NAME π
okay so bestie, welcome to struct tsm_measurement_register(9) from the Kernel API Manual β this one's literally just a lil struct that describes an architectural measurement register (MR) π
β¨ SYNOPSIS β¨
struct tsm_measurement_register {
const char *mr_name;
void *mr_value;
u32 mr_size;
u32 mr_flags;
enum hash_algo mr_hash;
};
π«Ά MEMBERS π«Ά
mr_nameβ the name of the MR, bestie. that's it, that's the whole job πmr_valueβ a buffer holding the current value of the MR π¦mr_sizeβ how big the MR is β usually the digest size ofmr_hash, iykykmr_flagsβ a bitwise OR of one or more flags, all spelled out below β¬οΈmr_hashβ an optional hash identifier, defined over ininclude/uapi/linux/hash_info.h
πΈ DESCRIPTION πΈ
so a CC guest driver wraps an array of this struct inside struct tsm_measurements to lay out all the details of the measurement facility that the underlying CC hardware supports. main character energy for a struct, honestly π
π¨ real talk:mr_nameandmr_valuemust stay valid until this structure is no longer in use. no dangling pointers on my watch, fr fr π
mr_flags is the bitwise-OR of zero or more of the flags below:
TSM_MR_F_READABLEβ the sysfs attribute for this MR is readable πTSM_MR_F_WRITABLEβ the sysfs attribute for this MR is writable. the semantics is typically to extend the MR, but ngl it could vary depending on the architecture and the MR ποΈTSM_MR_F_LIVEβ this MR's value may differ from the last value written, so it must be read back from the underlying CC hardware/firmware. no trusting your memory here bestie πTSM_MR_F_RTMRβ literally just the bitwise-OR ofTSM_MR_F_LIVEandTSM_MR_F_WRITABLEπTSM_MR_F_NOHASHβ this MR does NOT have an associated hash algorithm.mr_hashgets ignored when this flag is set, periodt π
π SEE ALSO π
- Kernel file
./include/linux/tsm-mr.h struct tsm_measurements(9)
and that's the whole vibe check! π¦ this lil gem lives at ./include/linux, dated October 2026, and it answers to struct tsm_...ent_register(9) β slay, go read the kernel source, ily, bye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms