LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [Lguest] lguest: unhandled trap
       [not found] <559519.75404.qm@web50707.mail.re2.yahoo.com>
@ 2008-10-19 23:39 ` Rusty Russell
  2008-10-20  4:15   ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 10+ messages in thread
From: Rusty Russell @ 2008-10-19 23:39 UTC (permalink / raw)
  To: lguest; +Cc: Tiago Maluta, linux-kernel, Jeremy Fitzhardinge

On Sunday 19 October 2008 10:36:51 Tiago Maluta wrote:
> Hi,
>
> I'm using 2.6.27-05323-g26e9a39 and when I try to use lguest:
>
> ~#Documentation/lguest/lguest 128 vmlinux
> lguest: unhandled trap 14 at 0xc0594f6a (0xff900000)

Yes, I found the same issue.  Does this fix it for you?

Subject: lguest: don't try DMI

dmi_scan_machine breaks under lguest; this is the simplest fix (though
ugly).  Perhaps this hurts Xen too?

Error:
	lguest: unhandled trap 14 at 0xc04edeae (0xffa00000)

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

diff -r 47449cd8e3d8 drivers/firmware/dmi_scan.c
--- a/drivers/firmware/dmi_scan.c	Fri Oct 17 12:14:40 2008 +1100
+++ b/drivers/firmware/dmi_scan.c	Fri Oct 17 20:54:30 2008 +1100
@@ -369,6 +369,11 @@ void __init dmi_scan_machine(void)
 	char __iomem *p, *q;
 	int rc;
 
+#ifdef CONFIG_PARAVIRT
+	if (strcmp(pv_info.name, "lguest") == 0)
+		goto error;
+#endif
+
 	if (efi_enabled) {
 		if (efi.smbios == EFI_INVALID_TABLE_ADDR)
 			goto error;




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

* Re: [Lguest] lguest: unhandled trap
  2008-10-19 23:39 ` [Lguest] lguest: unhandled trap Rusty Russell
@ 2008-10-20  4:15   ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 10+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-20  4:15 UTC (permalink / raw)
  To: Rusty Russell; +Cc: lguest, Tiago Maluta, linux-kernel

Rusty Russell wrote:
> On Sunday 19 October 2008 10:36:51 Tiago Maluta wrote:
>   
>> Hi,
>>
>> I'm using 2.6.27-05323-g26e9a39 and when I try to use lguest:
>>
>> ~#Documentation/lguest/lguest 128 vmlinux
>> lguest: unhandled trap 14 at 0xc0594f6a (0xff900000)
>>     
>
> Yes, I found the same issue.  Does this fix it for you?
>
> Subject: lguest: don't try DMI
>
> dmi_scan_machine breaks under lguest; this is the simplest fix (though
> ugly).  Perhaps this hurts Xen too?
>   

No, we deal with this by just reserving the ISA memory space and leaving 
it all zero.

    J

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

* Re: [Lguest] lguest: unhandled trap
  2008-10-20 22:48     ` Rusty Russell
@ 2008-10-20 23:22       ` Ingo Molnar
  0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-10-20 23:22 UTC (permalink / raw)
  To: Rusty Russell
  Cc: maluta_tiago, lguest, Jeremy Fitzhardinge, H. Peter Anvin,
	Thomas Gleixner, linux-kernel


* Rusty Russell <rusty@rustcorp.com.au> wrote:

