public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ian Campbell <ijc@hellion.org.uk>,
	Joel Becker <Joel.Becker@oracle.com>,
	Jody Belka <lists-lkml@pimb.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Andi Kleen <andi@firstfloor.org>,
	Mika Penttila <mika.penttila@kolumbus.fi>
Subject: Re: 2.6.25-rc1 xen pvops regression
Date: Thu, 21 Feb 2008 14:58:48 -0800	[thread overview]
Message-ID: <47BE0228.7020204@zytor.com> (raw)
In-Reply-To: <47BE0017.1020205@goop.org>

Jeremy Fitzhardinge wrote:
>>
>> What is the e820 information you feed the kernel?  We should only ever 
>> allocate page tables out of available RAM, not any other type of 
>> memory (reserved or not). 
> 
> The kernel gets a flat memory map; all memory is just plain RAM.  The 
> problem is that we're allocating a normal page and turning it into a 
> pagetable - so far so good.  Then the DMI code is randomly mapping that 
> same page RW so it can scan it for DMI signatures, which Xen is preventing.
> 
> There are two immediate fixes:
> 
>   1. Only scan for DMI if the memory is reserved (rejected, because HPA
>      says some machines don't reserve the DMI space).  Alternatively,
>      don't bother scanning if booting under Xen.
>   2. Make DMI map the memory RO so that Xen doesn't complain (which is
>      sensible because DMI is ROM anyway).
> 
> But as far as I can tell, this shouldn't be happening anyway, and could 
> happen on real hardware which doesn't reserve the DMI space.  It 
> probably doesn't because initial pagetables on real hardware use large 
> pages, and therefore allocate less memory for pagetable memory and 
> therefore doesn't end up hitting the 0xf0000 region.  But that area 
> should be excluded from the allocation pool.
> 

Which it is on real hardware, because although it's not *reserved* (type 
2), it is certainly not made available as *normal memory* (type 1).  If 
Xen maps this as type 1 then I definitely see the problem.

We can exclude type 1 memory from DMI scan, certainly.

However, Xen may want to consider why provide memory below the 1 MB 
point at all, and certainly whether it's wise to provide RAM in the 
640-1024 KB legacy region -- although you could argue that "it *should* 
work", odds are pretty good you'll have nasty surprises on a regular basis.

	-hpa


  reply	other threads:[~2008-02-21 23:18 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12 23:54 2.6.25-rc1 xen pvops regression Jody Belka
2008-02-13 11:59 ` Jeremy Fitzhardinge
2008-02-13 12:13   ` Jody Belka
2008-02-13 12:23   ` Ingo Molnar
2008-02-14  2:27   ` Joel Becker
2008-02-14  7:50     ` Jeremy Fitzhardinge
2008-02-15 20:23       ` Joel Becker
2008-02-16  2:44         ` Jeremy Fitzhardinge
2008-02-16  8:54           ` Joel Becker
2008-02-16 11:46             ` Jeremy Fitzhardinge
2008-02-17  6:29               ` Joel Becker
2008-02-17 12:09                 ` Jeremy Fitzhardinge
2008-02-17  6:39               ` Joel Becker
2008-02-17 18:49         ` Ian Campbell
2008-02-18 10:40           ` Joel Becker
2008-02-19 21:50             ` Ian Campbell
2008-02-19 21:59             ` Ian Campbell
2008-02-20  7:43               ` H. Peter Anvin
2008-02-20  8:51                 ` Ian Campbell
2008-02-20 21:42                   ` Joel Becker
2008-02-20 22:30                     ` Ian Campbell
2008-02-20 21:58                   ` Jeremy Fitzhardinge
2008-02-20 22:29                     ` Ian Campbell
2008-02-21 21:16                       ` Jeremy Fitzhardinge
2008-02-21 21:21                         ` H. Peter Anvin
2008-02-21 21:37                           ` Jeremy Fitzhardinge
2008-02-21 21:44                             ` H. Peter Anvin
2008-02-21 22:12                             ` Ian Campbell
2008-02-21 22:23                               ` H. Peter Anvin
2008-02-21 22:49                                 ` Jeremy Fitzhardinge
2008-02-21 22:58                                   ` H. Peter Anvin [this message]
2008-02-22  7:25                                     ` Ian Campbell
2008-02-22  9:28                                       ` Alan Cox
2008-02-22  9:55                                         ` Andi Kleen
2008-02-22 10:00                                           ` Alan Cox
2008-02-22 10:15                                             ` Andi Kleen
2008-02-22 16:27                                               ` H. Peter Anvin
2008-02-22 19:25                                               ` Pavel Machek
2008-02-26 17:06                                       ` Mark McLoughlin
2008-02-26 20:05                                         ` Jeremy Fitzhardinge
2008-02-21 22:58                               ` Joel Becker
2008-02-21 22:04                           ` Eric W. Biederman
2008-02-21 23:14                             ` Jeremy Fitzhardinge
2008-02-21 23:26                               ` H. Peter Anvin
2008-02-21 23:46                                 ` Jeremy Fitzhardinge
2008-02-21 23:57                                   ` H. Peter Anvin

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=47BE0228.7020204@zytor.com \
    --to=hpa@zytor.com \
    --cc=Joel.Becker@oracle.com \
    --cc=andi@firstfloor.org \
    --cc=ebiederm@xmission.com \
    --cc=ijc@hellion.org.uk \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists-lkml@pimb.org \
    --cc=mika.penttila@kolumbus.fi \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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