STRUCT TSM_MEASUREMENT_REGISTER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 of mr_hash, iykyk
  • mr_flags β€” a bitwise OR of one or more flags, all spelled out below ⬇️
  • mr_hash β€” an optional hash identifier, defined over in include/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_name and mr_value must 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 of TSM_MR_F_LIVE and TSM_MR_F_WRITABLE 🌈
  • TSM_MR_F_NOHASH β€” this MR does NOT have an associated hash algorithm. mr_hash gets 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