Message ID | afd7d4c5192109519ada49885e9585a1699820bc.1726602374.git.ashish.kalra@amd.com |
---|---|
State | New |
Headers | show |
Series | Add SEV-SNP CipherTextHiding feature support | expand |
On Tue, Sep 17, 2024 at 2:16 PM Ashish Kalra <Ashish.Kalra@amd.com> wrote: > > From: Ashish Kalra <ashish.kalra@amd.com> > > Define new bit-field definitions returned by SNP_PLATFORM_STATUS command > such as new capabilities like SNP_FEATURE_INFO command availability, > ciphertext hiding enabled and capability. > > Signed-off-by: Ashish Kalra <ashish.kalra@amd.com> > --- > include/uapi/linux/psp-sev.h | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h > index 832c15d9155b..dd7298b67b37 100644 > --- a/include/uapi/linux/psp-sev.h > +++ b/include/uapi/linux/psp-sev.h > @@ -178,6 +178,10 @@ struct sev_user_data_get_id2 { > * @mask_chip_id: whether chip id is present in attestation reports or not > * @mask_chip_key: whether attestation reports are signed or not > * @vlek_en: VLEK (Version Loaded Endorsement Key) hashstick is loaded > + * @feature_info: whether SNP_FEATURE_INFO command is available > + * @rapl_dis: whether RAPL is disabled > + * @ciphertext_hiding_cap: whether platform has ciphertext hiding capability > + * @ciphertext_hiding_en: whether ciphertext hiding is enabled > * @rsvd1: reserved > * @guest_count: the number of guest currently managed by the firmware > * @current_tcb_version: current TCB version > @@ -193,7 +197,11 @@ struct sev_user_data_snp_status { > __u32 mask_chip_id:1; /* Out */ > __u32 mask_chip_key:1; /* Out */ > __u32 vlek_en:1; /* Out */ > - __u32 rsvd1:29; > + __u32 feature_info:1; /* Out */ Is this the right way for userspace to check if a command is available? None of the other commands are detailed like this one is. > + __u32 rapl_dis:1; /* Out */ > + __u32 ciphertext_hiding_cap:1; /* Out */ > + __u32 ciphertext_hiding_en:1; /* Out */ > + __u32 rsvd1:25; > __u32 guest_count; /* Out */ > __u64 current_tcb_version; /* Out */ > __u64 reported_tcb_version; /* Out */ > -- > 2.34.1 > >
On 9/17/24 15:16, Ashish Kalra wrote: > From: Ashish Kalra <ashish.kalra@amd.com> > > Define new bit-field definitions returned by SNP_PLATFORM_STATUS command > such as new capabilities like SNP_FEATURE_INFO command availability, > ciphertext hiding enabled and capability. > > Signed-off-by: Ashish Kalra <ashish.kalra@amd.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> > --- > include/uapi/linux/psp-sev.h | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h > index 832c15d9155b..dd7298b67b37 100644 > --- a/include/uapi/linux/psp-sev.h > +++ b/include/uapi/linux/psp-sev.h > @@ -178,6 +178,10 @@ struct sev_user_data_get_id2 { > * @mask_chip_id: whether chip id is present in attestation reports or not > * @mask_chip_key: whether attestation reports are signed or not > * @vlek_en: VLEK (Version Loaded Endorsement Key) hashstick is loaded > + * @feature_info: whether SNP_FEATURE_INFO command is available > + * @rapl_dis: whether RAPL is disabled > + * @ciphertext_hiding_cap: whether platform has ciphertext hiding capability > + * @ciphertext_hiding_en: whether ciphertext hiding is enabled > * @rsvd1: reserved > * @guest_count: the number of guest currently managed by the firmware > * @current_tcb_version: current TCB version > @@ -193,7 +197,11 @@ struct sev_user_data_snp_status { > __u32 mask_chip_id:1; /* Out */ > __u32 mask_chip_key:1; /* Out */ > __u32 vlek_en:1; /* Out */ > - __u32 rsvd1:29; > + __u32 feature_info:1; /* Out */ > + __u32 rapl_dis:1; /* Out */ > + __u32 ciphertext_hiding_cap:1; /* Out */ > + __u32 ciphertext_hiding_en:1; /* Out */ > + __u32 rsvd1:25; > __u32 guest_count; /* Out */ > __u64 current_tcb_version; /* Out */ > __u64 reported_tcb_version; /* Out */
diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h index 832c15d9155b..dd7298b67b37 100644 --- a/include/uapi/linux/psp-sev.h +++ b/include/uapi/linux/psp-sev.h @@ -178,6 +178,10 @@ struct sev_user_data_get_id2 { * @mask_chip_id: whether chip id is present in attestation reports or not * @mask_chip_key: whether attestation reports are signed or not * @vlek_en: VLEK (Version Loaded Endorsement Key) hashstick is loaded + * @feature_info: whether SNP_FEATURE_INFO command is available + * @rapl_dis: whether RAPL is disabled + * @ciphertext_hiding_cap: whether platform has ciphertext hiding capability + * @ciphertext_hiding_en: whether ciphertext hiding is enabled * @rsvd1: reserved * @guest_count: the number of guest currently managed by the firmware * @current_tcb_version: current TCB version @@ -193,7 +197,11 @@ struct sev_user_data_snp_status { __u32 mask_chip_id:1; /* Out */ __u32 mask_chip_key:1; /* Out */ __u32 vlek_en:1; /* Out */ - __u32 rsvd1:29; + __u32 feature_info:1; /* Out */ + __u32 rapl_dis:1; /* Out */ + __u32 ciphertext_hiding_cap:1; /* Out */ + __u32 ciphertext_hiding_en:1; /* Out */ + __u32 rsvd1:25; __u32 guest_count; /* Out */ __u64 current_tcb_version; /* Out */ __u64 reported_tcb_version; /* Out */