> On Monday 20 October 2008 18:22:36 Ingo Molnar wrote:
> > * Rusty Russell <rusty@rustcorp.com.au> wrote:
> > > On Monday 20 October 2008 12:50:09 Tiago Maluta wrote:
> > > > --- On Sun, 10/19/08, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I'm using 2.6.27-05323-g26e9a39 and when I try to
> > > > >
> > > > > use lguest:
> > > > > > ~#Documentation/lguest/lguest 128 vmlinux
> > > > > > lguest: unhandled trap 14 at 0xc0594f6a (0xff900000)
> > > > >
> > > > > Yes, I found the same issue.  Does this fix it for you?
> > > >
> > > > Yes. This code fixed the problem.
> > >
> > > Thanks.  Ingo, can you push this?
> > >
> > > Subject: lguest: don't try DMI
> > >
> > > dmi_scan_machine breaks under lguest; this is the simplest fix (though
> > > ugly).  Perhaps this hurts Xen too?
> > >
> > > Error:
> > > 	lguest: unhandled trap 14 at 0xc04edeae (0xffa00000)
> > >
> > > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> > >
> > > diff -r 47449cd8e3d8 drivers/firmware/dmi_scan.c
> > > --- a/drivers/firmware/dmi_scan.c	Fri Oct 17 12:14:40 2008 +1100
> > > +++ b/drivers/firmware/dmi_scan.c	Fri Oct 17 20:54:30 2008 +1100
> > > @@ -369,6 +369,11 @@ void __init dmi_scan_machine(void)
> > >  	char __iomem *p, *q;
> > >  	int rc;
> > >
> > > +#ifdef CONFIG_PARAVIRT
> > > +	if (strcmp(pv_info.name, "lguest") == 0)
> > > +		goto error;
> > > +#endif
> > > +
> >
> > hm, could you give some more background please? I'm not subscribed to
> > the lguest list and the thread is not Cc:-ed to lkml (Cc:-ed it now).
> > The patch looks quite ugly because it adds a special-case.
> >
> > Was the problem introduced by:
> >
> > 5649b7c: x86: add DMI quirk for AMI BIOS which corrupts address 0xc000
> > during
> >
> > perhaps?
> >
> > i think Xen can withstand DMI scanning just fine.
> >
> > without having seen any background, my general feeling is that lguest
> > should either do what Xen does and reserve the classic BIOS ranges that
> > we probe - or we should make DMI scanning more robust by making sure
> > real RAM ranges are never probed. (only ranges that the BIOS itself
> > marks as reserved in the e820 map)
> >
> > (with exceptions for the first 4K perhaps.)
> >
> > 	Ingo
> 
> Yes, after this discussion I'm not even sure why it's triggering: even 
> if there's crap in the memory it should not fault.  Digging further.

we could also add an x86_quirks entry to skip the particular DMI scan 
that is causing problems. Would be nice to avoid it though, and fix 
lguest if possible.

	Ingo

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

* Re: [Lguest] lguest: unhandled trap
  2008-10-20  7:22   ` Ingo Molnar
  2008-10-20  7:43     ` Jeremy Fitzhardinge
@ 2008-10-20 22:48     ` Rusty Russell
  2008-10-20 23:22       ` Ingo Molnar
  1 sibling, 1 reply; 10+ messages in thread
From: Rusty Russell @ 2008-10-20 22:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: maluta_tiago, lguest, Jeremy Fitzhardinge, H. Peter Anvin,
	Thomas Gleixner, linux-kernel

On Monday 20 October 2008 18:22:36 Ingo Molnar wrote:
> * Rusty Russell <rusty@rustcorp.com.au> wrote:
> > On Monday 20 October 2008 12:50:09 Tiago Maluta wrote:
> > > --- On Sun, 10/19/08, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > > > > Hi,
> > > > >
> > > > > I'm using 2.6.27-05323-g26e9a39 and when I try to
> > > >
> > > > use lguest:
> > > > > ~#Documentation/lguest/lguest 128 vmlinux
> > > > > lguest: unhandled trap 14 at 0xc0594f6a (0xff900000)
> > > >
> > > > Yes, I found the same issue.  Does this fix it for you?
> > >
> > > Yes. This code fixed the problem.
> >
> > Thanks.  Ingo, can you push this?
> >
> > Subject: lguest: don't try DMI
> >
> > dmi_scan_machine breaks under lguest; this is the simplest fix (though
> > ugly).  Perhaps this hurts Xen too?
> >
> > Error:
> > 	lguest: unhandled trap 14 at 0xc04edeae (0xffa00000)
> >
> > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> >
> > diff -r 47449cd8e3d8 drivers/firmware/dmi_scan.c
> > --- a/drivers/firmware/dmi_scan.c	Fri Oct 17 12:14:40 2008 +1100
> > +++ b/drivers/firmware/dmi_scan.c	Fri Oct 17 20:54:30 2008 +1100
> > @@ -369,6 +369,11 @@ void __init dmi_scan_machine(void)
> >  	char __iomem *p, *q;
> >  	int rc;
> >
> > +#ifdef CONFIG_PARAVIRT
> > +	if (strcmp(pv_info.name, "lguest") == 0)
> > +		goto error;
> > +#endif
> > +
>
> hm, could you give some more background please? I'm not subscribed to
> the lguest list and the thread is not Cc:-ed to lkml (Cc:-ed it now).
> The patch looks quite ugly because it adds a special-case.
>
> Was the problem introduced by:
>
> 5649b7c: x86: add DMI quirk for AMI BIOS which corrupts address 0xc000
> during
>
> perhaps?
>
> i think Xen can withstand DMI scanning just fine.
>
> without having seen any background, my general feeling is that lguest
> should either do what Xen does and reserve the classic BIOS ranges that
> we probe - or we should make DMI scanning more robust by making sure
> real RAM ranges are never probed. (only ranges that the BIOS itself
> marks as reserved in the e820 map)
>
> (with exceptions for the first 4K perhaps.)
>
> 	Ingo

