From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Re: xen: memory initialization/balloon fixes (#3)
Date: Wed, 28 Sep 2011 09:47:12 -0400 [thread overview]
Message-ID: <20110928134712.GG10270@phenom.oracle.com> (raw)
In-Reply-To: <4E82FAAE.6020206@citrix.com>
> Er. We don't really but I think this if needs to be:
>
> /*
> * Page align regions.
> *
> * Reduce RAM regions and expand other (reserved) regions.
> */
> if (type == E820_RAM || type == E820_UNUSABLE) {
> start = PAGE_ALIGN(start);
> end &= ~((u64)PAGE_SIZE - 1);
> } else {
> start &= ~((u64)PAGE_SIZE - 1);
> end = PAGE_ALIGN(start);
> }
>
> So reserved regions also become page aligned (which is part of the fix
> for the dmidecode bug).
I am not sure actually that is required for the e820_* calls. As those
are used by 'ioremap' and memory buddy system and they only care about
the RAM regions. Everybody else assumes that the "gaps" and "anything-but
-RAM-regions" are OK - as long as they don't touch the RAM regions.
It certainly is required for the set_phys_to_identity(..) call.
I am trying here to be sure we don't mess it up - and I don't know
what the right answer is for e820_* calls. Well, I do know what the
right answer if for RAM regions - they must be page-aligned. But
for reserved/non-RAM/ACPI/ACPI-NVS... ?
BIOS-e820: 00000000dfe8ac00 - 00000000dfe8cc00 (ACPI NVS)
BIOS-e820: 00000000dfe8cc00 - 00000000dfe8ec00 (ACPI data)
.. snip..
reserve RAM buffer: 00000000dfe8ac00 - 00000000dfffffff
or say:
BIOS-e820: 00000000bff66f00 - 00000000bff76300 (ACPI data)
..
[ 1.026860] reserve RAM buffer: 00000000bff66f00 - 00000000bfffffff
They all seem to work OK without being page-aligned.
I think we can drop the page-alignment on non-RAM regions when we
give it to e820_*. We want to diverge as little as possible from what baremetal
does.
prev parent reply other threads:[~2011-09-28 13:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 12:29 xen: memory initialization/balloon fixes (#3) David Vrabel
2011-09-15 12:29 ` [PATCH 1/7] xen: use maximum reservation to limit amount of usable RAM David Vrabel
2011-09-21 15:09 ` Konrad Rzeszutek Wilk
2011-09-15 12:29 ` [PATCH 2/7] xen: avoid adding non-existant memory if the reservation is unlimited David Vrabel
2011-09-21 15:08 ` Unknown, Konrad Rzeszutek
2011-09-15 12:29 ` [PATCH 3/7] xen/balloon: account for pages released during memory setup David Vrabel
2011-09-21 15:05 ` Konrad Rzeszutek Wilk
2011-09-15 12:29 ` [PATCH 4/7] xen/balloon: simplify test for the end of usable RAM David Vrabel
2011-09-15 12:29 ` [PATCH 5/7] xen: allow balloon driver to use more than one memory region David Vrabel
2011-09-15 12:29 ` [PATCH 6/7] xen: allow extra memory to be in multiple regions David Vrabel
2011-09-15 12:29 ` [PATCH 7/7] xen: release all pages within 1-1 p2m mappings David Vrabel
2011-09-20 16:57 ` xen: memory initialization/balloon fixes (#3) Dan Magenheimer
2011-09-21 22:29 ` Dan Magenheimer
2011-09-22 12:32 ` David Vrabel
2011-09-22 17:06 ` Dan Magenheimer
2011-09-22 22:34 ` Dan Magenheimer
2011-09-22 22:51 ` Jeremy Fitzhardinge
2011-09-22 23:46 ` Dan Magenheimer
2011-09-23 10:45 ` David Vrabel
2011-09-23 13:28 ` Konrad Rzeszutek Wilk
2011-09-23 19:04 ` Dan Magenheimer
2011-09-21 17:11 ` Konrad Rzeszutek Wilk
2011-09-22 13:08 ` David Vrabel
2011-09-24 2:08 ` Konrad Rzeszutek Wilk
2011-09-26 14:20 ` Konrad Rzeszutek Wilk
2011-09-27 14:09 ` David Vrabel
2011-09-27 23:10 ` Konrad Rzeszutek Wilk
2011-09-28 10:45 ` David Vrabel
2011-09-28 13:25 ` Konrad Rzeszutek Wilk
2011-09-28 13:47 ` Konrad Rzeszutek Wilk [this message]
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=20110928134712.GG10270@phenom.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=david.vrabel@citrix.com \
--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.