From: Gerd Hoffmann <kraxel@redhat.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] e820: pass high memory too.
Date: Thu, 17 Oct 2013 16:30:27 +0200 [thread overview]
Message-ID: <1382020227.23424.29.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <20131017130023.GT3479@redhat.com>
On Do, 2013-10-17 at 15:00 +0200, Andrea Arcangeli wrote:
> Hi,
>
> On Thu, Oct 17, 2013 at 01:09:38PM +0200, Gerd Hoffmann wrote:
> > We have a fw_cfg entry to pass e820 entries from qemu to the firmware.
> > Today it's used to pass reservations only. This patch makes qemu pass
> > entries for RAM too.
> >
> > This allows to pass RAM sizes larger than 1TB to the firmware and it
> > will also allow to pass non-contignous memory ramges should we decide
> > to implement that some day, say for our virtual numa nodes.
> >
> > Obviously this needs some extra care to not break existing firware.
> >
> > SeaBIOS loads the entries and happily adds them without looking at the
> > type. Which is problematic for memory below 4g as this will overwrite
> > reservations added for bios memory etc. For memory above 4g it works
> > just fine, seabios will merge the entry derived from cmos with the one
> > loaded from fw_cfg.
>
> The reason for not fixing the cmos and defer the fixage of the >1TB
> boot, is to develop a better approach, and this mixture of e820 and
> cmos doesn't look like an improvement. The only thing it avoids is to
> touch seabios but it provides no benefit whatsoever if compared to
> fixing the cmos which looks cleaner to me than having to compute a mix
> of cmos and e820 in seabios (and potentially having other bioses
> following this mix-incomplete-API).
e820 allows to pass non-contignous ram ranges to seabios (not that qemu
supports that today, but when implemented the qemu/seabios interface
will deal with it just fine). How you'll do that with the cmos?
> I thought the reason of deferring the fixage of >1TB boot to wait for
> a better approach and better API, I didn't think the end result had to
> be a mix API that adds no value.
IMO e820 is better than CMOS.
> The premise that "this will also allow to pass non-contiguous memory"
> is partly false, as you can't use the e820 API below 4g so there's no
> way to create non contiguous memory with this mix-cmos-e820-API.
Sure you can. Why do you think you can't?
> So instead of adding "if (0)" patches and requiring bioses to mix
> information from e820 maps and cmos to boot with more than 1TB, why
> can't simply seabios can be fixed to preserve its own reservations
> (fragmenting the e820 map passed by qemu) while it build the e820 map?
>
> So then we the qemu API becomes:
>
> e820_add_entry(0, ram_size, E820_RAM);
That is the goal. seabios will be fixed to deal with this correctly.
I don't want break old seabios versions though (especially not before we
have a seabios release which can handle it), so I'll wait with flipping
the switch for that.
cheers,
Gerd
next prev parent reply other threads:[~2013-10-17 14:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 11:09 [Qemu-devel] [PULL 0/1] e820: pass high memory too Gerd Hoffmann
2013-10-17 11:09 ` [Qemu-devel] [PATCH 1/1] " Gerd Hoffmann
2013-10-17 13:00 ` Andrea Arcangeli
2013-10-17 14:30 ` Gerd Hoffmann [this message]
2013-10-17 16:15 ` Andrea Arcangeli
2013-10-18 8:55 ` Gerd Hoffmann
2013-10-18 13:31 ` Andrea Arcangeli
2013-10-18 14:37 ` Gerd Hoffmann
2013-10-18 11:31 ` [Qemu-devel] [PULL 0/1] " Gerd Hoffmann
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=1382020227.23424.29.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=aarcange@redhat.com \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).