qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: "Richard W.M. Jones" <rjones@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device
Date: Mon, 19 Jul 2010 12:00:28 +0300	[thread overview]
Message-ID: <20100719090028.GJ4689@redhat.com> (raw)
In-Reply-To: <28292784-F194-43D8-A640-B0DCAB0CF940@suse.de>

On Mon, Jul 19, 2010 at 10:54:43AM +0200, Alexander Graf wrote:
> 
> On 19.07.2010, at 10:48, Gleb Natapov wrote:
> 
> > On Mon, Jul 19, 2010 at 10:41:48AM +0200, Alexander Graf wrote:
> >> 
> >> On 19.07.2010, at 10:30, Gleb Natapov wrote:
> >> 
> >>> On Mon, Jul 19, 2010 at 10:24:46AM +0200, Alexander Graf wrote:
> >>>> 
> >>>> On 19.07.2010, at 10:19, Gleb Natapov wrote:
> >>>> 
> >>>> Yes and no. It sounds nice at first, but doesn't quite fit. There are two issues:
> >>>> 
> >>>> 1) We need a new PCI ID
> >>> We have our range. We can allocate from there.
> >>> 
> >>>> 2) There can be a lot of initrd binaries with multiboot. We only have a limited amount of BARs
> >>>> 
> >>> Is it supported now with fw_cfg interface? My main concern with this
> >>> approach is huge BAR size that may take a lot of space from PCI MMIO range
> >>> if guest OS decide to configure it.
> >> 
> >> Oh, right. I think I combined all the modules into the INITRD blob. Yeah, that would work. Is coalesced MMIO more efficient than coalesced PIO? Or do we have to do some RAM mapping for those special BAR regions?
> >> 
> > I think we will have to do RAM mapping. Otherwise it may be slow to.
> > Coalesced MMIO is for write not read IIRC.
> 
> Oh, right. Makes sense.
> 
> > 
> >> Were there DMA capable devices back in ISA times? There must be. If so, we can just take a look at what they do and do it similarly. Bus mastering was a new thing for PCI, right?
> >> 
> > I think IDE can be considered DMA capable ISA device, no? At least
> > it works by writing to PIO ports and getting result into memory, but
> > with interrupts and status bits and everything that real device should
> > have. On board DMA engine is also ISA device. 
> 
> We could define our device to be polling. So all we need is a status bit that the guest sets when it starts the DMA and the device unsets when the DMA is done. In our case that should be immediate, because the PIO invokes the full code paths, but it would look more like a real device, no?
> 
This is better, but it shouldn't be synchronous. Kernel and initrd are
on disk so why not setup aio and read them from io thread allowing vcpu
thread immediately return to guest mode to process interrupts. Or why
not use virtio-serial while we are at it? After all virtio-serial is
there to allow host and guest communication.

> outb(PORT_DMA_CTL, FWCFG_DMA_ENABLE);
> while (inb(PORT_DMA_CTL) & FWCFG_DMA_ENABLE) {
>     /* DMA going on */
> }
> /* DMA done */
> 
> 
> Alex

--
			Gleb.

  reply	other threads:[~2010-07-19  9:00 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 [this message]
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
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=20100719090028.GJ4689@redhat.com \
    --to=gleb@redhat.com \
    --cc=agraf@suse.de \
    --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).