Lines Matching +full:in +full:-

1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2016-2017 Advanced Micro Devices, Inc.
15 #include <uapi/linux/psp-sev.h>
115 * struct sev_data_init - INIT command parameters
118 * @tmr_address: system physical address used for SEV-ES
122 u32 flags; /* In */
123 u32 reserved; /* In */
124 u64 tmr_address; /* In */
125 u32 tmr_len; /* In */
129 * struct sev_data_init_ex - INIT_EX command parameters
133 * @tmr_address: system physical address used for SEV-ES
139 u32 length; /* In */
140 u32 flags; /* In */
141 u64 tmr_address; /* In */
142 u32 tmr_len; /* In */
143 u32 reserved; /* In */
144 u64 nv_address; /* In/Out */
145 u32 nv_len; /* In */
151 * struct sev_data_pek_csr - PEK_CSR command parameters
157 u64 address; /* In */
158 u32 len; /* In/Out */
162 * struct sev_data_cert_import - PEK_CERT_IMPORT command parameters
170 u64 pek_cert_address; /* In */
171 u32 pek_cert_len; /* In */
172 u32 reserved; /* In */
173 u64 oca_cert_address; /* In */
174 u32 oca_cert_len; /* In */
178 * struct sev_data_download_firmware - DOWNLOAD_FIRMWARE command parameters
184 u64 address; /* In */
185 u32 len; /* In */
189 * struct sev_data_get_id - GET_ID command parameters
195 u64 address; /* In */
196 u32 len; /* In/Out */
199 * struct sev_data_pdh_cert_export - PDH_CERT_EXPORT command parameters
207 u64 pdh_cert_address; /* In */
208 u32 pdh_cert_len; /* In/Out */
209 u32 reserved; /* In */
210 u64 cert_chain_address; /* In */
211 u32 cert_chain_len; /* In/Out */
215 * struct sev_data_decommission - DECOMMISSION command parameters
220 u32 handle; /* In */
224 * struct sev_data_activate - ACTIVATE command parameters
230 u32 handle; /* In */
231 u32 asid; /* In */
235 * struct sev_data_deactivate - DEACTIVATE command parameters
240 u32 handle; /* In */
244 * struct sev_data_guest_status - SEV GUEST_STATUS command parameters
252 u32 handle; /* In */
259 * struct sev_data_launch_start - LAUNCH_START command parameters
269 u32 handle; /* In/Out */
270 u32 policy; /* In */
271 u64 dh_cert_address; /* In */
272 u32 dh_cert_len; /* In */
273 u32 reserved; /* In */
274 u64 session_address; /* In */
275 u32 session_len; /* In */
279 * struct sev_data_launch_update_data - LAUNCH_UPDATE_DATA command parameter
286 u32 handle; /* In */
288 u64 address; /* In */
289 u32 len; /* In */
293 * struct sev_data_launch_update_vmsa - LAUNCH_UPDATE_VMSA command
300 u32 handle; /* In */
302 u64 address; /* In */
303 u32 len; /* In */
307 * struct sev_data_launch_measure - LAUNCH_MEASURE command parameters
314 u32 handle; /* In */
316 u64 address; /* In */
317 u32 len; /* In/Out */
321 * struct sev_data_launch_secret - LAUNCH_SECRET command parameters
332 u32 handle; /* In */
334 u64 hdr_address; /* In */
335 u32 hdr_len; /* In */
337 u64 guest_address; /* In */
338 u32 guest_len; /* In */
340 u64 trans_address; /* In */
341 u32 trans_len; /* In */
345 * struct sev_data_launch_finish - LAUNCH_FINISH command parameters
350 u32 handle; /* In */
354 * struct sev_data_send_start - SEND_START command parameters
368 u32 handle; /* In */
370 u64 pdh_cert_address; /* In */
371 u32 pdh_cert_len; /* In */
373 u64 plat_certs_address; /* In */
374 u32 plat_certs_len; /* In */
376 u64 amd_certs_address; /* In */
377 u32 amd_certs_len; /* In */
379 u64 session_address; /* In */
380 u32 session_len; /* In/Out */
384 * struct sev_data_send_update - SEND_UPDATE_DATA command
395 u32 handle; /* In */
397 u64 hdr_address; /* In */
398 u32 hdr_len; /* In/Out */
400 u64 guest_address; /* In */
401 u32 guest_len; /* In */
403 u64 trans_address; /* In */
404 u32 trans_len; /* In */
408 * struct sev_data_send_update - SEND_UPDATE_VMSA command
419 u32 handle; /* In */
420 u64 hdr_address; /* In */
421 u32 hdr_len; /* In/Out */
423 u64 guest_address; /* In */
424 u32 guest_len; /* In */
426 u64 trans_address; /* In */
427 u32 trans_len; /* In */
431 * struct sev_data_send_finish - SEND_FINISH command parameters
436 u32 handle; /* In */
440 * struct sev_data_send_cancel - SEND_CANCEL command parameters
445 u32 handle; /* In */
449 * struct sev_data_receive_start - RECEIVE_START command parameters
458 u32 handle; /* In/Out */
459 u32 policy; /* In */
460 u64 pdh_cert_address; /* In */
461 u32 pdh_cert_len; /* In */
463 u64 session_address; /* In */
464 u32 session_len; /* In */
468 * struct sev_data_receive_update_data - RECEIVE_UPDATE_DATA command parameters
479 u32 handle; /* In */
481 u64 hdr_address; /* In */
482 u32 hdr_len; /* In */
484 u64 guest_address; /* In */
485 u32 guest_len; /* In */
487 u64 trans_address; /* In */
488 u32 trans_len; /* In */
492 * struct sev_data_receive_update_vmsa - RECEIVE_UPDATE_VMSA command parameters
503 u32 handle; /* In */
505 u64 hdr_address; /* In */
506 u32 hdr_len; /* In */
508 u64 guest_address; /* In */
509 u32 guest_len; /* In */
511 u64 trans_address; /* In */
512 u32 trans_len; /* In */
516 * struct sev_data_receive_finish - RECEIVE_FINISH command parameters
521 u32 handle; /* In */
525 * struct sev_data_dbg - DBG_ENCRYPT/DBG_DECRYPT command parameters
533 u32 handle; /* In */
535 u64 src_addr; /* In */
536 u64 dst_addr; /* In */
537 u32 len; /* In */
541 * struct sev_data_attestation_report - SEV_ATTESTATION_REPORT command parameters
544 * @mnonce: a random nonce that will be included in the report.
549 u32 handle; /* In */
551 u64 address; /* In */
552 u8 mnonce[16]; /* In */
553 u32 len; /* In/Out */
557 * struct sev_data_snp_download_firmware - SNP_DOWNLOAD_FIRMWARE command params
563 u64 address; /* In */
564 u32 len; /* In */
568 * struct sev_data_snp_activate - SNP_ACTIVATE command params
574 u64 gctx_paddr; /* In */
575 u32 asid; /* In */
579 * struct sev_data_snp_addr - generic SNP command params
584 u64 address; /* In/Out */
588 * struct sev_data_snp_launch_start - SNP_LAUNCH_START command params
595 * purpose of guest-assisted migration.
597 * @gosvw: guest OS-visible workarounds, as defined by hypervisor
600 u64 gctx_paddr; /* In */
601 u64 policy; /* In */
602 u64 ma_gctx_paddr; /* In */
603 u32 ma_en:1; /* In */
604 u32 imi_en:1; /* In */
606 u8 gosvw[16]; /* In */
622 * struct sev_data_snp_launch_update - SNP_LAUNCH_UPDATE command params
639 u64 gctx_paddr; /* In */
640 u32 page_size:1; /* In */
641 u32 page_type:3; /* In */
642 u32 imi_page:1; /* In */
645 u64 address; /* In */
647 u32 vmpl1_perms:8; /* In */
648 u32 vmpl2_perms:8; /* In */
649 u32 vmpl3_perms:8; /* In */
654 * struct sev_data_snp_launch_finish - SNP_LAUNCH_FINISH command params
660 * @auth_key_en: indicates whether author key is present in authentication structure
663 * @host_data: host-supplied data for guest, not interpreted by firmware
677 * struct sev_data_snp_guest_status - SNP_GUEST_STATUS command params
688 * struct sev_data_snp_page_reclaim - SNP_PAGE_RECLAIM command params
690 * @paddr: system physical address of page to be claimed. The 0th bit in the
699 * struct sev_data_snp_page_unsmash - SNP_PAGE_UNSMASH command params
701 * @paddr: system physical address of page to be unsmashed. The 0th bit in the
710 * struct sev_data_snp_dbg - DBG_ENCRYPT/DBG_DECRYPT command parameters
717 u64 gctx_paddr; /* In */
718 u64 src_addr; /* In */
719 u64 dst_addr; /* In */
723 * struct sev_data_snp_guest_request - SNP_GUEST_REQUEST command params
730 u64 gctx_paddr; /* In */
731 u64 req_paddr; /* In */
732 u64 res_paddr; /* In */
736 * struct sev_data_snp_init_ex - SNP_INIT_EX structure
755 * struct sev_data_range - RANGE structure
758 * @page_count: number of 4KB pages in this range
768 * struct sev_data_range_list - RANGE_LIST structure
770 * @num_elements: number of elements in RANGE_ARRAY
781 * struct sev_data_snp_shutdown_ex - SNP_SHUTDOWN_EX structure
784 * @iommu_snp_shutdown: Disable enforcement of SNP in the IOMMU
807 * struct sev_data_snp_commit - SNP_COMMIT structure
818 * sev_platform_init - perform SEV INIT command
820 * @args: struct sev_platform_init_args to pass in arguments
824 * -%ENODEV if the SEV device is not available
825 * -%ENOTSUPP if the SEV does not support SEV
826 * -%ETIMEDOUT if the SEV command timed out
827 * -%EIO if the SEV returned a non-zero return code
832 * sev_platform_status - perform SEV PLATFORM_STATUS command
839 * -%ENODEV if the SEV device is not available
840 * -%ENOTSUPP if the SEV does not support SEV
841 * -%ETIMEDOUT if the SEV command timed out
842 * -%EIO if the SEV returned a non-zero return code
847 * sev_issue_cmd_external_user - issue SEV command by other driver with a file
854 * @filep - SEV device file pointer
855 * @cmd - command to issue
856 * @data - command buffer
861 * -%ENODEV if the SEV device is not available
862 * -%ENOTSUPP if the SEV does not support SEV
863 * -%ETIMEDOUT if the SEV command timed out
864 * -%EIO if the SEV returned a non-zero return code
865 * -%EINVAL if the SEV file descriptor is not valid
871 * sev_guest_deactivate - perform SEV DEACTIVATE command
878 * -%ENODEV if the sev device is not available
879 * -%ENOTSUPP if the sev does not support SEV
880 * -%ETIMEDOUT if the sev command timed out
881 * -%EIO if the sev returned a non-zero return code
886 * sev_guest_activate - perform SEV ACTIVATE command
893 * -%ENODEV if the sev device is not available
894 * -%ENOTSUPP if the sev does not support SEV
895 * -%ETIMEDOUT if the sev command timed out
896 * -%EIO if the sev returned a non-zero return code
901 * sev_guest_df_flush - perform SEV DF_FLUSH command
907 * -%ENODEV if the sev device is not available
908 * -%ENOTSUPP if the sev does not support SEV
909 * -%ETIMEDOUT if the sev command timed out
910 * -%EIO if the sev returned a non-zero return code
915 * sev_guest_decommission - perform SEV DECOMMISSION command
922 * -%ENODEV if the sev device is not available
923 * -%ENOTSUPP if the sev does not support SEV
924 * -%ETIMEDOUT if the sev command timed out
925 * -%EIO if the sev returned a non-zero return code
930 * sev_do_cmd - issue an SEV or an SEV-SNP command
932 * @cmd: SEV or SEV-SNP firmware command to issue
938 * -%ENODEV if the PSP device is not available
939 * -%ENOTSUPP if PSP device does not support SEV
940 * -%ETIMEDOUT if the SEV command timed out
941 * -%EIO if PSP device returned a non-zero return code
952 sev_platform_status(struct sev_user_data_status *status, int *error) { return -ENODEV; } in sev_platform_status()
954 static inline int sev_platform_init(struct sev_platform_init_args *args) { return -ENODEV; } in sev_platform_init()
957 sev_guest_deactivate(struct sev_data_deactivate *data, int *error) { return -ENODEV; } in sev_guest_deactivate()
960 sev_guest_decommission(struct sev_data_decommission *data, int *error) { return -ENODEV; } in sev_guest_decommission()
963 sev_do_cmd(int cmd, void *data, int *psp_ret) { return -ENODEV; } in sev_do_cmd()
966 sev_guest_activate(struct sev_data_activate *data, int *error) { return -ENODEV; } in sev_guest_activate()
968 static inline int sev_guest_df_flush(int *error) { return -ENODEV; } in sev_guest_df_flush()
971 sev_issue_cmd_external_user(struct file *filep, unsigned int id, void *data, int *error) { return - in sev_issue_cmd_external_user()
973 static inline void *psp_copy_user_blob(u64 __user uaddr, u32 len) { return ERR_PTR(-EINVAL); } in psp_copy_user_blob()