sev_issue_cmd_external_user(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

sev_issue_cmd_external_user β€” issue SEV command by other driver with a file handle πŸ’…

That's the whole vibe, bestie. Like, that's genuinely it, and honestly? Iconic of it.


🌸 SYNOPSIS 🌸

int sev_issue_cmd_external_user (struct file *filep , unsigned int id ,
void *data , int *error );

πŸŽ€ ARGUMENTS πŸŽ€

okay so the source page is so real for this one, it just says the same thing three times and dips 😭

  • filep β€” -- undescribed -- πŸ™ˆ no cap, that's literally all it says
  • id β€” -- undescribed -- πŸ’€ the mystery continues
  • data β€” -- undescribed -- 🫢 three for three
  • error β€” SEV command return code ✨ (this one actually got a description, we stan)

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this function is the plug for other drivers β€” they can use it to issue a SEV command on behalf of userspace πŸ‘‘

The one rule, and it's not negotiable: the caller must pass a valid SEV file descriptor, so we know for a fact that it actually has access to the SEV device πŸ”₯ No valid fd, no vibes.

And then, further down, the page lists the trio like this:

  • filep β€” SEV device file pointer
  • cmd β€” command to issue
  • data β€” command buffer

(yes, the synopsis up top calls it id and this line calls it cmd β€” we're not fixing it, we're just reporting it, iykyk πŸ™ˆ)


πŸ‘‘ RETURN πŸ‘‘

  • 0 β€” if the SEV successfully processed the command βœ… ate, no crumbs
  • -ENODEV β€” if the SEV device is not available 😭
  • -ENOTSUPP β€” if the SEV does not support SEV πŸ™ˆ
  • -ETIMEDOUT β€” if the SEV command timed out ⏰
  • -EIO β€” if the SEV returned a non-zero return code πŸ’€
  • -EINVAL β€” if the SEV file descriptor is not valid 🚫

🌈 SEE ALSO 🌈

First up, the kernel file itself:

  • ./include/linux/psp-sev.h πŸ“

And then the whole squad, in order, no skips:

  • struct sev_data_init(9)
  • struct sev_data_init_ex(9)
  • struct sev_data_pek_csr(9)
  • struct sev_data_download_firmware(9)
  • struct sev_data_get_id(9)
  • struct sev_data_pdh_cert_export(9)
  • struct sev_data_decommission(9)
  • struct sev_data_activate(9)
  • struct sev_data_deactivate(9)
  • struct sev_data_guest_status(9)
  • struct sev_data_launch_start(9)
  • struct sev_data_launch_update_data(9)
  • struct sev_data_launch_update_vmsa(9)
  • struct sev_data_launch_measure(9)
  • struct sev_data_launch_secret(9)
  • struct sev_data_launch_finish(9)
  • struct sev_data_send_start(9)
  • struct sev_data_send_finish(9)
  • struct sev_data_send_cancel(9)
  • struct sev_data_receive_start(9)
  • struct sev_data_receive_update_data(9)
  • struct sev_data_receive_update_vmsa(9)
  • struct sev_data_receive_finish(9)
  • struct sev_data_dbg(9)
  • struct sev_data_attestation_report(9)
  • struct sev_data_snp_download_firmware(9)
  • struct sev_data_snp_activate(9)
  • struct sev_data_snp_addr(9)
  • struct sev_data_snp_launch_start(9)
  • struct sev_data_snp_launch_update(9)
  • struct sev_data_snp_launch_finish(9)
  • struct sev_data_snp_guest_status(9)
  • struct sev_data_snp_page_reclaim(9)
  • struct sev_data_snp_page_unsmash(9)
  • struct sev_data_snp_dbg(9)
  • struct sev_data_snp_guest_request(9)
  • struct sev_data_snp_init_ex(9)
  • struct sev_data_range(9)
  • struct sev_data_range_list(9)
  • struct sev_data_snp_shutdown_ex(9)
  • struct sev_platform_init_args(9)
  • struct sev_data_snp_commit(9)
  • struct sev_data_snp_feature_info(9)
  • struct sev_data_snp_verify_mitigation(9)
  • struct sev_data_snp_verify_mitigation_dst(9)
  • struct sev_snp_tcb_version_genoa_milan(9)
  • struct sev_snp_tcb_version_turin(9)
  • sev_module_init(9)
  • sev_platform_init(9)
  • sev_platform_status(9)
  • sev_guest_deactivate(9)
  • sev_guest_activate(9)
  • sev_guest_df_flush(9)
  • sev_guest_decommission(9)
  • sev_do_cmd(9)

okay that's the page!! mwah πŸ’– huge shoutout to ./include/linux for being the source, October 2026 for the date, and sev_issue_cmd_external_user(9) for being the moment. go read a struct, bestie, you got this πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from