virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0)
@ 2006-12-27 13:25 bert hubert
  2006-12-28  0:43 ` Zachary Amsden
  2006-12-28  2:23 ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0) Rusty Russell
  0 siblings, 2 replies; 7+ messages in thread
From: bert hubert @ 2006-12-27 13:25 UTC (permalink / raw)
  To: virtualization

Hi everybody,

Attracted by the puppies, I'm trying to run lhype. The patch applies cleanly
to 2.6.20-rc2, my .config is in accord with lhype.txt, but when I try to
launch an instance, I get this:

$ sudo drivers/lhype/lhype_add 64m 0 vmlinux --tunnet=192.168.19.1 --block=linux.img root=/dev/lhba
lhype_add: Failed to get DMA buffer from 0xb7fff008: No such file or directory
lhype_add: network: no dma buffer!: No such file or directory
lhype_add: Running guest failed: No such file or directory

When I subsequently retry, I get the same, but third and following tries
only give:

lhype_add: Running guest failed: No such file or directory

$ dmesg | tail
lhype: mapped hypervisor at ffc00000
(...)
Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0)
Guest 0 dead drivers/lhype/init.c:424

$ file linux.img
linux.img: x86 boot sector, LInux i386 boot LOader

$ file vmlinux
vmlinux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped

Any clues? I think I've followed lhype.txt to the letter.

Thanks!

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0)
  2006-12-27 13:25 lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
@ 2006-12-28  0:43 ` Zachary Amsden
  2006-12-28  2:23 ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0) Rusty Russell
  1 sibling, 0 replies; 7+ messages in thread
From: Zachary Amsden @ 2006-12-28  0:43 UTC (permalink / raw)
  To: bert hubert; +Cc: virtualization

bert hubert wrote:
> Hi everybody,
>
> Attracted by the puppies, I'm trying to run lhype. The patch applies cleanly
> to 2.6.20-rc2, my .config is in accord with lhype.txt, but when I try to
> launch an instance, I get this:
>
> $ sudo drivers/lhype/lhype_add 64m 0 vmlinux --tunnet=192.168.19.1 --block=linux.img root=/dev/lhba
> lhype_add: Failed to get DMA buffer from 0xb7fff008: No such file or directory
> lhype_add: network: no dma buffer!: No such file or directory
> lhype_add: Running guest failed: No such file or directory
>
> When I subsequently retry, I get the same, but third and following tries
> only give:
>
> lhype_add: Running guest failed: No such file or directory
>
> $ dmesg | tail
> lhype: mapped hypervisor at ffc00000
> (...)
> Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0)
> Guest 0 dead drivers/lhype/init.c:424
>
> $ file linux.img
> linux.img: x86 boot sector, LInux i386 boot LOader
>
> $ file vmlinux
> vmlinux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped
>
> Any clues? I think I've followed lhype.txt to the letter.
>   

Well, I'm not an lhype expert, but the messages indicate a #UD, likely a 
BUG_ON assertion firing somewhere.  I'd try tracking down what function 
was at c071b594 in your kernel and look for assertions there and also at 
drivers/lhype/init.c to see what might have gone wrong.

Zach

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0)
  2006-12-27 13:25 lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
  2006-12-28  0:43 ` Zachary Amsden
@ 2006-12-28  2:23 ` Rusty Russell
  2006-12-28 11:45   ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
  1 sibling, 1 reply; 7+ messages in thread
From: Rusty Russell @ 2006-12-28  2:23 UTC (permalink / raw)
  To: bert hubert; +Cc: virtualization

On Wed, 2006-12-27 at 14:25 +0100, bert hubert wrote:
> Hi everybody,
> 
> Attracted by the puppies, I'm trying to run lhype. The patch applies cleanly
> to 2.6.20-rc2, my .config is in accord with lhype.txt, but when I try to
> launch an instance, I get this:
> 
> $ sudo drivers/lhype/lhype_add 64m 0 vmlinux --tunnet=192.168.19.1 --block=linux.img root=/dev/lhba
> lhype_add: Failed to get DMA buffer from 0xb7fff008: No such file or directory
> lhype_add: network: no dma buffer!: No such file or directory
> lhype_add: Running guest failed: No such file or directory
> 
> When I subsequently retry, I get the same, but third and following tries
> only give:
> 
> lhype_add: Running guest failed: No such file or directory
> 
> $ dmesg | tail
> lhype: mapped hypervisor at ffc00000
> (...)
> Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0)
> Guest 0 dead drivers/lhype/init.c:424

Hi Bert!

	Ah, this is your clue, here: looks like the kernel ran BUG() or
otherwise failed at address 0xc071b594...  can you send your .config and
I can see if I can reproduce?  Your System.map should indicate what's at
that address, to...

	I should really try to read out the BUG info in this case; I'll patch
something up today (I'm chasing James Morris' initrd bug at the moment).

Thanks!
Rusty.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0)
  2006-12-28  2:23 ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0) Rusty Russell
