From: Avi Kivity <avi@redhat.com>
To: Alex Williamson <alex.williamson@hp.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: [RFC] Extending MTRRs above 4G
Date: Tue, 23 Sep 2008 12:18:36 +0300 [thread overview]
Message-ID: <48D8B46C.6030005@redhat.com> (raw)
In-Reply-To: <1221673872.16470.27.camel@lappy>
Alex Williamson wrote:
> When I try to boot guests using a recent Linux kernel (2.6.26+), memory
> above 3.5G gets thrown away with an error like this:
>
> WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 4608MB of RAM.
>
> And it's true, we're only providing MTRRs for memory below 4G. In fact
> rombios32 knows very little, if anything, about memory above 4G, as seen
> by memory reporting in the SMBIOS table.
>
> It looks like the Linux kernel MTRR code does have a bail-out point for
> kvm/qemu, but that was only effective before we started reporting MTRRs.
> On real hardware, I have two systems that do this two different ways.
> The first is an Intel based system, which reports MTRRs to cover the I/O
> space, then defaults the rest of memory to WB. The second is an AMD
> based system which uses MTRRs to cover memory below 4G, then seems to
> have a special AMD MSR to describe the top of memory above 4G. Xen
> appears to mimic the first approach.
>
> Is there any reason that KVM sets the default MTRR type to UC, then only
> sets up MTRRs for the memory below 4G?
The thinking is that if we hotplug a device, its memory must be set to
uncacheable by default.
> the patch below is a possible
> approach to continue down this path and enlighten rombios32 about the
> real top of memory, and setup MTRRs appropriately. It doesn't address
> SMBIOS or whatever causes grub to only report upper memory below 4G.
> Alternatively we could switch to the Intel/Xen system approach, but it
> seems rombios32 needs to understand the extra memory at some point
> anyway. Thoughts? BTW, another benefit to the default WB approach is
> that MTRRs are a limited resource and there will be memory sizes we
> can't fully cover using the approach below.
Yes, especially with the pci hole causing any memory size to require
many MTRRs.
I'd like to switch to default WB + MTRRs covering the pci space, but I'd
like to get a clear understanding of how we handle hotplug. Meanwhile,
I've applied your patch.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2008-09-23 9:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 17:51 [RFC] Extending MTRRs above 4G Alex Williamson
2008-09-17 19:47 ` Philip Herron
2008-09-17 21:05 ` Alex Williamson
2008-09-23 9:19 ` Avi Kivity
2008-09-23 9:18 ` Avi Kivity [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=48D8B46C.6030005@redhat.com \
--to=avi@redhat.com \
--cc=alex.williamson@hp.com \
--cc=kvm@vger.kernel.org \
/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