Re: [PATCH v2 04/11] virt: sev-guest: Add simplified helper to assign vmpck

From: Nikunj A. Dadhania
Date: Fri Apr 14 2023 - 00:51:38 EST


On 4/10/2023 10:01 PM, Peter Gonda wrote:
>>
>> -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 ?

Thanks for pointing that out, I will make vmpck_id as a uint.

Regards
Nikunj