Yes, after this discussion I'm not even sure why it's triggering: even if 
there's crap in the memory it should not fault.  Digging further.

Cheers,
Rusty.

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

* Re: [Lguest] lguest: unhandled trap
  2008-10-20  9:14         ` Ian Campbell
  2008-10-20  9:27           ` Ingo Molnar
@ 2008-10-20 19:01           ` H. Peter Anvin
  1 sibling, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2008-10-20 19:01 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Ingo Molnar, Jeremy Fitzhardinge, Rusty Russell, maluta_tiago,
	lguest, Thomas Gleixner, linux-kernel

Ian Campbell wrote:
> 
> Wasn't there some concern about BIOSes which don't correctly reserve
> their DMI tables? Or don't even have e820 maps? H. Peter once said:
> 
>> It's pretty standard for 0xf0000...0x100000 to be marked RESERVED in
>> E820 on real hardware (including the system I'm typing on right now.)
>> It is so marked to indicate that hardware cannot be mapped into that
>> space.  However, you can't rely on this fact -- heck, you can't rely on
>> E820 even existing on a real machine.  I have specimens of real-life
>> machines that go both ways.
> 

Not only that, but the ACPI spec states explicitly that the ISA magic 
areas should be handled without relying on E820.

	-hpa

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

* Re: [Lguest] lguest: unhandled trap
  2008-10-20  9:14         ` Ian Campbell
@ 2008-10-20  9:27           ` Ingo Molnar
  2008-10-20 19:01           ` H. Peter Anvin
  1 sibling, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-10-20  9:27 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Jeremy Fitzhardinge, Rusty Russell, maluta_tiago, lguest,
	H. Peter Anvin, Thomas Gleixner, linux-kernel


* Ian Campbell <Ian.Campbell@eu.citrix.com> wrote:

> > Nevertheless if this is the only current roadblock for lguest then i 
> > wouldnt find it objectionable to make DMI scanning more robust that 
> > way - the two are complimentary. [ With an initial transitionary 
> > period of generating printks and WARN()s when we try to scan general 
> > RAM areas. ]
> 
> Wasn't there some concern about BIOSes which don't correctly reserve 
> their DMI tables? Or don't even have e820 maps? H. Peter once said:
> 
> > It's pretty standard for 0xf0000...0x100000 to be marked RESERVED in 
> > E820 on real hardware (including the system I'm typing on right 
> > now.) It is so marked to indicate that hardware cannot be mapped 
> > into that space.  However, you can't rely on this fact -- heck, you 
> > can't rely on E820 even existing on a real machine.  I have 
> > specimens of real-life machines that go both ways.

yes, that's a real concern, hence i suggested the printks and WARN()s to 
map such cases. And note that such problems are only an issue if it 
actually disables an essential DMI quirk. It's fair to say that if a box 
needs a DMI quirk to function properly that we can expect the BIOS to at 
least have a minimally correct memory map.

	Ingo

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

* Re: [Lguest] lguest: unhandled trap
  2008-10-20  7:53       ` Ingo Molnar
@ 2008-10-20  9:14         ` Ian Campbell
  2008-10-20  9:27           ` Ingo Molnar
  2008-10-20 19:01           ` H. Peter Anvin
  0 siblings, 2 replies; 10+ messages in thread
