All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: mapping of memory below 16Mb
Date: Fri, 25 Jan 2008 07:51:02 +0000	[thread overview]
Message-ID: <4799A2F5.76E4.0078.0@novell.com> (raw)
In-Reply-To: <C3BE6BD0.1B63E%Keir.Fraser@cl.cam.ac.uk>

>>> Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 24.01.08 17:22 >>>
>On 24/1/08 15:26, "Keir Fraser" <Keir.Fraser@cl.cam.ac.uk> wrote:
>
>>> One point I got a little surprised about while doing the 1Gb page support:
>>> The 1:1 mapping of the low 16 Mb (and most significantly the first Mb)
>>> created at boot time is being retained permanently. Shouldn't Xen be
>>> following the E820 map also for this memory range (by either not
>>> mapping non-RAM at all or at best mapping them UC/WP)?
>> 
>> Below 1MB is a special case, and 1MB-16MB we're dodging BIOS tables, not
>> actual hardware. At least this is the case for all system I know about. If
>> there are exceptions which we care about, then we can try harder. Otherwise
>> that code is quite complicated enough as it is.
>
>Actually this isn't hard to fix now I think about it. Also we should be
>mapping the range 0-4MB or 0-2MB with 4kB mappings anyway, to avoid
>conflicting with memory access constraints specified by the fixed MTRRs.
>Every modern BIOS sets the fixed MTRRs with a mixture of memory types, and
>if we map that range with a superpage we either get undefined behaviour or
>at best (e.g., Intel CPUs) the processor will implicitly shatter the
>superpage mapping so that we get 4kB-mapping levels of performance anyway.
>
>This has a side 'benefit' that the range 0-1GB cannot be mapped with a 1GB
>superpage mapping, and that simplifies your patch a bit (since we will never
>need to free the statically-allocated first few l2e ident mapping pages).

Actually - no, it would guarantee only the first of them would never be
freed. The others, as long as head.S puts them into l3_identmap
unconditionally, will still be subject to eventual freeing.

Jan

  reply	other threads:[~2008-01-25  7:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24 15:15 mapping of memory below 16Mb Jan Beulich
2008-01-24 15:26 ` Keir Fraser
2008-01-24 15:57   ` Jan Beulich
2008-01-24 16:08     ` Keir Fraser
2008-01-24 16:22   ` Keir Fraser
2008-01-25  7:51     ` Jan Beulich [this message]
2008-01-25  7:57       ` Keir Fraser
2008-01-24 16:24   ` Jan Beulich
2008-01-24 16:27     ` Keir Fraser
2008-01-24 16:35       ` Jan Beulich
2008-01-24 16:39         ` Keir Fraser

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=4799A2F5.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.