Hi,

I have a pvgrub image of grub (tip of
https://git.savannah.gnu.org/git/grub.git) configured and built as
follows:

./configure --prefix=/opt/grub --target=i386 --with-platform=xen && \
make && \
sudo make install && \
sudo /opt/grub/bin/grub-mkimage -O i386-xen \
    -c /opt/grub/etc/grub-bootstrap.cfg \
    -m /opt/grub/share/memdisk.tar \
    -o /opt/grub/lib/grub-i386-xen.bin \
    -p /boot/grub -v /opt/grub/lib/grub/i386-xen/*.mod

When booted as a Xen PV guest from a 64-bit Debian jessie host (xen
4.8.1), this works fine as long as memory of the guest is set to
3,927MiB or less. At 3,928MiB or above the grub image immediately
crashes with the following text from "xl dmesg":

(XEN) d21v0: unhandled page fault (ec=0003)
(XEN) Pagetable walk from 00000000f580203a:
(XEN)  L4[0x000] = 0000001f4ae4c027 00000000000f504c
(XEN)  L3[0x003] = 0000001f4ae50027 00000000000f5050
(XEN)  L2[0x1ac] = 000000401e4000a1 ffffffffffffffff (PSE)
(XEN) domain_crash_sync called from entry.S: fault at ffff82d080235368 
entry.o#compat_create_bounce_frame+0xd9/0xf1
(XEN) Domain 21 (vcpu#0) crashed on cpu#12:
(XEN) ----[ Xen-4.8.1  x86_64  debug=n   Not tainted ]----
(XEN) CPU:    12
(XEN) RIP:    e019:[<00000000000071be>]
(XEN) RFLAGS: 0000000000000203   EM: 1   CONTEXT: pv guest (d21v0)
(XEN) rax: 00000000f580202b   rbx: 0000000000000000   rcx: 000000000000000f
(XEN) rdx: 000000000040bdf0   rsi: 0000000000000010   rdi: 000000000040bdf0
(XEN) rbp: 000000000040bda8   rsp: 000000000040bd90   r8:  ffff83400e397d48
(XEN) r9:  ffff82d080196c63   r10: ffff83229c470b80   r11: 0000000000000246
(XEN) r12: ffff83400e39a140   r13: ffff82d08031ab40   r14: ffff82d080304e80
(XEN) r15: 0002bcb7963ee3bb   cr0: 000000008005003b   cr4: 00000000003526e0
(XEN) cr3: 00000022eaf15000   cr2: 00000000f580203a
(XEN) ds: e021   es: e021   fs: e021   gs: e021   ss: e021   cs: e019
(XEN) Guest stack trace from esp=0040bd90:
(XEN)   00000003 000071be 0001e019 00010003 00000010 00000010 0040bdd8 00000379
(XEN)   00000001 00000000 00000000 00000030 0f433629 00000000 0040bdf0 0000000b
(XEN)   00008d37 0000143d 0040be18 0000069e 0c564f96 00000757 000f4240 0040be2c
(XEN)   00000001 00000000 00000000 0000000b f489f000 00000000 0040be28 f4336420
(XEN)   f489f000 00000000 0040be38 00001f1e 756e6547 756e6547 0040be38 00000000
(XEN)   00000000 f4336420 0040bfb8 000010fc 00000000 00000024 bf740000 0000001e
(XEN)   f5800000 0000001e 12d92007 f5801000 000f5051 00000000 000f5a00 00000000
(XEN)   000f5804 00000000 000f5051 00000000 f5802000 0000001e f5803000 00000000
(XEN)   0000094d 00000000 000007ad 00000000 000f504c 00000000 000f5a00 00000000
(XEN)   0000094d 00000000 00000942 00569000 00000000 00000000 00000000 00000001
(XEN)   00007ff0 00000001 00000000 0040d000 000007ad 00000000 00000004 00000000
(XEN)   00000001 00000000 00000000 00000002 01f4ae4c 00000000 00000005 01f4ae4c
(XEN)   00000000 00000004 01ebf742 00000000 4a9ff001 0000001f 00000940 00000000
(XEN)   bf740001 0000001e 000f57ff 00000000 4a9fe001 0000001f 00000941 00000000
(XEN)   bf741001 0000001e 000f57fe 00000000 00000000 00000000 00000000 00000000
(XEN)   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
(XEN)   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
(XEN)   0093f000 00000000 0040bff8 00006d87 00000000 00000000 00000000 00000000
(XEN)   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
(XEN)   0093f000 00000000 00000000 00000011 d4f4eb20 00d8418c 00000000 00000000

Is it expected that a guest with this much memory cannot be booted
with 32-bit grub?

64-bit guests can be booted regardless of memory amount with a
grub-x86_64-xen.bin built as above but s/i386/x86_64/g.

If I try to boot a 32-bit guest with this 64-bit grub, it does
manage to start and read guest's grub.cfg but then as soon as the
guest's 32-bit PAE kernel is selected it fails to boot with
"Incompatible architecture: 2". So it seems I do need both 32- and
64-bit grub images depending on which architecture of kernel the
guest will have. But is it expected that the 32-bit grub crashes
with >= 3,928MiB memory?

Thanks,
Andy

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to