From: Ian Campbell @ 2008-10-20  9:14 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jeremy Fitzhardinge, Rusty Russell, maluta_tiago, lguest,
	H. Peter Anvin, Thomas Gleixner, linux-kernel

On Mon, 2008-10-20 at 09:53 +0200, Ingo Molnar wrote:
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> 
> > Ingo Molnar wrote:
> >> i think Xen can withstand DMI scanning just fine.
> >>
> >> without having seen any background, my general feeling is that lguest 
> >> should either do what Xen does and reserve the classic BIOS ranges 
> >> that we probe - or we should make DMI scanning more robust by making 
> >> sure real RAM ranges are never probed. (only ranges that the BIOS 
> >> itself marks as reserved in the e820 map)
> >
> > We considered doing that, but decided that there was so many other 
> > pieces of code around the place that assume that the ISA area is 
> > special, that just reserving it was the best course of action.
> 
> yeah - for _any_ virtual machine environment it's beneficial to look as 
> much like a normal PC as possible, because normal PCs is where the code 
> gets tested most.
> 
> Nevertheless if this is the only current roadblock for lguest then i 
> wouldnt find it objectionable to make DMI scanning more robust that way 
> - the two are complimentary. [ With an initial transitionary period of 
> generating printks and WARN()s when we try to scan general RAM areas. ]

Wasn't there some concern about BIOSes which don't correctly reserve
their DMI tables? Or don't even have e820 maps? H. Peter once said:

