Re: [PATCH v6 07/16] x86/sev: Move and reorganize sev guest request api

From: Nikunj A. Dadhania
Date: Tue Dec 05 2023 - 23:24:51 EST


On 12/5/2023 10:43 PM, Dionna Amalie Glaze wrote:
> On Tue, Nov 28, 2023 at 5:01 AM Nikunj A Dadhania <nikunj@xxxxxxx> wrote:
>>
>> +int snp_setup_psp_messaging(struct snp_guest_dev *snp_dev)
>> +{
>> + struct sev_guest_platform_data *pdata;
>> + int ret;
>> +
>> + if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) {
>
> Note that this may be going away in favor of an
> cpu_feature_enabled(X86_FEATURE_...) check given Kirill's "[PATCH]
> x86/coco, x86/sev: Use cpu_feature_enabled() to detect SEV guest
> flavor"

I do not see a conclusion on that yet, so we should wait.

>> +bool snp_assign_vmpck(struct snp_guest_dev *dev, unsigned int vmpck_id)
>> +{
>> + if (WARN_ON(vmpck_id > 3))
>
> This constant 3 should be #define'd, I believe.

Sure, I am working on few changes related to mutex per vmpck that Tom had suggested offline, that will also need a #define.

Thanks
Nikunj