[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Supporting emulation of IOMMUs
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] Supporting emulation of IOMMUs |
Date: |
Mon, 9 May 2011 12:05:12 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
- Re: [Qemu-devel] Supporting emulation of IOMMUs,
David Gibson <=