pci_tsm_guest_req(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, we're looking at pci_tsm_guest_req(9) from the Kernel API Manual, and it's literally the helper that marshals guest requests to the TSM driver. It's giving middle-woman function for guest-to-TSM communication, and it's iconic for it. πŸ’…βœ¨

πŸ’– NAME πŸ’–

pci_tsm_guest_req β€” helper to marshal guest requests to the TSM driver.

πŸ“œ SYNOPSIS πŸ“œ

ssize_t pci_tsm_guest_req (struct pci_dev *pdev , enum pci_tsm_req_scope
scope , sockptr_t req_in , size_t in_len , sockptr_t req_out , size_t
out_len , u64 *tsm_code );

πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” pdev representing a bound tdi.
  • scope β€” caller asserts this passthrough request is limited to TDISP operations.
  • req_in β€” input payload forwarded from the guest.
  • in_len β€” length of req_in.
  • req_out β€” output payload buffer response to the guest.
  • out_len β€” length of req_out on input, bytes filled in req_out on output.
  • tsm_code β€” optional TSM arch specific result code for the guest TSM.

🌈 DESCRIPTION 🌈

This is the common entry point for requests triggered by userspace KVM-exit service handlers responding to TDI information or state change requests. The scope parameter limits requests to TDISP state management, or limited debug. This path is only suitable for commands and results that the host kernel has no use for β€” the host is only facilitating guest to TSM communication. iykyk. 🧚

Returns 0 on success and -error on failure, plus a positive "residue" on success when req_out is filled with less then out_len, or when req_out is NULL and a residue number of bytes were not consumed from req_in. On success or failure, tsm_code may be populated with a TSM implementation specific result code for the guest to consume. That's the whole deal, fr fr. πŸ’€

πŸ¦‹ CONTEXT πŸ¦‹

Caller is responsible for calling this within the pci_tsm_bind state of the TDI. That's the vibe check β€” the caller's got this timing job, and it's highkey important. πŸ‘‘

🌸 SEE ALSO 🌸

Kernel file ./drivers/pci/tsm.c and these iconic friends:


source/version corner: ./drivers/pci Β· date stamp: October 2026 Β· page tag: pci_tsm_guest_req(9). byeee bestie, go marshal those guest requests responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from