diff mbox

[Bug] 4.12 kernel dom0 always reboot on xen 4.9 efi

Message ID 8082FF9BCB2B054996454E47167FF4EC1C59CA0C@SHSMSX104.ccr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zhang, Xiong Y Aug. 10, 2017, 11:09 a.m. UTC
On my SKL/KBL machine,  upstream 4.12 kernel dom0 couldn't boot up using xen.efi which is xen 4.9


(1)     Upstream 4.11 kernel doesn't have such issue.

(2)     Upstream 4.12 kernel on my native uefi machine could boot up.

After some debug, I have some finding:
firmware/efi.c: Reinit efi global variable

    efi is a global variable, some of efi members is initialized to
INVALID_TABLE_ADDR when efi is defined. But efi is zero when
setup_arch() begin running for unknown reason.

    This patch set it again to avoid kernel panic. This fix 4.12 kernel dom0
    couldn't boot up on xen.efi 4.9.

thanks

Comments

Jan Beulich Aug. 10, 2017, 1:37 p.m. UTC | #1
>>> On 10.08.17 at 13:09, <xiong.y.zhang@intel.com> wrote:
> On my SKL/KBL machine,  upstream 4.12 kernel dom0 couldn't boot up using 
> xen.efi which is xen 4.9
> 
> 
> (1)     Upstream 4.11 kernel doesn't have such issue.
> 
> (2)     Upstream 4.12 kernel on my native uefi machine could boot up.
> 
> After some debug, I have some finding:
> firmware/efi.c: Reinit efi global variable
> 
>     efi is a global variable, some of efi members is initialized to
> INVALID_TABLE_ADDR when efi is defined. But efi is zero when
> setup_arch() begin running for unknown reason.

Well, I don't think that's a precise description, but anyway the
problem has been discussed before, and a patch is available
(but may not have landed in the 4.12.x stable tree yet, as
originally it was assumed to only be cosmetic) - look for
"x86/xen/efi: Initialize only the EFI struct members used by
Xen".

Jan
Konrad Rzeszutek Wilk Aug. 10, 2017, 6:10 p.m. UTC | #2
On Thu, Aug 10, 2017 at 11:09:20AM +0000, Zhang, Xiong Y wrote:
> On my SKL/KBL machine,  upstream 4.12 kernel dom0 couldn't boot up using xen.efi which is xen 4.9
> 
> 
> (1)     Upstream 4.11 kernel doesn't have such issue.
> 
> (2)     Upstream 4.12 kernel on my native uefi machine could boot up.
> 
> After some debug, I have some finding:
> firmware/efi.c: Reinit efi global variable
> 
>     efi is a global variable, some of efi members is initialized to
> INVALID_TABLE_ADDR when efi is defined. But efi is zero when
> setup_arch() begin running for unknown reason.
> 
>     This patch set it again to avoid kernel panic. This fix 4.12 kernel dom0
>     couldn't boot up on xen.efi 4.9.
> 
> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> index b372aad..27bbcb4 100644
> --- a/drivers/firmware/efi/efi.c
> +++ b/drivers/firmware/efi/efi.c
> @@ -474,6 +474,9 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz,
>         void *tablep;
>         int i;
> 
> +       efi.mps = efi.acpi = efi.acpi20 = efi.smbios = efi.smbios3 = efi.sal_systab =
> +       efi.boot_info = efi.hcdp = efi.uga = efi.uv_systab = efi.fw_vendor =
> +       efi.esrt= efi.properties_table = efi.rng_seed = efi.mem_attr_table = EFI_INVALID_TABLE_ADDR;
> 
> why efi is zero at setup_arch() begin running ? who will clear it ?

See arch/x86/xen/efi.c
> 
> thanks

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
diff mbox

Patch

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index b372aad..27bbcb4 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -474,6 +474,9 @@  int __init efi_config_parse_tables(void *config_tables, int count, int sz,
        void *tablep;
        int i;

+       efi.mps = efi.acpi = efi.acpi20 = efi.smbios = efi.smbios3 = efi.sal_systab =
+       efi.boot_info = efi.hcdp = efi.uga = efi.uv_systab = efi.fw_vendor =
+       efi.esrt= efi.properties_table = efi.rng_seed = efi.mem_attr_table = EFI_INVALID_TABLE_ADDR;

why efi is zero at setup_arch() begin running ? who will clear it ?