LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] x86: Add nodmi command line option to turn off DMI parsing.
@ 2008-02-28  8:26 Ian Campbell
  2008-02-28  8:26 ` [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2008-02-28  8:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ian Campbell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Jeremy Fitzhardinge, Mark McLoughlin

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Mark McLoughlin <markmc@redhat.com>
---
 drivers/firmware/dmi_scan.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 4072449..62b6200 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -117,6 +117,12 @@ static int __init dmi_checksum(const u8 *buf)
 static char *dmi_ident[DMI_STRING_MAX];
 static LIST_HEAD(dmi_devices);
 int dmi_available;
+static int __init setup_disable_dmi(char *str)
+{
+	dmi_available = -1;
+	return 0;
+}
+early_param("nodmi", setup_disable_dmi);
 
 /*
  *	Save a DMI string
@@ -359,6 +365,12 @@ void __init dmi_scan_machine(void)
 	char __iomem *p, *q;
 	int rc;
 
+	if (dmi_available < 0) {
+		printk(KERN_INFO "DMI disabled.\n");
+		dmi_available = 0;
+		return;
+	}
+
 	if (efi_enabled) {
 		if (efi.smbios == EFI_INVALID_TABLE_ADDR)
 			goto out;
-- 
1.5.4.2


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

* [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel.
  2008-02-28  8:26 [PATCH 1/2] x86: Add nodmi command line option to turn off DMI parsing Ian Campbell
@ 2008-02-28  8:26 ` Ian Campbell
  2008-02-28  9:31   ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2008-02-28  8:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ian Campbell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Jeremy Fitzhardinge, Mark McLoughlin

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Mark McLoughlin <markmc@redhat.com>
---
 arch/x86/xen/enlighten.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 49e5358..69e11ef 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -25,6 +25,7 @@
 #include <linux/mm.h>
 #include <linux/page-flags.h>
 #include <linux/highmem.h>
+#include <linux/dmi.h>
 
 #include <xen/interface/xen.h>
 #include <xen/interface/physdev.h>
@@ -1209,6 +1210,9 @@ asmlinkage void __init xen_start_kernel(void)
 		? __pa(xen_start_info->mod_start) : 0;
 	boot_params.hdr.ramdisk_size = xen_start_info->mod_len;
 
+	/* Disable DMI parsing */
+	dmi_available = 1;
+
 	/* Start the world */
 	start_kernel();
 }
-- 
1.5.4.2


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

* Re: [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel.
  2008-02-28  8:26 ` [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel Ian Campbell
@ 2008-02-28  9:31   ` Ian Campbell
  2008-02-28  9:46     ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2008-02-28  9:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Jeremy Fitzhardinge, Mark McLoughlin


Actually scratch this patchset -- its not sufficient. For example
ddcprobe in userspace causes the exact same issue vs 0xa0000.

Looks like the only sane solution will be to mark regions between
640K-1M reserved early on in boot.

Ian.
-- 
Ian Campbell

Put no trust in cryptic comments.


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

* Re: [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel.
  2008-02-28  9:31   ` Ian Campbell
@ 2008-02-28  9:46     ` Ingo Molnar
  2008-02-28 10:35       ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2008-02-28  9:46 UTC (permalink / raw)
  To: Ian Campbell
  Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Jeremy Fitzhardinge, Mark McLoughlin, Alexander van Heukelum


* Ian Campbell <ijc@hellion.org.uk> wrote:

> Actually scratch this patchset -- its not sufficient. For example 
> ddcprobe in userspace causes the exact same issue vs 0xa0000.
> 
> Looks like the only sane solution will be to mark regions between 
> 640K-1M reserved early on in boot.

and as luck has it, such a patch from Alexander van Heukelum has been 
put into x86.git#testing just yesterday.

So ... could you try x86.git#testing - does it work out of box? Is the 
reservation early enough to prevent pagetables be allocated in weird 
places? [or am i missing something - this is about the guest kernel 
reserving th 640k..1M area, not the host kernel - right?]

	Ingo

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

* Re: [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel.
  2008-02-28  9:46     ` Ingo Molnar
@ 2008-02-28 10:35       ` Ian Campbell
  2008-02-28 10:44         ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2008-02-28 10:35 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Jeremy Fitzhardinge, Mark McLoughlin, Alexander van Heukelum


On Thu, 2008-02-28 at 10:46 +0100, Ingo Molnar wrote:
> * Ian Campbell <ijc@hellion.org.uk> wrote:
> 
> > Actually scratch this patchset -- its not sufficient. For example 
> > ddcprobe in userspace causes the exact same issue vs 0xa0000.
> > 
> > Looks like the only sane solution will be to mark regions between 
> > 640K-1M reserved early on in boot.
> 
> and as luck has it, such a patch from Alexander van Heukelum has been 
> put into x86.git#testing just yesterday.
> 
> So ... could you try x86.git#testing - does it work out of box? Is the 
> reservation early enough to prevent pagetables be allocated in weird 
> places?

That patch is 64 bit only and also I'm not sure what EBDA looks like to
a Xen domU (I expect it doesn't exist). I'll give it a go but I'm not
hopeful.

>  [or am i missing something - this is about the guest kernel 
> reserving th 640k..1M area, not the host kernel - right?]

Correct, the area between 640k and 1M is just normal memory for a Xen
guest and the memory map reflects that so page tables and other stuff
get allocated in regions which would be magic data structures on native.

Ian.
-- 
Ian Campbell

The woman you buy -- and she is the least expensive -- takes a great
deal of money.  The woman who gives herself takes all your time.
		-- Balzac


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

* Re: [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel.
  2008-02-28 10:35       ` Ian Campbell
@ 2008-02-28 10:44         ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2008-02-28 10:44 UTC (permalink / raw)
  To: Ian Campbell
  Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Jeremy Fitzhardinge, Mark McLoughlin, Alexander van Heukelum


* Ian Campbell <ijc@hellion.org.uk> wrote:

> > > Looks like the only sane solution will be to mark regions between 
> > > 640K-1M reserved early on in boot.
> > 
> > and as luck has it, such a patch from Alexander van Heukelum has 
> > been put into x86.git#testing just yesterday.
> > 
> > So ... could you try x86.git#testing - does it work out of box? Is 
> > the reservation early enough to prevent pagetables be allocated in 
> > weird places?
> 
> That patch is 64 bit only and also I'm not sure what EBDA looks like 
> to a Xen domU (I expect it doesn't exist). I'll give it a go but I'm 
> not hopeful.

it was requested to be unified to 32 bit as well already - no patch yet. 
I'd gladly take a patch that does it - it fixing 32-bit Xen guests would 
be an added bonus. Perhaps this all should be done by injecting a very 
eary e820 filter instead of reserving it later on? 640k..1M being 
special is a deep PC legacy, i doubt we'll ever recover from it ;-)

	Ingo

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

end of thread, other threads:[~2008-02-28 10:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28  8:26 [PATCH 1/2] x86: Add nodmi command line option to turn off DMI parsing Ian Campbell
2008-02-28  8:26 ` [PATCH 2/2] x86/xen: Disable DMI parsing in Xen kernel Ian Campbell
2008-02-28  9:31   ` Ian Campbell
2008-02-28  9:46     ` Ingo Molnar
2008-02-28 10:35       ` Ian Campbell
2008-02-28 10:44         ` 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).