@ 2006-12-28 11:45   ` bert hubert
  2006-12-28 23:34     ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0) Rusty Russell
  0 siblings, 1 reply; 7+ messages in thread
From: bert hubert @ 2006-12-28 11:45 UTC (permalink / raw)
  To: Rusty Russell; +Cc: virtualization

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

On Thu, Dec 28, 2006 at 01:23:33PM +1100, Rusty Russell wrote:

> 	Ah, this is your clue, here: looks like the kernel ran BUG() or
> otherwise failed at address 0xc071b594...  can you send your .config and
> I can see if I can reproduce?  Your System.map should indicate what's at
> that address, to...

c071b562 T bootmem_bootmap_pages
c071b571 t get_mapsize
c071b588 t reserve_bootmem_core
c071b5e2 t free_bootmem_core

With some gdb trickery, this appears to be line 124 of mm/bootmem.c:

114     static void __init reserve_bootmem_core(bootmem_data_t *bdata, unsigned long addr,
115                                             unsigned long size)
116     {
117             unsigned long sidx, eidx;
118             unsigned long i;
119
120             /*
121              * round up, partially reserved pages are considered
122              * fully reserved.
123              */
124             BUG_ON(!size);

Attached is config.gz. Thanks Rusty!

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

[-- Attachment #2: config.gz --]
[-- Type: application/octet-stream, Size: 13005 bytes --]

[-- Attachment #3: Type: text/plain, Size: 165 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0)
  2006-12-28 11:45   ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
@ 2006-12-28 23:34     ` Rusty Russell
  2006-12-29  9:54       ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
  0 siblings, 1 reply; 7+ messages in thread
From: Rusty Russell @ 2006-12-28 23:34 UTC (permalink / raw)
  To: bert hubert; +Cc: virtualization

[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]

On Thu, 2006-12-28 at 12:45 +0100, bert hubert wrote:
> On Thu, Dec 28, 2006 at 01:23:33PM +1100, Rusty Russell wrote:
> 
> > 	Ah, this is your clue, here: looks like the kernel ran BUG() or
> > otherwise failed at address 0xc071b594...  can you send your .config and
> > I can see if I can reproduce?  Your System.map should indicate what's at
> > that address, to...
> 
> c071b562 T bootmem_bootmap_pages
> c071b571 t get_mapsize
> c071b588 t reserve_bootmem_core
> c071b5e2 t free_bootmem_core
> 
> With some gdb trickery, this appears to be line 124 of mm/bootmem.c:

Yep, my bad... As a bonus, your config also found a paravirt problem in
the raid code (patch sent upstream, and attached below).

Here's the two-liner patch (already rolled into the lhype.patch, so you
can simply update).

Thanks very much for the bug report!
Rusty.

diff -r 4ff048622391 arch/i386/kernel/lhype.c
--- a/arch/i386/kernel/lhype.c	Thu Dec 28 16:52:54 2006 +1100
+++ b/arch/i386/kernel/lhype.c	Fri Dec 29 10:21:20 2006 +1100
@@ -446,14 +446,16 @@ static __attribute_used__ __init void lh
 	acpi_disabled = 1;
 	acpi_ht = 0;
 #endif
-
-	INITRD_START = init_pg_tables_end;
-	INITRD_SIZE = lhype_page.initrd_size;
-	LOADER_TYPE = (LHYPE_LOADER_TYPE << 4) | LHYPE_LOADER_VERSION;
-
-	/* Bootmem puts allocator bitmap immediately after boot page tables,
-	   so tell it pagetables cover this, too. */
-	init_pg_tables_end += lhype_page.initrd_size;
+	if (lhype_page.initrd_size) {
+		INITRD_START = init_pg_tables_end;
+		INITRD_SIZE = lhype_page.initrd_size;
+		LOADER_TYPE = (LHYPE_LOADER_TYPE << 4) | LHYPE_LOADER_VERSION;
+
+		/* Bootmem puts allocator bitmap immediately after
+		   boot page tables, so tell it pagetables cover this, too. */
+		init_pg_tables_end += lhype_page.initrd_size;
+	}
+
 	start_kernel();
 }
 


[-- Attachment #2: raid-paravirt.patch --]
[-- Type: text/x-patch, Size: 684 bytes --]

Use correct macros in raid code, not raw asm.

This make sure it's paravirtualized correctly when CONFIG_PARAVIRT=y.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r 4ff048622391 drivers/md/raid6x86.h
--- a/drivers/md/raid6x86.h	Thu Dec 28 16:52:54 2006 +1100
+++ b/drivers/md/raid6x86.h	Fri Dec 29 10:09:38 2006 +1100
@@ -75,13 +75,14 @@ static inline unsigned long raid6_get_fp
 	unsigned long cr0;
 
 	preempt_disable();
-	asm volatile("mov %%cr0,%0 ; clts" : "=r" (cr0));
+	cr0 = read_cr0();
+	clts();
 	return cr0;
 }
 
 static inline void raid6_put_fpu(unsigned long cr0)
 {
-	asm volatile("mov %0,%%cr0" : : "r" (cr0));
+	write_cr0(cr0);
 	preempt_enable();
 }
 

[-- Attachment #3: Type: text/plain, Size: 165 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0)
  2006-12-28 23:34     ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0) Rusty Russell
