[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5350829a-d30f-41b4-82db-8ed822e13d09@wanadoo.fr>
Date: Mon, 21 Oct 2024 09:48:49 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Nikunj A Dadhania <nikunj@....com>, linux-kernel@...r.kernel.org,
thomas.lendacky@....com, bp@...en8.de, x86@...nel.org, kvm@...r.kernel.org
Cc: mingo@...hat.com, tglx@...utronix.de, dave.hansen@...ux.intel.com,
pgonda@...gle.com, seanjc@...gle.com, pbonzini@...hat.com
Subject: Re: [PATCH v13 01/13] x86/sev: Carve out and export SNP guest
messaging init routines
Le 21/10/2024 à 07:51, Nikunj A Dadhania a écrit :
> Currently, the SEV guest driver is the only user of SNP guest messaging.
> All routines for initializing SNP guest messaging are implemented within
> the SEV guest driver. To add Secure TSC guest support, these initialization
> routines need to be available during early boot.
>
> Carve out common SNP guest messaging buffer allocations and message
> initialization routines to core/sev.c and export them. These newly added
> APIs set up the SNP message context (snp_msg_desc), which contains all the
> necessary details for sending SNP guest messages.
>
> At present, the SEV guest platform data structure is used to pass the
> secrets page physical address to SEV guest driver. Since the secrets page
> address is locally available to the initialization routine, use the cached
> address. Remove the unused SEV guest platform data structure.
>
> Signed-off-by: Nikunj A Dadhania <nikunj@....com>
> Reviewed-by: Tom Lendacky <thomas.lendacky@....com>
> ---
...
> +static inline bool is_vmpck_empty(struct snp_msg_desc *mdesc)
> +{
> + char zero_key[VMPCK_KEY_LEN] = {0};
Nitpick: I think this could be a static const.
> +
> + if (mdesc->vmpck)
> + return !memcmp(mdesc->vmpck, zero_key, VMPCK_KEY_LEN);
> +
> + return true;
> +}
...
Powered by blists - more mailing lists