sev_platform_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sev_platform_init β€” kernel API manual, but make it make sense πŸŽ€

okay bestie, welcome to the sev_platform_init(9) page β€” it's a kernel API manual entry, and it's giving "small function, big responsibilities." πŸ¦‹


✨ NAME ✨

sev_platform_init β€” performs the SEV INIT command πŸ’–

Like, that's the whole vibe. It performs the SEV INIT command. Iconic behavior, no notes.


🌸 SYNOPSIS 🌸

int sev_platform_init (struct sev_platform_init_args *args );

That's it. One argument. One int coming back at you. Simple on the outside, but we all know kernel functions contain multitudes 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • args β€” a struct sev_platform_init_args that you pass in to, you know, pass in the arguments. It's literally the argument-passing struct. The struct's whole job is arguments. We love a self-aware king πŸ‘‘

πŸ”₯ RETURN πŸ”₯

so here's the vibe check on the return value, and ngl this list matters, so read it fr fr:

  • 0 β€” the SEV successfully processed the command. slay! ✨
  • -ENODEV β€” the SEV device is not available. it's not here, bestie, it's not answering the group chat πŸ’€
  • -ENOTSUPP β€” the SEV does not support SEV. yes that is the actual sentence and yes it's a little funny, but it's real: this thing doesn't support SEV, periodt.
  • -ETIMEDOUT β€” the SEV command timed out. it ghosted you 🫠
  • -EIO β€” the SEV returned a non-zero return code. so like, it came back but it came back wrong 😭
None of these are vibes-based errors, okay? They're real return codes. Don't go inventing extra ones, that's not the move. πŸ™ˆ

🧚 SEE ALSO 🧚

lowkey this section is a lot of structs, but bestie we are not skipping a single one β€” the kernel file ./include/linux/psp-sev.h is the home base, and here's the whole crew:

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) β€” deep breath, still going β€” plus the function friends: sev_module_init(9), sev_platform_status(9), sev_issue_cmd_external_user(9), sev_guest_deactivate(9), sev_guest_activate(9), sev_guest_df_flush(9), sev_guest_decommission(9), sev_do_cmd(9).

whew. every single one is there, because I would never do you dirty like that 🫢


and that's the page, bestie! 🌈 this one comes from the kernel file tree at ./include/linux, dated October 2026 β€” so when you cite it, that's the version/date energy. go forth and sev_platform_init responsibly πŸ’œπŸ‘‘

πŸ“¦ where this page comes from