Re: [PATCH v5 2/9] KVM: SEV: Disable SEV on platform init failure

Nikunj A. Dadhania
2025-01-24T09:57:11Z

On 1/24/2025 3:30 AM, Pratik R. Sampat wrote:
> diff --git a/include/linux/psp-sev.h b/include/linux/psp-sev.h
> index e841a8fbbb15..3a40b79fb37f 100644
> --- a/include/linux/psp-sev.h
> +++ b/include/linux/psp-sev.h
> @@ -946,6 +946,7 @@ void *psp_copy_user_blob(u64 uaddr, u32 len);
> void *snp_alloc_firmware_page(gfp_t mask);
> void snp_free_firmware_page(void *addr);
> bool snp_fw_valid(void);
> +bool is_sev_platform_init(void);
>
> #else /* !CONFIG_CRYPTO_DEV_SP_PSP */
>
> @@ -982,6 +983,8 @@ static inline void snp_free_firmware_page(void *addr) { }
>
> static inline bool snp_fw_valid(void) { return false; }
>
> +static inline bool is_sev_platform_init(void) { return false; }
> +

The naming does not sound right, sev_platform_init() does the SEV firmware platform
INIT, so how about calling it sev_fw_initialized()?

Regards,
Nikunj