[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] linux-4.7.* under xen-4.6.* gives "unhandled page fault (ec=0000)" at boot. -- Root cause found.



Den 17. aug. 2016 21:56, I wrote (to xen-users, as I am no developer):
> I'm on gentoo, running gentoo-sources kernel for dom0.
>
> I am unable to run gentoo-sources-4.7.{0,1}. I'm running under xen,
> currently at 4.6.3-r1

I am now on linux gentoo-sources-4.7.2, and the bug is stil present.

I have done some digging on my own, and found that protecting two instances of 
" for_each_efi_memory_desc(md) {" with something like "if( efi.memmap.map != 
NULL) {" will allow my dom0 to boot and run.


My line-numbers may be a bit off due to copious use of pr_info.

The locations are:
- linux/arch/x86/platform/efi/efi.c line 121 in function efi_find_mirror()
- /usr/src/linux/arch/x86/platform/efi/quirks.c line 253 in function
efi_free_boot_services(void)

Searching the web lead me first to a solution which I believe to be
wrong, changing the comparison operator in for_each_efi_memory_desc. It
also lead me to someone mentioning that efi.memmap.map is not used when
running under xen. That info may also be bogus for all I know.

As an example, the latter function now (correct ? ) looks like this
after my mis-treatment:

void __init efi_free_boot_services(void)
{
    efi_memory_desc_t *md;
    if( efi.memmap.map != NULL) {
      pr_info("efi_free_boot_services: efi.memmap.map is
%p\n",efi.memmap.map);
      for_each_efi_memory_desc(md) {
        unsigned long long start = md->phys_addr;
        unsigned long long size = md->num_pages << EFI_PAGE_SHIFT;
       
        if (md->type != EFI_BOOT_SERVICES_CODE &&
        md->type != EFI_BOOT_SERVICES_DATA)
          continue;
       
        /* Do not free, someone else owns it: */
        if (md->attribute & EFI_MEMORY_RUNTIME)
          continue;
       
        free_bootmem_late(start, size);
      }
    } else {
            pr_info("efi_free_boot_services: efi.memmap.map is (null)\n");
    }
   
    efi_unmap_memmap();
}


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
https://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.