Skip to contentSkip to conversation

Crash when booting 32-bit kernel with pvgrub

DISCUSSION Jeremy Fitzhardinge 3 participants 5 messages Aug 14, 2009 – Sep 4, 2009

lore
Share & tools
lore
#0 lore raw

I'm trying to boot a 32-bit PV guest on a 64-bit xen+dom0 system, and it crashes as soon as I select a kernel:

Booting 'Fedora (2.6.27.19-170.2.35.fc10.i686.PAE)'

root (hd0,0)
Error ENOENT when reading the backend path device/vkbd/0/backend
Page fault at linear address 0x1c, eip 0x4b6ee, regs 0xb4ff7c, sp 0xb4fff0, our_sp 0xb4ff50, code 2
Thread: kbdfront
EIP: 4b6ee, EFLAGS 10002.
EBX: 746f6f72 ECX: 00000013 EDX: 00000000
ESI: 00b3fe98 EDI: 00000001 EBP: 00b4ffb0 EAX: 00000000
DS: c2c2e021 ES: e021 orig_eax: ffffffff, eip: 0004b6ee
CS: 1e019 EFLAGS: 00010002 esp: 00b4fff0 ss: 37eb
base is 0xb4ffb0 caller is 0x37eb
base is 0xb4fff0 caller is 0x31ad

b4ffe0: c2 c2 c2 c2 8f 37 00 00 90 05 00 00 40 20 00 98
b4fff0: 00 00 00 00 ad 31 00 00 94 fe b3 00 00 00 00 00
b50000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b50010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

b4ffa0: ff ff ff ff ee b6 04 00 19 e0 01 00 02 00 01 00
b4ffb0: f0 ff b4 00 eb 37 00 00 00 00 00 00 01 00 00 00
b4ffc0: c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
b4ffd0: c2 c2 c2 c2 c2 c2 c2 00 c2 c2 c2 c2 c2 c2 c2 c2

4b6d0: e5 8b 45 08 c7 40 1c 00 00 00 00 c7 40 20 00 00 4b6e0: 00 00 83 60 18 fe 5d c3 55 89 e5 8b 45 08 c7 40 4b6f0: 1c 00 00 00 00 c7 40 20 00 00 00 00 83 48 18 01 4b700: 5d c3 55 89 e5 53 83 ec 14 a1 e0 e1 94 00 8b 58 Pagetable walk from virt 1c, base 9d7000:
L3 = 0000000032520027 (0x9d8000) [offset = 0]
L2 = 000000003251e067 (0x9da000) [offset = 0]

    L1 = 0000000000000000 [offset = 0]

Any clues?

Thanks,
J

#1 lore raw

Not sure if this is the actual cause of the problem but since you didn't mention it explicitly: Did you build a separate 32bit pvgrub? pvgrub does not support 32bit/64bit switching so if you need to change architectures you need to compile another version of it...

Best regards,
Christian

Quoted 42 lines · Jeremy Fitzhardinge

I'm trying to boot a 32-bit PV guest on a 64-bit xen+dom0 system, and it crashes as soon as I select a kernel:

Booting 'Fedora (2.6.27.19-170.2.35.fc10.i686.PAE)'

root (hd0,0)
Error ENOENT when reading the backend path device/vkbd/0/backend
Page fault at linear address 0x1c, eip 0x4b6ee, regs 0xb4ff7c, sp 0xb4fff0, our_sp 0xb4ff50, code 2
Thread: kbdfront
EIP: 4b6ee, EFLAGS 10002.
EBX: 746f6f72 ECX: 00000013 EDX: 00000000
ESI: 00b3fe98 EDI: 00000001 EBP: 00b4ffb0 EAX: 00000000
DS: c2c2e021 ES: e021 orig_eax: ffffffff, eip: 0004b6ee
CS: 1e019 EFLAGS: 00010002 esp: 00b4fff0 ss: 37eb
base is 0xb4ffb0 caller is 0x37eb
base is 0xb4fff0 caller is 0x31ad

b4ffe0: c2 c2 c2 c2 8f 37 00 00 90 05 00 00 40 20 00 98
b4fff0: 00 00 00 00 ad 31 00 00 94 fe b3 00 00 00 00 00
b50000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b50010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

b4ffa0: ff ff ff ff ee b6 04 00 19 e0 01 00 02 00 01 00
b4ffb0: f0 ff b4 00 eb 37 00 00 00 00 00 00 01 00 00 00
b4ffc0: c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
b4ffd0: c2 c2 c2 c2 c2 c2 c2 00 c2 c2 c2 c2 c2 c2 c2 c2

