diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-10-01 18:17:36 +0300 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-11-18 11:14:09 +0300 |
commit | d85e3e34940788578eeffd94e8b7e1d28e7278e9 (patch) | |
tree | 0765028787e17cc954ee9717a1cd1fcdc3dacd53 /drivers/firmware/efi/fdtparams.c | |
parent | fdc6d38d64a20c542b1867ebeb8dd03b98829336 (diff) | |
download | linux-d85e3e34940788578eeffd94e8b7e1d28e7278e9.tar.xz |
efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures
Currently, the EFI_PARAVIRT flag is only used by Xen dom0 boot on x86,
even though other architectures also support pseudo-EFI boot, where the
core kernel is invoked directly and provided with a set of data tables
that resemble the ones constructed by the EFI stub, which never actually
runs in that case.
Let's fix this inconsistency, and always set this flag when booting dom0
via the EFI boot path. Note that Xen on x86 does not provide the EFI
memory map in this case, whereas other architectures do, so move the
associated EFI_PARAVIRT check into the x86 platform code.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/fdtparams.c')
-rw-r--r-- | drivers/firmware/efi/fdtparams.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/firmware/efi/fdtparams.c b/drivers/firmware/efi/fdtparams.c index e901f8564ca0..0ec83ba58097 100644 --- a/drivers/firmware/efi/fdtparams.c +++ b/drivers/firmware/efi/fdtparams.c @@ -30,11 +30,13 @@ static __initconst const char name[][22] = { static __initconst const struct { const char path[17]; + u8 paravirt; const char params[PARAMCOUNT][26]; } dt_params[] = { { #ifdef CONFIG_XEN // <-------17------> .path = "/hypervisor/uefi", + .paravirt = 1, .params = { [SYSTAB] = "xen,uefi-system-table", [MMBASE] = "xen,uefi-mmap-start", @@ -121,6 +123,8 @@ u64 __init efi_get_fdt_params(struct efi_memory_map_data *mm) pr_err("Can't find property '%s' in DT!\n", pname); return 0; } + if (dt_params[i].paravirt) + set_bit(EFI_PARAVIRT, &efi.flags); return systab; } notfound: |