RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-29 Thread Peng Fan
nel.org; linux-kernel@vger.kernel.org; > virtualizat...@lists.linux-foundation.org; l...@kernel.org; jgr...@suse.com; > boris.ostrov...@oracle.com; Andy Duan > Subject: Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain > > On Fri, Jan 25, 2019 at 09:45:26AM +, Peng

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-28 Thread h...@infradead.org
On Fri, Jan 25, 2019 at 09:45:26AM +, Peng Fan wrote: > Just have a question, > > Since vmalloc_to_page is ok for cma area, no need to take cma and per device > cma into consideration right? The CMA area itself it a physical memory region. If it is a non-highmem region you can call virt_to

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-25 Thread Stefano Stabellini
On Fri, 25 Jan 2019, Peng Fan wrote: > > On Wed, Jan 23, 2019 at 01:04:33PM -0800, Stefano Stabellini wrote: > > > If vring_use_dma_api is actually supposed to return true when > > > dma_dev->dma_mem is set, then both Peng's patch and the patch I wrote > > > are not fixing the real issue here. > >

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-25 Thread Peng Fan
nel.org; linux-kernel@vger.kernel.org; > virtualizat...@lists.linux-foundation.org; l...@kernel.org; jgr...@suse.com; > boris.ostrov...@oracle.com > Subject: Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain > > On Wed, Jan 23, 2019 at 01:04:33PM -0800, Stefano Stabellin

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-24 Thread Michael S. Tsirkin
inux-foundation.org; > > > l...@kernel.org; jgr...@suse.com; boris.ostrov...@oracle.com; > > > bjorn.anders...@linaro.org; jli...@xilinx.com > > > Subject: Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain > > > > > > On Wed, 23 Jan 2019, h...@infrade

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-24 Thread Stefano Stabellini
edhat.com; jasow...@redhat.com; > > xen-de...@lists.xenproject.org; linux-remotep...@vger.kernel.org; > > linux-kernel@vger.kernel.org; virtualizat...@lists.linux-foundation.org; > > l...@kernel.org; jgr...@suse.com; boris.ostrov...@oracle.com; > > bjorn.anders...@linaro.org; jli..

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-23 Thread Peng Fan
ep...@vger.kernel.org; > linux-kernel@vger.kernel.org; virtualizat...@lists.linux-foundation.org; > l...@kernel.org; jgr...@suse.com; boris.ostrov...@oracle.com; > bjorn.anders...@linaro.org; jli...@xilinx.com > Subject: Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_d

RE: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-23 Thread Peng Fan
ger.kernel.org; linux-kernel@vger.kernel.org; > virtualizat...@lists.linux-foundation.org; l...@kernel.org; jgr...@suse.com; > boris.ostrov...@oracle.com > Subject: Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain > > On Mon, 21 Jan 2019, Peng Fan wrote: > > on i.MX

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-23 Thread Stefano Stabellini
On Wed, 23 Jan 2019, h...@infradead.org wrote: > On Wed, Jan 23, 2019 at 01:04:33PM -0800, Stefano Stabellini wrote: > > If vring_use_dma_api is actually supposed to return true when > > dma_dev->dma_mem is set, then both Peng's patch and the patch I wrote > > are not fixing the real issue here. >

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-23 Thread h...@infradead.org
On Wed, Jan 23, 2019 at 01:04:33PM -0800, Stefano Stabellini wrote: > If vring_use_dma_api is actually supposed to return true when > dma_dev->dma_mem is set, then both Peng's patch and the patch I wrote > are not fixing the real issue here. > > I don't know enough about remoteproc to know where t

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-23 Thread Stefano Stabellini
On Tue, 22 Jan 2019, h...@infradead.org wrote: > On Tue, Jan 22, 2019 at 11:59:31AM -0800, Stefano Stabellini wrote: > > > if (!virtio_has_iommu_quirk(vdev)) > > > return true; > > > > > > @@ -260,7 +262,7 @@ static bool vring_use_dma_api(struct virtio_device > > > *vdev) > > >*

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-22 Thread h...@infradead.org
On Tue, Jan 22, 2019 at 11:59:31AM -0800, Stefano Stabellini wrote: > > if (!virtio_has_iommu_quirk(vdev)) > > return true; > > > > @@ -260,7 +262,7 @@ static bool vring_use_dma_api(struct virtio_device > > *vdev) > > * the DMA API if we're a Xen guest, which at least allows

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-22 Thread Michael S. Tsirkin
On Tue, Jan 22, 2019 at 11:59:31AM -0800, Stefano Stabellini wrote: > On Mon, 21 Jan 2019, Peng Fan wrote: > > on i.MX8QM, M4_1 is communicating with DomU using rpmsg with a fixed > > address as the dma mem buffer which is predefined. > > > > Without this patch, the flow is: > > vring_map_one_sg -

Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain

2019-01-22 Thread Stefano Stabellini
On Mon, 21 Jan 2019, Peng Fan wrote: > on i.MX8QM, M4_1 is communicating with DomU using rpmsg with a fixed > address as the dma mem buffer which is predefined. > > Without this patch, the flow is: > vring_map_one_sg -> vring_use_dma_api > -> dma_map_page > ->