4b6d0: e5 8b 45 08 c7 40 1c 00 00 00 00 c7 40 20 00 00 4b6e0: 00 00 83 60 18 fe 5d c3 55 89 e5 8b 45 08 c7 40 4b6f0: 1c 00 00 00 00 c7 40 20 00 00 00 00 83 48 18 01 4b700: 5d c3 55 89 e5 53 83 ec 14 a1 e0 e1 94 00 8b 58 Pagetable walk from virt 1c, base 9d7000:
L3 = 0000000032520027 (0x9d8000) [offset = 0]
L2 = 000000003251e067 (0x9da000) [offset = 0]

    L1 = 0000000000000000 [offset = 0]

Any clues?

Thanks,
J

#2 lore raw
Quoted 4 lines · Christian Tramnitz

Not sure if this is the actual cause of the problem but since you didn't mention it explicitly: Did you build a separate 32bit pvgrub? pvgrub does not support 32bit/64bit switching so if you need to change architectures you need to compile another version of it...

It's using

kernel = "/usr/lib/xen/boot/pv-grub-x86_32.gz"

which I'm presuming is correct.

J

#3 lore raw
In reply to Jeremy Fitzhardinge
Quoted 8 lines · Jeremy Fitzhardinge, le Fri 14 Aug 2009 15:44:49 -0700, a écrit :

I'm trying to boot a 32-bit PV guest on a 64-bit xen+dom0 system, and it crashes as soon as I select a kernel:

Booting 'Fedora (2.6.27.19-170.2.35.fc10.i686.PAE)'

root (hd0,0)
Error ENOENT when reading the backend path device/vkbd/0/backend

I guess you do not have pvfb enable?

Quoted 2 lines

Page fault at linear address 0x1c, eip 0x4b6ee, regs 0xb4ff7c, sp 0xb4fff0, our_sp 0xb4ff50, code 2
Thread: kbdfront

Oops, dev->backend isn't allocated at this point and dev isn't zeroed, here is a patch.

Samuel

Zero kbdfront and fbfront dev structures to fix free_kbdfront() and free_fbfront() on error.

extras/mini-os/fbfront.c +2 -0
diff -r 41b2c4e4f674 extras/mini-os/fbfront.c
@@ -80,6 +80,7 @@
     printk("******************* KBDFRONT for %s **********\n\n\n", nodename);
 
     dev = malloc(sizeof(*dev));
+    memset(dev, 0, sizeof(*dev));
     dev->nodename = strdup(nodename);
 #ifdef HAVE_LIBC
     dev->fd = -1;
@@ -403,6 +404,7 @@
     printk("******************* FBFRONT for %s **********\n\n\n", nodename);
 
     dev = malloc(sizeof(*dev));
+    memset(dev, 0, sizeof(*dev));
     dev->nodename = strdup(nodename);
 #ifdef HAVE_LIBC
     dev->fd = -1;
#4 lore raw
Quoted 6 lines · Samuel Thibault
Quoted 4 lines · Jeremy Fitzhardinge, le Fri 14 Aug 2009 15:44:49 -0700, a écrit :

I'm trying to boot a 32-bit PV guest on a 64-bit xen+dom0 system, and it crashes as soon as I select a kernel:

Quoted 7 lines
Quoted 5 lines

Booting 'Fedora (2.6.27.19-170.2.35.fc10.i686.PAE)'

root (hd0,0)
Error ENOENT when reading the backend path device/vkbd/0/backend

I guess you do not have pvfb enable?

No.

Quoted 6 lines
Quoted 3 lines

Page fault at linear address 0x1c, eip 0x4b6ee, regs 0xb4ff7c, sp 0xb4fff0, our_sp 0xb4ff50, code 2
Thread: kbdfront

Oops, dev->backend isn't allocated at this point and dev isn't zeroed, here is a patch.

Unfortunately this didn't solve the problem for me; it looks unchanged with the patch applied.

J

Quoted 29 lines

Samuel

Zero kbdfront and fbfront dev structures to fix free_kbdfront() and free_fbfront() on error.

diff -r 41b2c4e4f674 extras/mini-os/fbfront.c

extras/mini-os/fbfront.c +2 -0
@@ -80,6 +80,7 @@
     printk("******************* KBDFRONT for %s **********\n\n\n", nodename);
 
     dev = malloc(sizeof(*dev));
+    memset(dev, 0, sizeof(*dev));
     dev->nodename = strdup(nodename);
 #ifdef HAVE_LIBC
     dev->fd = -1;
@@ -403,6 +404,7 @@
     printk("******************* FBFRONT for %s **********\n\n\n", nodename);
 
     dev = malloc(sizeof(*dev));
+    memset(dev, 0, sizeof(*dev));
     dev->nodename = strdup(nodename);
 #ifdef HAVE_LIBC
     dev->fd = -1;