> It's pretty standard for 0xf0000...0x100000 to be marked RESERVED in
> E820 on real hardware (including the system I'm typing on right now.)
> It is so marked to indicate that hardware cannot be mapped into that
> space.  However, you can't rely on this fact -- heck, you can't rely on
> E820 even existing on a real machine.  I have specimens of real-life
> machines that go both ways.

Ian.



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

* Re: [Lguest] lguest: unhandled trap
  2008-10-20  7:43     ` Jeremy Fitzhardinge
@ 2008-10-20  7:53       ` Ingo Molnar
  2008-10-20  9:14         ` Ian Campbell
  0 siblings, 1 reply; 10+ messages in thread
From: Ingo Molnar @ 2008-10-20  7:53 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Rusty Russell, maluta_tiago, lguest, H. Peter Anvin,
	Thomas Gleixner, linux-kernel, Ian Campbell


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Ingo Molnar wrote:
>> i think Xen can withstand DMI scanning just fine.
>>
>> without having seen any background, my general feeling is that lguest 
>> should either do what Xen does and reserve the classic BIOS ranges 
>> that we probe - or we should make DMI scanning more robust by making 
>> sure real RAM ranges are never probed. (only ranges that the BIOS 
>> itself marks as reserved in the e820 map)
>
> We considered doing that, but decided that there was so many other 
> pieces of code around the place that assume that the ISA area is 
> special, that just reserving it was the best course of action.

yeah - for _any_ virtual machine environment it's beneficial to look as 
much like a normal PC as possible, because normal PCs is where the code 
gets tested most.

Nevertheless if this is the only current roadblock for lguest then i 
wouldnt find it objectionable to make DMI scanning more robust that way 
- the two are complimentary. [ With an initial transitionary period of 
generating printks and WARN()s when we try to scan general RAM areas. ]

	Ingo

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

* Re: [Lguest] lguest: unhandled trap
  2008-10-20  7:22   ` Ingo Molnar
@ 2008-10-20  7:43     ` Jeremy Fitzhardinge
  2008-10-20  7:53       ` Ingo Molnar
  2008-10-20 22:48     ` Rusty Russell
  1 sibling, 1 reply; 10+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-20  7:43 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Rusty Russell, maluta_tiago, lguest, H. Peter Anvin,
	Thomas Gleixner, linux-kernel, Ian Campbell

Ingo Molnar wrote:
> i think Xen can withstand DMI scanning just fine.
>
> without having seen any background, my general feeling is that lguest 
> should either do what Xen does and reserve the classic BIOS ranges that 
> we probe - or we should make DMI scanning more robust by making sure 
> real RAM ranges are never probed. (only ranges that the BIOS itself 
> marks as reserved in the e820 map) 

We considered doing that, but decided that there was so many other 
pieces of code around the place that assume that the ISA area is 
special, that just reserving it was the best course of action.

    J

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

* Re: [Lguest] lguest: unhandled trap
       [not found] ` <200810201452.04932.rusty@rustcorp.com.au>
@ 2008-10-20  7:22   ` Ingo Molnar
  2008-10-20  7:43     ` Jeremy Fitzhardinge
  2008-10-20 22:48     ` Rusty Russell
  0 siblings, 2 replies; 10+ messages in thread
From: Ingo Molnar @ 2008-10-20  7:22 UTC (permalink / raw)
  To: Rusty Russell
  Cc: maluta_tiago, lguest, Jeremy Fitzhardinge, H. Peter Anvin,
	Thomas Gleixner, linux-kernel


* Rusty Russell <rusty@rustcorp.com.au> wrote:

> On Monday 20 October 2008 12:50:09 Tiago Maluta wrote:
> > --- On Sun, 10/19/08, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > > > Hi,
> > > >
> > > > I'm using 2.6.27-05323-g26e9a39 and when I try to
> > >
> > > use lguest:
> > > > ~#Documentation/lguest/lguest 128 vmlinux
> > > > lguest: unhandled trap 14 at 0xc0594f6a (0xff900000)
> > >
> > > Yes, I found the same issue.  Does this fix it for you?
> >
> > Yes. This code fixed the problem.
> 
> Thanks.  Ingo, can you push this?
> 
> Subject: lguest: don't try DMI
> 
> dmi_scan_machine breaks under lguest; this is the simplest fix (though
> ugly).  Perhaps this hurts Xen too?
> 
> Error:
> 	lguest: unhandled trap 14 at 0xc04edeae (0xffa00000)
> 
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> 
> diff -r 47449cd8e3d8 drivers/firmware/dmi_scan.c
> --- a/drivers/firmware/dmi_scan.c	Fri Oct 17 12:14:40 2008 +1100
> +++ b/drivers/firmware/dmi_scan.c	Fri Oct 17 20:54:30 2008 +1100
> @@ -369,6 +369,11 @@ void __init dmi_scan_machine(void)
>  	char __iomem *p, *q;
>  	int rc;
>  
> +#ifdef CONFIG_PARAVIRT
> +	if (strcmp(pv_info.name, "lguest") == 0)
> +		goto error;
> +#endif
> +

hm, could you give some more background please? I'm not subscribed to 
the lguest list and the thread is not Cc:-ed to lkml (Cc:-ed it now). 
The patch looks quite ugly because it adds a special-case.

Was the problem introduced by:

5649b7c: x86: add DMI quirk for AMI BIOS which corrupts address 0xc000 during 

perhaps?

i think Xen can withstand DMI scanning just fine.

without having seen any background, my general feeling is that lguest 
should either do what Xen does and reserve the classic BIOS ranges that 
we probe - or we should make DMI scanning more robust by making sure 
real RAM ranges are never probed. (only ranges that the BIOS itself 
marks as reserved in the e820 map) 

(with exceptions for the first 4K perhaps.)

	Ingo

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

end of thread, other threads:[~2008-10-20 23:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <559519.75404.qm@web50707.mail.re2.yahoo.com>
2008-10-19 23:39 ` [Lguest] lguest: unhandled trap Rusty Russell
2008-10-20  4:15   ` Jeremy Fitzhardinge
     [not found] <713731.28571.qm@web50701.mail.re2.yahoo.com>
     [not found] ` <200810201452.04932.rusty@rustcorp.com.au>
2008-10-20  7:22   ` Ingo Molnar
2008-10-20  7:43     ` Jeremy Fitzhardinge
2008-10-20  7:53       ` Ingo Molnar
2008-10-20  9:14         ` Ian Campbell
2008-10-20  9:27           ` Ingo Molnar
2008-10-20 19:01           ` H. Peter Anvin
2008-10-20 22:48     ` Rusty Russell
2008-10-20 23:22       ` Ingo Molnar

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).