Mailing List Archive

Creating guest with less than 4MB RAM causes Xen to crash immediately
Keir, Tim and IanJ

When user creates a guest with less than 4MB of memory, Xen crashes
immediately. That's because:

* libxc round up memory to 4MB and build page table for the guest,
see xc_dom_x86.c:count_pgtables. So the virt_pgtab_end is at
least 0x400000.
* When Xen try to pin page table for guest, it will scan through
page table and invoke arch/x86/mm.c:get_page_type, which has a
assertion that if any error happens the rc should only be
-EINVAL, otherwise Xen crashes.
* For a guest with less than 4MB memory, some of the entries in
the page table are not valid, causing __get_page_type to fail
with -EBUSY, which causes the assertion to fail.

In practice few people will create a DomU with less than 4MB ram. I
encounter this because I was trying to boot up ~3K+ minios.

Xen console log and xl output files attached.


Wei.