Re: [PATCH v13 19/19] x86/efi: EFI stub DRTM launch support for Secure Launch
From: Ard Biesheuvel
Date: Wed Apr 09 2025 - 05:16:55 EST
On Wed, 9 Apr 2025 at 00:35, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
>
> ..snip..
> > > > @@ -925,6 +1014,11 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
> > > > goto fail;
> > > > }
> > > >
> > > > +#if (IS_ENABLED(CONFIG_SECURE_LAUNCH))
> > > > + /* If a Secure Launch is in progress, this never returns */
> > > > + efi_secure_launch(boot_params);
> > > > +#endif
> > > > +
> > > > /*
> > > > * Call the SEV init code while still running with the firmware's
> > > > * GDT/IDT, so #VC exceptions will be handled by EFI.
> > >
> > > efi_set_u64_form()?
> > >
> > > What the heck is that? If it actually involves two u32 packed into a 64 field, why not simply do two stores?
> > >
> >
> > Well the story is this. The EFI maintainers asked me to use the
> > efi_set_u64_split() type functions (this one splits a u64 into 2 u32). I
> > went to look and there was no function that did the opposite action so I
> > added it. The original function was called efi_set_u64_split() so
> > efi_set_u64_form() was what I came up with. I can name it anything that is
> > desired.
>
> Hey Peter,
>
> Is there anything in particular that needs to be done to this patch?
>
If anyone feels strongly enough about this, we can fix it in a
follow-up patch. The code works as expected, so no need to derail this
series even further.