tsm_mr_crea...ribute_group(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, this page is all about tsm_mr_create_attribute_group β€” and what it does is literally create an attribute group for measurement registers (MRs). that's it. that's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

const struct attribute_group * tsm_mr_create_attribute_group (const
struct tsm_measurements *tm );

like, yes, that's the whole signature, no notes πŸ’–


🌸 ARGUMENTS 🌸

  • tm β€” a pointer to struct tsm_measurements, and inside that bad boy live the MR definitions. she's the main character of this function, fr fr πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function makes attributes that correspond to the MR definitions that tm->mrs is serving up. the way it just... matches them up? iconic. 🫢

🚨 IMPORTANT ONE, DON'T SKIP: the attributes it creates will reference tm and its members. so the caller must not free tm until after tsm_mr_free_attribute_group has been called. periodt. no cap, this one actually matters β€” free that struct too early and it's giving undefined chaos πŸ’€

⭐ CONTEXT ⭐

process context, bestie. and yes, she may sleep β€” because of memory allocation. let her nap. πŸ˜΄πŸ’…


πŸ”₯ RETURN πŸ”₯

  • on success, you get back the pointer to an attribute group. slay. ✨
  • otherwise, it's one of these little guys:
    • -EINVAL β€” the MR definitions are invalid πŸ™ˆ
    • -ENOMEM β€” out of memory 😭

πŸ’œ SEE ALSO πŸ’œ

  • the kernel file ./drivers/virt/coco/guest/tsm-mr.c β€” go read the source, iykyk πŸ“–
  • tsm_mr_free_attribute_group(9) β€” the cleanup bestie, you'll be needing her 🌈

and that's the whole page, gorgeous 🧚✨ this little gem lives in ./drivers/virt/coco/guest, it's dated October 2026, and it's the tsm_mr_crea...ribute_group(9) entry from the Kernel API Manual β€” mwah, go build something πŸ’–πŸŒΈπŸŽ€

πŸ“¦ where this page comes from