From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted Date: Mon, 12 Aug 2019 14:13:24 +0200 Message-ID: <20190812121324.GA9405__18674.8055087932$1565612025$gmane$org@lst.de> References: <87zhrj8kcp.fsf@morokweng.localdomain> <20190810143038-mutt-send-email-mst@kernel.org> <20190810220702.GA5964@ram.ibm.com> <20190811055607.GA12488@lst.de> <20190811064621.GB5964@ram.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20190811064621.GB5964@ram.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Ram Pai Cc: "Michael S. Tsirkin" , Benjamin Herrenschmidt , Alexey Kardashevskiy , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Paul Mackerras , iommu@lists.linux-foundation.org, linuxppc-devel@lists.ozlabs.org, Christoph Hellwig , David Gibson List-Id: virtualization@lists.linuxfoundation.org On Sat, Aug 10, 2019 at 11:46:21PM -0700, Ram Pai wrote: > If the hypervisor (hardware for hw virtio devices) does not mandate a > DMA API, why is it illegal for the driver to request, special handling > of its i/o buffers? Why are we associating this special handling to > always mean, some DMA address translation? Can't there be > any other kind of special handling needs, that has nothing to do with > DMA address translation? I don't think it is illegal per se. It is however completely broken if we do that decision on a system weide scale rather than properly requesting it through a per-device flag in the normal virtio framework.