From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Paul Brook <paul@codesourcery.com>,
kvm-devel <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] Release plan for 0.12.0
Date: Wed, 30 Sep 2009 17:59:46 +0200 [thread overview]
Message-ID: <4AC38072.1090002@gmx.net> (raw)
In-Reply-To: <4AC3580E.4010505@us.ibm.com>
On 30.09.2009 15:07, Anthony Liguori wrote:
> Carl-Daniel Hailfinger wrote:
>> However, to run coreboot on Qemu with the same init sequence as on
>> simplified real hardware, we need Cache-as-RAM (CAR) support. [...]
>
> Do we really need coreboot to use the same init sequence? coreboot
> is firmware and we don't necessarily run real firmware under QEMU.
> It's a short cut that lets us avoid a lot of complexity.
I know that some people were running 440BX BIOS images for real hardware
on Qemu and they got pretty far.
The complexity would be limited to the MTRR code and unless there were
major architectural changes in mapping RAM to address ranges, no other
code (except VM save and VM restore) should get even a single line changed.
>> Right now coreboot sets up the MTRRs correctly, but then (conditional on
>> Qemu) only uses areas which are known to be backed by RAM instead of the
>> areas designated by CAR.
>>
>> I'd like to implement CAR support which builds on top of my MTRR code
>> which was merged some months ago (and I already have code to check for
>> total cacheable area size), but I need help with the memory mapping
>> stuff. How do I proceed? Clean up what I have and insert "FIXME"
>> comments where I don't know how to implement stuff so others can see the
>> code and comment on it?
>
> You could start there. But from a higher level, I'm not sure I think
> a partial implementation of something like CAR is all that valuable
> since coreboot already runs under QEMU.
It only runs if WORKAROUND_QEMU is defined (maybe not exactly that name,
but you get the point). The code in coreboot calculates MTRR settings to
cover the place where the stack will be. To workaround missing CAR in
Qemu, it then has to recalculate the stack location to be able to
actually use the stack. That forces coreboot to keep two stack base
variables and to completely replace the generic logic which switches off
CAR.
I hope the explanation above didn't offend you, I just tried to clarify
why working CAR is such a big deal for coreboot.
If you want either a full CAR implementation or no CAR implementation, I
can write a patch which implements full CAR, but then I need to hook
WBINVD, INVD and CLFLUSH. Neither instruction is executed often enough
to show up in any profile. Besides that, for anything not using CAR
(everything after the firmware), the penalty is a simple test of a
boolean variable per WBINVD/INVD/CLFLUSH.
If you have further questions, please don't hesitate to ask.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
next prev parent reply other threads:[~2009-09-30 15:59 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-29 23:54 Release plan for 0.12.0 Anthony Liguori
2009-09-30 0:20 ` Dustin Kirkland
2009-09-30 2:18 ` Anthony Liguori
2009-09-30 2:28 ` [Qemu-devel] " Isaku Yamahata
2009-09-30 13:03 ` Anthony Liguori
2009-09-30 13:43 ` Michael S. Tsirkin
2009-09-30 5:17 ` Amit Shah
2009-09-30 13:04 ` Anthony Liguori
2009-09-30 13:37 ` Amit Shah
2009-09-30 14:47 ` Anthony Liguori
2009-09-30 14:50 ` Amit Shah
2009-09-30 6:41 ` [Qemu-devel] " Avi Kivity
2009-09-30 13:05 ` Anthony Liguori
2009-10-01 21:13 ` Luiz Capitulino
2009-10-03 10:04 ` Avi Kivity
2009-10-05 12:43 ` Luiz Capitulino
2009-10-05 13:52 ` Avi Kivity
2009-09-30 13:31 ` Luiz Capitulino
2009-09-30 8:53 ` Michael Tokarev
2009-09-30 9:01 ` Avi Kivity
2009-09-30 9:31 ` Carl-Daniel Hailfinger
2009-09-30 13:07 ` Anthony Liguori
2009-09-30 15:59 ` Carl-Daniel Hailfinger [this message]
2009-09-30 19:25 ` Blue Swirl
2009-09-30 13:30 ` Luiz Capitulino
2009-09-30 14:45 ` Anthony Liguori
2009-09-30 15:03 ` Fred Leeflang
2009-09-30 15:26 ` [Qemu-devel] " Luiz Capitulino
2009-09-30 17:03 ` Juan Quintela
2009-09-30 19:28 ` [Qemu-devel] " Gerd Hoffmann
2009-10-03 4:28 ` TAKEDA, toshiya
2009-10-08 13:55 ` [Qemu-devel] " Jens Osterkamp
2009-10-08 14:21 ` Anthony Liguori
2009-10-14 13:09 ` [Qemu-devel] " Arnd Bergmann
2009-10-14 13:53 ` Anthony Liguori
2009-10-14 14:01 ` Michael S. Tsirkin
2009-10-14 14:04 ` Michael S. Tsirkin
2009-10-14 13:21 ` Michael S. Tsirkin
2009-10-14 14:17 ` Anthony Liguori
2009-10-14 14:24 ` Michael S. Tsirkin
2009-10-14 15:19 ` [Qemu-devel] " Jamie Lokier
2009-10-14 15:50 ` Michael S. Tsirkin
2009-10-14 21:10 ` [Qemu-devel] " Sridhar Samudrala
2009-10-14 22:53 ` Raw vs. tap (was: Re: Re: Release plan for 0.12.0) Anthony Liguori
2009-10-15 6:36 ` Raw vs. tap (was: Re: [Qemu-devel] " Mark McLoughlin
2009-10-15 7:56 ` Raw vs. tap (was: " Michael S. Tsirkin
2009-10-15 13:32 ` Raw vs. tap Anthony Liguori
2009-10-15 15:04 ` Michael S. Tsirkin
2009-10-15 15:18 ` Anthony Liguori
2009-10-15 15:48 ` Michael S. Tsirkin
2009-10-15 18:37 ` Anthony Liguori
2009-10-15 22:08 ` Michael S. Tsirkin
2009-10-18 10:05 ` Michael S. Tsirkin
2009-10-15 7:51 ` [Qemu-devel] Re: Release plan for 0.12.0 Michael S. Tsirkin
2009-10-20 6:33 ` Takahiro Hirofuchi
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=4AC38072.1090002@gmx.net \
--to=c-d.hailfinger.devel.2006@gmx.net \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.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).