Re: virtio DMA API?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 27, 2014 at 01:52:50PM +0200, Michael S. Tsirkin wrote:
> On Wed, Aug 27, 2014 at 08:40:51PM +0930, Rusty Russell wrote:
> > Andy Lutomirski <luto@xxxxxxxxxxxxxx> writes:
> > > Currently, a lot of the virtio code assumes that bus (i.e. hypervisor)
> > > addresses are the same as physical address.  This is false on Xen, so
> > > virtio is completely broken.  I wouldn't be surprised if it also
> > > becomes a problem the first time that someone sticks a physical
> > > "virtio" device on a 32-bit bus on an ARM SOC with more than 4G RAM.
> > >
> > > Would you accept patches to convert virtio_ring and virtio_pci to use
> > > the DMA APIs?  I think that the only real catch will be that
> > > virtio_ring's approach to freeing indirect blocks is currently
> > > incompatible with the DMA API -- it assumes that knowing the bus
> > > address is enough to call kfree, and I don't think that the DMA API
> > > provides a reverse mapping like that.
> > 
> > Hi Andy,
> > 
> >         This has long been a source of contention.  virtio assumes that
> > the hypervisor can decode guest-physical addresses.
> > 
> >         PowerPC, in particular, doesn't want to pay the cost of IOMMU
> > manipulations, and all arguments presented so far for using an IOMMU for
> > a virtio device are weak.  And changing to use DMA APIs would break them
> > anyway.
> > 
> >         Of course, it's Just A Matter of Code, so it's possible to
> > create a Xen-specific variant which uses the DMA APIs.  I'm not sure
> > what that would look like in the virtio standard, however.
> > 
> > Cheers,
> > Rusty.
> 
> For x86 as of QEMU 2.0 there's no iommu.
> So a reasonable thing to do for that platform
> might be to always use iommu *if it's there*.
> My understanding is this isn't the case for powerpc?

Wasn't there some implementation of AMD IOMMU code on QEMU
mailing list floating around? Aha:
https://www.mail-archive.com/kvm@xxxxxxxxxxxxxxx/msg40516.html

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux