Skip to contentSkip to conversation

efi: don't issue error message when booted under xen

PATCH In review Juergen Gross 2 participants 2 messages May 8, 2017 – May 15, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: don't issue error message when booted under xen

When booted as Xen dom0 there won't be an EFI memmap allocated. Avoid issuing an error message in this case:

[    0.144079] efi: Failed to allocate new EFI memmap
---
 arch/x86/platform/efi/quirks.c | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/platform/efi/quirks.c +3 -0
index 26615991d69c..e0cf95a83f3f 100644
@@ -360,6 +360,9 @@ void __init efi_free_boot_services(void)
 		free_bootmem_late(start, size);
 	}
 
+	if (!num_entries)
+		return;
+
 	new_size = efi.memmap.desc_size * num_entries;
 	new_phys = efi_memmap_alloc(num_entries);
 	if (!new_phys) {
Signature · 1 line
2.12.0
#1 lore raw
Quoted 9 lines · Juergen Gross

When booted as Xen dom0 there won't be an EFI memmap allocated. Avoid issuing an error message in this case:

[    0.144079] efi: Failed to allocate new EFI memmap
---
 arch/x86/platform/efi/quirks.c | 3 +++
 1 file changed, 3 insertions(+)

Thanks. I've applied this for the urgent branch because it's trivial and we've had issues before where these kinds of error messages mess up an otherwise clean boot screen.