From: Jamie Lokier <jamie@shareable.org>
To: Gleb Natapov <gleb@redhat.com>
Cc: qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
"Richard W.M. Jones" <rjones@redhat.com>
Subject: Re: [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device
Date: Tue, 20 Jul 2010 14:15:16 +0100 [thread overview]
Message-ID: <20100720131516.GC5439@shareable.org> (raw)
In-Reply-To: <20100719075110.GB4689@redhat.com>
Gleb Natapov wrote:
> On Mon, Jul 19, 2010 at 09:40:18AM +0200, Alexander Graf wrote:
> >
> > On 19.07.2010, at 09:33, Gleb Natapov wrote:
> >
> > > On Mon, Jul 19, 2010 at 08:28:02AM +0100, Richard W.M. Jones wrote:
> > >> On Mon, Jul 19, 2010 at 09:23:56AM +0300, Gleb Natapov wrote:
> > >>> That what I am warring about too. If we are adding device we have to be
> > >>> sure such device can actually exist on real hw too otherwise we may have
> > >>> problems later.
> > >>
> > >> I don't understand why the constraints of real h/w have anything to do
> > >> with this. Can you explain?
> > >>
> > > Each time we do something not architectural it cause us troubles later.
> > > So constraints of real h/w is our constrains to.
> > >
> > >>> Also 1 second on 100M file does not look like huge gain to me.
> > >>
> > >> Every second counts. We're trying to get libguestfs boot times down
> > >> from 8-12 seconds to 4-5 seconds. For many cases it's an interactive
> > >> program.
> > >>
> > > So what about making initrd smaller? I remember managing two
> > > distribution in 64M flash in embedded project.
> >
> > Having a huge initrd basically helps in reusing a lot of existing code. We do the same - in general the initrd is just a subset of the applications of the host OS. And if you start putting perl or the likes into it, it becomes big.
> >
> Why not provide small disk/cdrom with all those utilities installed?
>
> > I guess the best thing for now really is to try and see which code paths insb goes along. It should really be coalesced.
> >
> It is coalesced to a certain extent (reenter guest every 1024 bytes,
> read from userspace page at a time). You need to continue injecting
> interrupt into a guest during long string operation and checking
> exception condition on a page boundaries.
First obvious change is to make that 4k bytes (page size) when the I/O
port is the firmware port. That'll make initrd 4 times faster straight away.
If that's not enough saving, it strikes me a cleaner approach than
inventing new kinds of DMA and/or new PCI devices, is to just detect
when the rep insb instruction is used for loading a firmware blob and
treat that as a different trap.
Is guest SeaBIOS in real mode at that point? If yes, then it would be
best to trap this combination:
rep insb is fetching a blob + CPU is in real mode
Because then it's safe to skip the exception check on page boundaries.
If no, the trap will need to be a bit smarter.
Advantages of this approach:
- No need for new BIOS
- Will work with older BIOSes using current method, and accelerate them
- No need for distinct -initrd BIOS implementations for isapc and pc,
(compared with the PCI proposal)
- Doesn't add any new "extra-architectural" behaviour
-- Jamie
next prev parent reply other threads:[~2010-07-20 13:15 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 9:50 [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device Richard W.M. Jones
2010-07-17 9:53 ` Richard W.M. Jones
2010-07-18 17:26 ` Alexander Graf
2010-07-18 20:09 ` Richard W.M. Jones
2010-07-18 20:32 ` Alexander Graf
2010-07-19 6:23 ` Gleb Natapov
2010-07-19 7:28 ` Richard W.M. Jones
2010-07-19 7:33 ` Gleb Natapov
2010-07-19 7:40 ` Alexander Graf
2010-07-19 7:51 ` Gleb Natapov
2010-07-19 7:57 ` Alexander Graf
2010-07-19 8:01 ` Gleb Natapov
2010-07-19 8:08 ` Alexander Graf
2010-07-19 8:19 ` Gleb Natapov
2010-07-19 8:24 ` Alexander Graf
2010-07-19 8:30 ` Gleb Natapov
2010-07-19 8:41 ` Alexander Graf
2010-07-19 8:48 ` Gleb Natapov
2010-07-19 8:54 ` Alexander Graf
2010-07-19 9:00 ` Gleb Natapov
2010-07-19 9:02 ` Alexander Graf
2010-07-19 9:10 ` Gleb Natapov
2010-07-19 9:13 ` Alexander Graf
2010-07-19 9:19 ` Gleb Natapov
2010-07-19 9:21 ` Alexander Graf
2010-07-19 9:32 ` Gleb Natapov
2010-07-19 9:23 ` Richard W.M. Jones
2010-07-20 13:15 ` Jamie Lokier [this message]
2010-07-20 13:40 ` Gleb Natapov
2010-07-20 13:59 ` Richard W.M. Jones
2010-07-19 9:19 ` Richard W.M. Jones
2010-07-19 7:44 ` Richard W.M. Jones
2010-07-19 7:55 ` Gleb Natapov
2010-07-19 8:34 ` Richard W.M. Jones
2010-07-19 8:40 ` Gleb Natapov
2010-07-19 9:00 ` Richard W.M. Jones
2010-07-19 9:04 ` Richard W.M. Jones
2010-07-19 9:06 ` Gleb Natapov
2010-07-19 9:09 ` Alexander Graf
2010-07-19 9:15 ` Gleb Natapov
2010-07-19 9:16 ` Alexander Graf
2010-07-19 13:06 ` Richard W.M. Jones
2010-07-19 13:12 ` Gleb Natapov
2010-07-19 14:52 ` Anthony Liguori
2010-07-19 14:54 ` Gleb Natapov
2010-07-19 14:45 ` Anthony Liguori
2010-07-19 14:53 ` Gleb Natapov
2010-07-19 15:54 ` Anthony Liguori
2010-07-19 16:11 ` Gleb Natapov
2010-07-19 16:47 ` Richard W.M. Jones
2010-07-19 17:04 ` Gleb Natapov
2010-07-19 19:06 ` Anthony Liguori
2010-07-19 6:12 ` Gleb Natapov
2010-07-19 6:14 ` [Qemu-devel] " Gleb Natapov
2010-07-20 22:22 ` [Qemu-devel] " Blue Swirl
2010-07-21 7:27 ` Alexander Graf
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=20100720131516.GC5439@shareable.org \
--to=jamie@shareable.org \
--cc=agraf@suse.de \
--cc=gleb@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.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 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).