Re: [PATCH] x86/ioremap: Map EFI runtime services data as encrypted for SEV
From: Borislav Petkov
Date: Tue Mar 10 2020 - 12:37:40 EST
On Tue, Mar 10, 2020 at 02:03:21PM +0100, Joerg Roedel wrote:
> See the comment added in the patch, walk_mem_res() does not iterate over
> the resource which contains EFI_RUNTIME_SERVICES_DATA, so
> __ioremap_check_encrypted() will not be called on that resource.
>
> walk_system_ram_range() might do the job, but calling it only for
> EFI_RUNTIME_SERVICES_DATA has some overhead.
Ok, then.
Let's wrap this in a new function which is called at the end of
__ioremap_check_mem() instead of trying to map EFI_RUNTIME_SERVICES_DATA
to IORES_DESC types and match the flags just so that we can preserve the
flow. And add a comment above it why we're doing this.
As you said on IRC, none of the IO resource ranges covers the
EFI_RUNTIME_SERVICES_DATA.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette