On Tue, 21 May 2019 at 14:20, Bradford, Robert <robert.bradford@xxxxxxxxx> wrote: > > On Tue, 2019-04-16 at 10:59 +0100, Rob Bradford wrote: > > Only try and access the EFI configuration tables if there there are > > any > > reported. This allows EFI to be continued to used on systems where > > there > > are no configuration table entries. > > > > v2: Move return on nr_tables==0 earlier > > > > Signed-off-by: Rob Bradford <robert.bradford@xxxxxxxxx> > > --- > > arch/x86/platform/efi/quirks.c | 3 +++ > > drivers/firmware/efi/efi.c | 3 +++ > > 2 files changed, 6 insertions(+) > > > > diff --git a/arch/x86/platform/efi/quirks.c > > b/arch/x86/platform/efi/quirks.c > > index 95e77a667ba5..6b9a4792242b 100644 > > --- a/arch/x86/platform/efi/quirks.c > > +++ b/arch/x86/platform/efi/quirks.c > > @@ -471,6 +471,9 @@ int __init efi_reuse_config(u64 tables, int > > nr_tables) > > void *p, *tablep; > > struct efi_setup_data *data; > > > > + if (nr_tables == 0) > > + return 0; > > + > > if (!efi_setup) > > return 0; > > > > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c > > index 415849bab233..185424a8b879 100644 > > --- a/drivers/firmware/efi/efi.c > > +++ b/drivers/firmware/efi/efi.c > > @@ -628,6 +628,9 @@ int __init > > efi_config_init(efi_config_table_type_t *arch_tables) > > void *config_tables; > > int sz, ret; > > > > + if (efi.systab->nr_tables == 0) > > + return 0; > > + > > if (efi_enabled(EFI_64BIT)) > > sz = sizeof(efi_config_table_64_t); > > else > > Any chance of getting this into the tree? Without this we can't boot > the kernel in EFI mode on our KVM based hypervisor[1] & firmware[2] as > it does not provide any tables, nor does it need to. > Apologies for the delay. I will pick it up today.