@ 2006-12-29  9:54       ` bert hubert
  2006-12-29 11:05         ` bert hubert
  0 siblings, 1 reply; 7+ messages in thread
From: bert hubert @ 2006-12-29  9:54 UTC (permalink / raw)
  To: Rusty Russell; +Cc: virtualization

On Fri, Dec 29, 2006 at 10:34:43AM +1100, Rusty Russell wrote:

> Here's the two-liner patch (already rolled into the lhype.patch, so you
> can simply update).

We're getting further, but no cigar yet!

I now get this:

[    0.760000] PCI: System does not support PCI
[    0.760000] PCI: System does not support PCI
lhype_add: Failed to get DMA buffer from 0xb7fff008: No such file or directory
lhype_add: network: no dma buffer!: No such file or directory
[    0.820000] NET: Registered protocol family 2
[    0.820000] invalid opcode: 0000 [#1]
[    0.820000] Modules linked in:
[    0.820000] CPU:    0
[    0.820000] EIP:    0061:[<c0101223>]    Not tainted VLI
[    0.820000] EFLAGS: 00010246   (2.6.20-rc2 #0)
[    0.820000] EIP is at mwait_idle_with_hints+0x1e/0x3a
[    0.820000] eax: c0704008   ebx: 00000000   ecx: 00000000   edx: 00000000
[    0.820000] esi: 00000000   edi: c0704008   ebp: 4c687970   esp: c0705f74
[    0.820000] ds: 007b   es: 007b   ss: 0069
[    0.820000] Process swapper (pid: 0, ti=c0704000 task=c066c420 task.ti=c0704000)
[    0.820000] Stack: 00000000 c075502c c074a120 c0101333 c07066e1 c05d6677 c07061b8 c074a120 
[    0.820000]        c074b320 c0715522 00000000 00000000 00755000 00000001 00000000 00000000 
[    0.820000]        c074a120 c075502c 00000100 c075501c c074a020 92000000 0000000f c0670120 
[    0.820000] Call Trace:
[    0.820000]  [<c0101333>] cpu_idle+0x39/0x4e
[    0.820000]  [<c07066e1>] start_kernel+0x327/0x32b
[    0.820000]  [<c07061b8>] unknown_bootoption+0x0/0x202
[    0.820000]  [<c0715522>] lhype_init+0x37d/0x384
[    0.820000]  [<c0715529>] lhype_maybe_init+0x0/0x1a
[    0.820000]  =======================
[    0.820000] Code: 11 00 00 00 e8 e3 8c 01 00 83 c4 0c c3 57 56 53 89 c6 89 d3 89 e0 25 00 e0 ff ff 8d 78 08 8b 40 08 a8 08 75 1e 31 c9 89 f8 89 ca <0f> 01 c8 89 e0 25 00 e0 ff ff 8b 40 08 a8 08 75 07 89 f0 89 d9 
[    0.820000] EIP: [<c0101223>] mwait_idle_with_hints+0x1e/0x3a SS:ESP 0069:c0705f74
[    0.820000]  <0>Kernel panic - not syncing: Attempted to kill the idle task!
[    0.820000]  lhype_add: CRASH: Attempted to kill the idle task!

This appears to be this line:
        /* "monitor %eax,%ecx,%edx;" */
        asm volatile(
c010121d:       31 c9                   xor    %ecx,%ecx
c010121f:       89 f8                   mov    %edi,%eax
c0101221:       89 ca                   mov    %ecx,%edx
c0101223:       0f 01 c8                monitor %eax,%ecx,%edx

My *host* CPU certainly claims to have 'PNI', and thus I suspect 'monitor'.

I'll try to get this skipped so I can continue testing. Let me know if there
is anything I can do to help!

$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 1
cpu MHz         : 3000.174
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor ds_cpl cid xtpr
bogomips        : 6003.91
clflush size    : 64


-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0)
  2006-12-29  9:54       ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
@ 2006-12-29 11:05         ` bert hubert
  0 siblings, 0 replies; 7+ messages in thread
From: bert hubert @ 2006-12-29 11:05 UTC (permalink / raw)
  To: Rusty Russell; +Cc: virtualization

On Fri, Dec 29, 2006 at 10:54:12AM +0100, bert hubert wrote:
> We're getting further, but no cigar yet!
> I now get this:

> [    0.820000] EIP is at mwait_idle_with_hints+0x1e/0x3a

idle=halt did the trick!

[    0.290000] Booting paravirtualized kernel on lhype

Now to get me a decent root image.. but things are looking good!

Some errors about 'IRQ handler type mismatches', and the rtc appears to be
off: [ 10.070000] rtc-test rtc-test.0: setting the system clock to
1970-01-05 22:03:49 (425029)

Thanks Rusty! If there is anything specific that needs testing, let me know.

	Bert

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-12-29 11:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-27 13:25 lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
2006-12-28  0:43 ` Zachary Amsden
2006-12-28  2:23 ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0) Rusty Russell
2006-12-28 11:45   ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
2006-12-28 23:34     ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0) Rusty Russell
2006-12-29  9:54       ` lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000, err=0) bert hubert
2006-12-29 11:05         ` bert hubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).