> What about 64-bit systems that use an IOMMU? Don't they already have a
> 64-bit physical -> 32-bit IO address space mapping? I don't know if this
> mapping is per-bus or system global.

If it's an Intel x86_64 machine (no IOMMU yet), IIRC the 32-bit PCI devices 
are capable of DMA-ing into the bottom of memory - there's no remapping.  For 
this reason I've seen various discussions about a ZONE_DMA_32 so that 32 bit 
devices can request memory in this area...

If there's an IOMMU then the addressable 32 bits could of course map anywhere 
in the host memory... For something like the Opteron, I imagine the IOMMU 
mappings happen in the on-CPU memory controller, so I'd guess there'd be (at 
most) one mapping per processor package.  I've not actually looked into the 
specifics of this, so take it with a pinch of salt ;-)

There's also a SoftIOMMU driver under Linux that fakes out IOMMU behaviour by 
using bounce buffers.  Actually, thinking about it I agree with you - it 
*ought* to be possible to implement an IOMMU driver that does (at least some) 
of what you'd want to do PCI passthrough...  the Linux APIs do require the 
kernel to be notified of DMA-able memory the driver intends to use.

Cheers,
Mark


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to