Hello Boris,
On 12/6/2023 11:08 AM, Borislav Petkov wrote:
On Wed, Nov 29, 2023 at 08:13:52PM -0600, Kalra, Ashish wrote:
It surely seems hard to follow up, so i am anyway going to clean it up by:
Adding the "probe" parameter to sev_platform_init() where the parameter
being true indicates that we only want to do SNP initialization on probe,
the same parameter will get passed on to
__sev_platform_init_locked().
That's exactly what you should *not* do - the probe parameter controls
whether
if (psp_init_on_probe)
__sev_platform_init_locked(error);
and so on should get executed or not.
Not actually.
The main use case for the probe parameter is to control if we want to do
legacy SEV/SEV-ES INIT during probe. There is a usage case where we want
to delay legacy SEV INIT till an actual SEV/SEV-ES guest is being
launched. So essentially the probe parameter controls if we want to
execute __sev_do_init_locked() or not.
We always want to do SNP INIT at probe time.
Thanks,
Ashish