Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1257620
| From | Joerg Roedel <jroedel@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] virtio_pci: Use the DMA API |
| Date | 2015-10-28 04:00 +0100 |
| Message-ID | <qop7Y-57O-9@gated-at.bofh.it> (permalink) |
| References | <qonzc-4kh-3@gated-at.bofh.it> <qonzc-4kh-15@gated-at.bofh.it> <qoovf-4Tc-5@gated-at.bofh.it> <qooEW-4Wx-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Oct 28, 2015 at 11:22:52AM +0900, David Woodhouse wrote: > On Wed, 2015-10-28 at 11:15 +0900, Joerg Roedel wrote: > > I think a good test for that is to boot a virtio kvm-guest with > > swiotlb=force and see if it still works. > > That's useful but doesn't cover the cases where dma_wmb() is needed, > right? > > We should make sure we're handling descriptors properly as we would for > real hardware, and ensuring that addresses etc. are written to the > descriptor (and a write barrier occurs) *before* the bit is set which > tells the 'hardware' that it owns that descriptor. Hmm, good question. The virtio code has virtio_rmb/wmb and should already call it in the right places. The virtio-barriers default to rmb()/wmb() unless weak_barriers is set, in which case it calls dma_rmb()/wmb(), just a compiler barrier on x86. And weak_barriers is set by the virtio drivers when creating the queue, and the drivers should know what they are doing. Saying this, I think the virtio-drivers should already get this right. Joerg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 3/3] virtio_pci: Use the DMA API Andy Lutomirski <luto@kernel.org> - 2015-10-28 02:20 +0100
Re: [PATCH 3/3] virtio_pci: Use the DMA API Joerg Roedel <jroedel@suse.de> - 2015-10-28 03:20 +0100
Re: [PATCH 3/3] virtio_pci: Use the DMA API Joerg Roedel <jroedel@suse.de> - 2015-10-28 03:30 +0100
Re: [PATCH 3/3] virtio_pci: Use the DMA API David Woodhouse <dwmw2@infradead.org> - 2015-10-28 03:30 +0100
Re: [PATCH 3/3] virtio_pci: Use the DMA API Joerg Roedel <jroedel@suse.de> - 2015-10-28 04:00 +0100
csiph-web