Skip to content

Commit

Permalink
Adding newest psp-sev.h file. Supports get_id2
Browse files Browse the repository at this point in the history
Todo, add get_id2 support to sev-tool
  • Loading branch information
lilienbm-zz committed Aug 14, 2019
1 parent 68f56ca commit a3647d5
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions lib/psp-sev.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Userspace interface for AMD Secure Encrypted Virtualization (SEV)
* platform management commands.
Expand All @@ -6,12 +7,7 @@
*
* Author: Brijesh Singh <[email protected]>
*
* SEV spec 0.14 is available at:
* http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* SEV API specification is available at: https://developer.amd.com/sev/
*/

#ifndef __PSP_SEV_USER_H__
Expand All @@ -30,7 +26,8 @@ enum {
SEV_PDH_GEN,
SEV_PDH_CERT_EXPORT,
SEV_PEK_CERT_IMPORT,
SEV_GET_ID,
SEV_GET_ID, /* This command is deprecated, use SEV_GET_ID2 */
SEV_GET_ID2,

SEV_MAX,
};
Expand Down Expand Up @@ -125,7 +122,7 @@ struct sev_user_data_pdh_cert_export {
} __attribute__((packed));

/**
* struct sev_user_data_get_id - GET_ID command parameters
* struct sev_user_data_get_id - GET_ID command parameters (deprecated)
*
* @socket1: Buffer to pass unique ID of first socket
* @socket2: Buffer to pass unique ID of second socket
Expand All @@ -135,6 +132,16 @@ struct sev_user_data_get_id {
__u8 socket2[64]; /* Out */
} __attribute__((packed));

/**
* struct sev_user_data_get_id2 - GET_ID command parameters
* @address: Buffer to store unique ID
* @length: length of the unique ID
*/
struct sev_user_data_get_id2 {
__u64 address; /* In */
__u32 length; /* In/Out */
} __attribute__((packed));

/**
* struct sev_issue_cmd - SEV ioctl parameters
*
Expand Down

0 comments on commit a3647d5

Please sign in to comment.