Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-28 Thread Christian Borntraeger
Am 28.10.2015 um 15:04 schrieb David Woodhouse: > On Wed, 2015-10-28 at 14:52 +0900, Christian Borntraeger wrote: >>0059b25a: e3201024 lg %r2,32(%r1) >> #0059b260: e310b0a4 lg %r1,160(%r11) >> >0059b266: 4810100c

Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-28 Thread David Woodhouse
On Wed, 2015-10-28 at 14:52 +0900, Christian Borntraeger wrote: >0059b25a: e3201024 lg %r2,32(%r1) > #0059b260: e310b0a4 lg %r1,160(%r11) > >0059b266: 4810100c lh %r1,12(%r1) Precisely what is

Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-28 Thread Christian Borntraeger
Am 28.10.2015 um 15:04 schrieb David Woodhouse: > On Wed, 2015-10-28 at 14:52 +0900, Christian Borntraeger wrote: >>0059b25a: e3201024 lg %r2,32(%r1) >> #0059b260: e310b0a4 lg %r1,160(%r11) >> >0059b266: 4810100c

Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-28 Thread David Woodhouse
On Wed, 2015-10-28 at 14:52 +0900, Christian Borntraeger wrote: >0059b25a: e3201024 lg %r2,32(%r1) > #0059b260: e310b0a4 lg %r1,160(%r11) > >0059b266: 4810100c lh %r1,12(%r1) Precisely what is

Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-27 Thread Christian Borntraeger
Am 28.10.2015 um 14:30 schrieb Andy Lutomirski: > +static void vring_unmap_one(const struct vring_virtqueue *vq, > + struct vring_desc *desc) > +{ > + u16 flags = virtio16_to_cpu(vq->vq.vdev, desc->flags); > + > + if (flags & VRING_DESC_F_INDIRECT) { > +

[PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-27 Thread Andy Lutomirski
virtio_ring currently sends the device (usually a hypervisor) physical addresses of its I/O buffers. This is okay when DMA addresses and physical addresses are the same thing, but this isn't always the case. For example, this never works on Xen guests, and it is likely to fail if a physical

[PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-27 Thread Andy Lutomirski
virtio_ring currently sends the device (usually a hypervisor) physical addresses of its I/O buffers. This is okay when DMA addresses and physical addresses are the same thing, but this isn't always the case. For example, this never works on Xen guests, and it is likely to fail if a physical

Re: [PATCH v2 2/3] virtio_ring: Support DMA APIs

2015-10-27 Thread Christian Borntraeger
Am 28.10.2015 um 14:30 schrieb Andy Lutomirski: > +static void vring_unmap_one(const struct vring_virtqueue *vq, > + struct vring_desc *desc) > +{ > + u16 flags = virtio16_to_cpu(vq->vq.vdev, desc->flags); > + > + if (flags & VRING_DESC_F_INDIRECT) { > +