Re: [PATCH 2/7] x86/efi: Drop redundant EFI_PARAVIRT check

From: Thomas Huth

Date: Fri Apr 10 2026 - 07:36:43 EST


On 10/04/2026 09.59, Ard Biesheuvel wrote:
From: Ard Biesheuvel <ardb@xxxxxxxxxx>

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@xxxxxxxxxx>
---
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 d84c6020dda1..b60f8454a1ec 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;

Maybe add:

Fixes: d85e3e3494078 ("efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures")

?

Anyway,
Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>