[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMkAt6r4-8zwW8_JbTG6zK0DFG9PVX5Z50Xrq1C_fLBCdsrqdg@mail.gmail.com>
Date: Mon, 10 Apr 2023 10:31:30 -0600
From: Peter Gonda <pgonda@...gle.com>
To: Nikunj A Dadhania <nikunj@....com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, bp@...en8.de,
thomas.lendacky@....com, dionnaglaze@...gle.com, seanjc@...gle.com,
pbonzini@...hat.com, michael.roth@....com, ketanch@...k.ac.in
Subject: Re: [PATCH v2 04/11] virt: sev-guest: Add simplified helper to assign vmpck
>
> -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 ?
Powered by blists - more mailing lists