Re: [PATCH v3 02/17] x86/efi: Drop redundant EFI_PARAVIRT check

Mike Rapoport
2026-04-28T08:21:52Z

On Thu, Apr 23, 2026 at 05:20:27PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
>
> efi_memblock_x86_reserve_range() exits early if EFI_PARAVIRT is set, so
> there is no point in checking it a second time further down.
>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
> arch/x86/platform/efi/efi.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 0c39adb96b91..1b7a0cd54d08 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -211,11 +211,9 @@ int __init efi_memblock_x86_reserve_range(void)
> data.desc_size = e->efi_memdesc_size;
> data.desc_version = e->efi_memdesc_version;
>
> - if (!efi_enabled(EFI_PARAVIRT)) {
> - rv = efi_memmap_init_early(&data);
> - if (rv)
> - return rv;
> - }
> + rv = efi_memmap_init_early(&data);
> + if (rv)
> + return rv;
>
> if (add_efi_memmap || do_efi_soft_reserve())
> do_add_efi_memmap();
> --
> 2.54.0.rc2.544.gc7ae2d5bb8-goog
>

--
Sincerely yours,
Mike.