diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2022-02-24 10:56:23 -0600 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-04-07 16:47:12 +0200 |
commit | 68de0b2f938642079c0c853b219bdb88c4dc4d13 (patch) | |
tree | 47b4e86cd61144bd5fcba09a040c7e958828a31c /Documentation/virt/coco/sevguest.rst | |
parent | fce96cf0443083e37455eff8f78fd240c621dae3 (diff) | |
download | linux-68de0b2f938642079c0c853b219bdb88c4dc4d13.tar.gz linux-68de0b2f938642079c0c853b219bdb88c4dc4d13.tar.bz2 linux-68de0b2f938642079c0c853b219bdb88c4dc4d13.zip |
virt: sevguest: Add support to derive key
The SNP_GET_DERIVED_KEY ioctl interface can be used by the SNP guest to
ask the firmware to provide a key derived from a root key. The derived
key may be used by the guest for any purposes it chooses, such as a
sealing key or communicating with the external entities.
See SEV-SNP firmware spec for more information.
[ bp: No need to memset "req" - it will get overwritten. ]
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Link: https://lore.kernel.org/r/20220307213356.2797205-45-brijesh.singh@amd.com
Diffstat (limited to 'Documentation/virt/coco/sevguest.rst')
-rw-r--r-- | Documentation/virt/coco/sevguest.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/virt/coco/sevguest.rst b/Documentation/virt/coco/sevguest.rst index 3da782e867a3..4135c1431241 100644 --- a/Documentation/virt/coco/sevguest.rst +++ b/Documentation/virt/coco/sevguest.rst @@ -77,6 +77,23 @@ On success, the snp_report_resp.data will contains the report. The report contain the format described in the SEV-SNP specification. See the SEV-SNP specification for further details. +2.2 SNP_GET_DERIVED_KEY +----------------------- +:Technology: sev-snp +:Type: guest ioctl +:Parameters (in): struct snp_derived_key_req +:Returns (out): struct snp_derived_key_resp on success, -negative on error + +The SNP_GET_DERIVED_KEY ioctl can be used to get a key derive from a root key. +The derived key can be used by the guest for any purpose, such as sealing keys +or communicating with external entities. + +The ioctl uses the SNP_GUEST_REQUEST (MSG_KEY_REQ) command provided by the +SEV-SNP firmware to derive the key. See SEV-SNP specification for further details +on the various fields passed in the key derivation request. + +On success, the snp_derived_key_resp.data contains the derived key value. See +the SEV-SNP specification for further details. Reference --------- |