[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b005b81-792a-4338-8085-e064c273f887@amd.com>
Date: Thu, 2 Nov 2023 09:33:44 +0530
From: "Nikunj A. Dadhania" <nikunj@....com>
To: Tom Lendacky <thomas.lendacky@....com>,
Dionna Amalie Glaze <dionnaglaze@...gle.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, kvm@...r.kernel.org,
bp@...en8.de, mingo@...hat.com, tglx@...utronix.de,
dave.hansen@...ux.intel.com, pgonda@...gle.com, seanjc@...gle.com,
pbonzini@...hat.com
Subject: Re: [PATCH v5 05/14] virt: sev-guest: Add vmpck_id to snp_guest_dev
struct
On 10/30/2023 10:42 PM, Tom Lendacky wrote:
> On 10/30/23 11:16, Dionna Amalie Glaze wrote:
>> On Sun, Oct 29, 2023 at 11:38 PM Nikunj A Dadhania <nikunj@....com> wrote:
>>> @@ -656,32 +674,14 @@ static const struct file_operations snp_guest_fops = {
>>> .unlocked_ioctl = snp_guest_ioctl,
>>> };
>>>
>>> -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;
>>
>> The vmpck_id is an int for some reason, so < 0 is also a problem. Can
>> we not use unsigned int?
Yes, I will update that in my next revision,
Thanks
Nikunj
Powered by blists - more mailing lists