Re: [RFC 1/4] virtio: Define virtio_direct_dma_ops structure

2018-07-30 Thread Anshuman Khandual
On 07/30/2018 02:54 PM, Christoph Hellwig wrote: >> +/* >> + * Virtio direct mapping DMA API operations structure >> + * >> + * This defines DMA API structure for all virtio devices which would not >> + * either bring in their own DMA OPS from architecture or they would not >> + * like to use archi

Re: [RFC 1/4] virtio: Define virtio_direct_dma_ops structure

2018-07-30 Thread Christoph Hellwig
> +/* > + * Virtio direct mapping DMA API operations structure > + * > + * This defines DMA API structure for all virtio devices which would not > + * either bring in their own DMA OPS from architecture or they would not > + * like to use architecture specific IOMMU based DMA OPS because QEMU > + *

[RFC 1/4] virtio: Define virtio_direct_dma_ops structure

2018-07-19 Thread Anshuman Khandual
Current implementation of DMA API inside virtio core calls device's DMA OPS callback functions when the flag VIRTIO_F_IOMMU_PLATFORM flag is set. But in absence of the flag, virtio core falls back calling basic transformation of the incoming SG addresses as GPA. Going forward virtio should only cal