From mboxrd@z Thu Jan 1 00:00:00 1970 From: Halil Pasic Subject: Re: [PATCH 2/2] virtio: let virtio use DMA API when guest RAM is protected Date: Fri, 21 Feb 2020 14:31:21 +0100 Message-ID: <20200221143121.618134e8.pasic@linux.ibm.com> References: <20200220160606.53156-1-pasic@linux.ibm.com> <20200220160606.53156-3-pasic@linux.ibm.com> <20200220161309.GB12709@lst.de> <20200221025915.GB2298@umbus.fritz.box> <8194d502-07d8-b798-a2b5-606a8c05b895@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <8194d502-07d8-b798-a2b5-606a8c05b895@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Jason Wang Cc: David Gibson , Christoph Hellwig , "Michael S. Tsirkin" , Marek Szyprowski , Robin Murphy , linux-s390@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Christian Borntraeger , Janosch Frank , Viktor Mihajlovski , Cornelia Huck , Ram Pai , Thiago Jung Bauermann , "Lendacky, Thomas" , Michael Mueller List-Id: virtualization@lists.linuxfoundation.org On Fri, 21 Feb 2020 11:41:57 +0800 Jason Wang wrote: > > I *think* what you are suggesting here is that virtio devices that > > have !F_IOMMU_PLATFORM should have their dma_ops set up so that the > > DMA API treats IOVA==PA, which will satisfy what the device expects. > > > Can this work for swiotlb? It works on s390. I guess it would be the responsibility of however provides the dma ops for the virtio device to ensure that if !F_IOMMU_PLATFORM the addresses are GPA like *mandated* by the VIRTIO specification. Regards, Halil