qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: Scott Wood <scottwood@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	Alexander Graf <agraf@suse.de>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"blauwirbel@gmail.com" <blauwirbel@gmail.com>,
	Yoder Stuart-B08248 <B08248@freescale.com>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"joerg.roedel@amd.com" <joerg.roedel@amd.com>,
	"dwg@au1.ibm.com" <dwg@au1.ibm.com>,
	"armbru@redhat.com" <armbru@redhat.com>
Subject: Re: [Qemu-devel] device assignment for embedded Power
Date: Sat, 2 Jul 2011 00:33:22 +0100	[thread overview]
Message-ID: <201107020033.23044.paul@codesourcery.com> (raw)
In-Reply-To: <20110701165149.1471bc8a@schlenkerla.am.freescale.net>

> > Why is your device so unique? How does it interact with the guest system
> > and what features does it require that doen't exist in any device that
> > can be emulated?
> 
> Perhaps I misunderstood what you meant by "similar characteristics".  I see
> no reason to spend a bunch of time implementing full emulation for a
> device, that isn't going to be used, just because it seems like a nice
> intermediary step.

You say your device has MMIO regions, generates IRQs and initiates DMA 
transactions.  Any device or selection of devices that between them use all 
those features will do the job. I'd expect most SoC to have several.  We don't 
care what the device actually does, only the ways it communicates with the 
rest of the machine.

I think you're coming at this problem from completely the wrong direction.  
Instead of "how do I wedge this passthrough into my machine", you should be 
asking "how do I create a machine without knowing the machine layout at 
compile time".  Once you fix that, hooking up the passthrough device should be 
fairly trivial.  You only have a single passthrough device, and the rest of us 
have none at all.  Anything restricted to the pasthrough case is thus unlikely 
to be the right answer to the second question, and I'd expect it to be 
removed/changed/broken when we do get round to implementing dynamic device 
creation.

> > > We're talking about directly mapping the registers into the guest.  The
> > > whole point is performance.
> > 
> > That's an additional step after you get passthrough working the normal
> > way.
> 
> "normal"?

Mapping a MMIO region into the guest is an additional complication, and purely 
a performance optimization.  qemu already needs to be in the loop to handle 
interrupts, probably DMA setup and the non-kvm case.

> I'm not sure what the use case is for direct assignment of a device in an
> otherwise completely emulated guest, but perhaps there is one.

Typically because the host system doesn't know how to talk to it, or there 
isn't a sensible way to relay the functionality provided by the device from 
the kernel to qemu.

> > We already have mechanisms (or at least patches) for mapping file-like
> > objects into guest physical memory.  That's largely independent of
> > device passthrough. It's a relatively minor tweak to how the passthrough
> > device sets up its MMIO regions.
> > 
> > Mapping host device MMIO regions into guest space is entirely
> > uninteresting unless we already have some way of creating guest-host
> > passthrough devices.
> 
> Isn't that what's being discussed?

It's your end goal, but I don't think it's particularly relevant to the 
problem you've encountered.

> > Creating guest-device passthrough devices isn't going to happen until the
> > can create arbitrary devices (within the set emulated by qemu) that
> > interact with the rest of the emulated machine in a similar way.
> 
> What do you mean by "interact with the rest of the emulated machine in a
> similar way"?

See first paragraph above.

Paul

  reply	other threads:[~2011-07-01 23:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 15:59 [Qemu-devel] device assignment for embedded Power Yoder Stuart-B08248
2011-07-01  0:58 ` Benjamin Herrenschmidt
2011-07-01 11:40   ` Alexander Graf
2011-07-01 12:13     ` Anthony Liguori
2011-07-01 12:10   ` Anthony Liguori
2011-07-01 12:52     ` Paul Brook
2011-07-01 13:33       ` Anthony Liguori
2011-07-01 16:43     ` Scott Wood
2011-07-01 17:03       ` Paul Brook
2011-07-01 17:49         ` Scott Wood
2011-07-01 20:59           ` Paul Brook
2011-07-01 21:51             ` Scott Wood
2011-07-01 23:33               ` Paul Brook [this message]
2011-07-01 23:05             ` Benjamin Herrenschmidt
2011-07-01 23:50               ` Paul Brook
2011-07-02  2:17                 ` Alexander Graf
2011-07-02 11:45                   ` Paul Brook
2011-07-01 22:35         ` Anthony Liguori
2011-07-01 22:32       ` Anthony Liguori
2011-07-05 18:16         ` Scott Wood
2011-07-01 16:34   ` Scott Wood
2011-07-05 18:19   ` Yoder Stuart-B08248
2011-07-05 22:23     ` Alexander Graf
2011-07-01 11:16 ` Paul Brook
2011-07-01 11:33   ` Alexander Graf
2011-07-01 11:55     ` Paul Brook
2011-07-01 12:02       ` Alexander Graf
2011-07-01 12:14         ` Anthony Liguori
2011-07-01 17:51   ` Scott Wood

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=201107020033.23044.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=B07421@freescale.com \
    --cc=B08248@freescale.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=dwg@au1.ibm.com \
    --cc=joerg.roedel@amd.com \
    --cc=qemu-devel@nongnu.org \
    --cc=scottwood@freescale.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).