virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: bert hubert <bert.hubert@netherlabs.nl>
Cc: virtualization@lists.osdl.org
Subject: Re: lhype on 2.6.20-rc2: Guest didn't handle trap 6 at c071b594 (cr2=00000000,err=0)
Date: Fri, 29 Dec 2006 10:34:43 +1100	[thread overview]
Message-ID: <1167348883.30506.47.camel@localhost.localdomain> (raw)
In-Reply-To: <20061228114542.GB18047@outpost.ds9a.nl>

[-- 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

  reply	other threads:[~2006-12-28 23:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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     ` Rusty Russell [this message]
2006-12-29  9:54       ` bert hubert
2006-12-29 11:05         ` bert hubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1167348883.30506.47.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=bert.hubert@netherlabs.nl \
    --cc=virtualization@lists.osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).