Re: [PATCH v2 04/11] virt: sev-guest: Add simplified helper to assign vmpck
From: Peter Gonda
Date: Mon Apr 10 2023 - 12:31:48 EST
>
> -static u8 *get_vmpck(int id, struct snp_secrets_page_layout *layout, u32 **seqno)
> +bool snp_assign_vmpck(struct snp_guest_dev *dev, int vmpck_id)
> {
> - u8 *key = NULL;
> + if (WARN_ON(vmpck_id > 3))
> + return false;
Should vmpck_id be a uint to match the module parameter or should we
check if vmpck_id < 0 ?