Re: [PATCH v1 6/6] s390/uv: Retrieve UV secrets sysfs support

From: Christoph Schlameuss
Date: Tue Oct 01 2024 - 13:42:37 EST


On Mon Sep 30, 2024 at 3:19 PM CEST, Steffen Eiden wrote:
> Reflect the updated content in the query information UVC to the sysfs at
> /sys/firmware/query
>
> * new UV-query sysfs entry for the maximum number of retrievable
> secrets the UV can store for one secure guest.
> * new UV-query sysfs entry for the maximum number of association
> secrets the UV can store for one secure guest.
> * max_secrets contains the sum of max association and max retrievable
> secrets.
>
> Signed-off-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>

Reviewed-by: Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx>

> ---
> arch/s390/boot/uv.c | 3 ++-
> arch/s390/include/asm/uv.h | 8 +++++---
> arch/s390/kernel/uv.c | 24 +++++++++++++++++++++++-
> 3 files changed, 30 insertions(+), 5 deletions(-)

[...]

> diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
> index 6838aa23e4e5..91631bea22d8 100644
> --- a/arch/s390/include/asm/uv.h
> +++ b/arch/s390/include/asm/uv.h
> @@ -144,8 +144,9 @@ struct uv_cb_qui {
> u64 supp_add_secret_req_ver; /* 0x00f8 */
> u64 supp_add_secret_pcf; /* 0x0100 */
> u64 supp_secret_types; /* 0x0180 */

This is not part of your patch, but maybe you can correct this with this
adjacent edit.
supp_secret_types is located at 0x0108.

> - u16 max_secrets; /* 0x0110 */
> - u8 reserved112[0x120 - 0x112]; /* 0x0112 */
> + u16 max_assoc_secrets; /* 0x0110 */
> + u16 max_retr_secrets; /* 0x0112 */
> + u8 reserved114[0x120 - 0x114]; /* 0x0114 */
> } __packed __aligned(8);

[...]