snp_svsm_vtpm_send_command(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– snp_svsm_vtpm_send_command(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, buckle up, because this is a kernel API function from the Kernel API Manual and it's lowkey iconic. It's called snp_svsm_vtpm_send_command and it does exactly what it says on the tin: executes a vTPM operation on SVSM. periodt.


✨ NAME ✨

snp_svsm_vtpm_send_command β€” Execute a vTPM operation on SVSM πŸ¦‹


🌸 SYNOPSIS 🌸

int snp_svsm_vtpm_send_command (u8 *buffer );

πŸ’… ARGUMENTS πŸ’…

  • buffer β€” a buffer that's doing double duty, no cap: you use it to both send the command and receive the response. one buffer, two jobs, main character energy fr fr. 🫢

🌈 DESCRIPTION 🌈

So what it actually does: it executes an SVSM_VTPM_CMD call, as defined by "Secure VM Service Module for SEV-SNP Guests" Publication # 58019 Revision: 1.00. iykyk. πŸ“š

Every single command request/response buffer shares a common structure, and the spec lays it out like this:

  • Byte offset 0x000
  • Size (Bytes) 4
  • In/Out β€” In and Out (both, bestie, it swings both ways πŸ’€)
  • Description β€” In is the Platform command, Out is the Platform command response size

Each command can then build on top of that common request/response structure to make a structure that's specific to that command. it's giving customizable. πŸ’– For the deets, go peek at include/linux/tpm_svsm.h β€” more details live there.


πŸ‘‘ RETURN πŸ‘‘

  • 0 on success πŸŽ‰
  • -errno on failure 😭

πŸ¦‹ SEE ALSO πŸ¦‹


ngl, if you're poking at vTPM stuff on SEV-SNP guests, this is your girl. go off. πŸ’œ

kisses and good vibes from ./arch/x86/coco/sev β€” this page was dated October 2026, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from