qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <dwg@au1.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	aik@ozlabs.ru, Joerg.Rodel@amd.com, eduard.munteanu@linux360.ro,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Supporting emulation of IOMMUs
Date: Mon, 9 May 2011 12:05:12 +1000	[thread overview]
Message-ID: <20110509020512.GB20682@yookeroo.fritz.box> (raw)
In-Reply-To: <67FBBBAD-991F-48D8-901F-490C17B9DBC2@suse.de>

On Thu, Apr 21, 2011 at 11:39:22AM +0200, Alexander Graf wrote:
> On 21.04.2011, at 09:03, David Gibson wrote:
[snip]
> > @@ -934,6 +939,8 @@ echo "  --enable-docs            enable documentation build"
> > echo "  --disable-docs           disable documentation build"
> > echo "  --disable-vhost-net      disable vhost-net acceleration support"
> > echo "  --enable-vhost-net       enable vhost-net acceleration support"
> > +echo "  --disable-iommu          disable IOMMU emulation support"
> > +echo "  --enable-vhost-net       enable IOMMU emulation support"
> 
> eeh?

Oops, copy and paste error.  Fix in my tree now.

[snip]
> > +#else
> > +struct DMAMmu {
> > +    DeviceState *iommu;
> > +    DMATranslateFunc *translate;
> > +    QLIST_HEAD(memory_maps, DMAMemoryMap) memory_maps;
> > +};
> > +
> > +struct DMADevice {
> 
> How exactly is this going to be used? 

Well, the guts of the dma layer is not my work, so I can't really
answer that.

> Also, in the end I think that
> most devices should just go through a PCI specific interface that
> then calls the DMA helpers:
> 
> pci_memory_rw(PCIDevice *d, ...)
> 
> even if it's only as simple as calling
> 
> dma_memory_rw(d->iommu, ...)

So, I was actually thinking it would make most sense to have an iommu
pointer in *every* qdev, PCI or otherwise, so that we just use
	dma_memory_rw(qdev, ...)
everywhere.  Obviously a NULL iommu pointer would fall back to no
translation.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  parent reply	other threads:[~2011-05-09  2:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  7:03 [Qemu-devel] Supporting emulation of IOMMUs David Gibson
2011-04-21  9:39 ` Alexander Graf
2011-04-28 21:57   ` Richard Henderson
2011-04-29 14:27     ` Richard Henderson
2011-05-09  3:28       ` David Gibson
2011-05-09  2:06     ` David Gibson
2011-05-09  2:05   ` David Gibson [this message]
2011-04-21 18:47 ` Eduard - Gabriel Munteanu
2011-05-10  1:44   ` David Gibson
2011-05-14 15:27     ` Eduard - Gabriel Munteanu
2011-05-14 23:16       ` Benjamin Herrenschmidt
2011-04-26 15:58 ` Joerg Roedel

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=20110509020512.GB20682@yookeroo.fritz.box \
    --to=dwg@au1.ibm.com \
    --cc=Joerg.Rodel@amd.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=aliguori@us.ibm.com \
    --cc=eduard.munteanu@linux360.ro \
    --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).