Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3712485ybl; Mon, 12 Aug 2019 05:14:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz2EAC0he2JSD2Yt0NHS3oTOjaNc0jDdaPlUqZiChLPyM5MrqoD18z6YNBoXJooElRZjd0 X-Received: by 2002:a17:902:4383:: with SMTP id j3mr25913468pld.69.1565612068545; Mon, 12 Aug 2019 05:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565612068; cv=none; d=google.com; s=arc-20160816; b=a42VWmmM0xvIa1o/dA+nBs18x1ZnkqdO23vJehYFPigDWoSaAW/IVQsqUivIeN2Glm ft9AUk/YraQnge7QCns54psDN9xjJ3SkL0T+qOTsCHt/17b/yzK5nZ0YXSb01Cp+nqxm k2asSPrhJZmK2Wiwwcp9pwk/Jlb+B/P9o1T//oi0pCrknY5A2xn6YxnrFUq+1lVgbtIo 6MrI7dJoXdZafsgTSe4x1oXU7kRDi/LtWbpgvaJbOSPlMLStUqeBNFHw5NhKYDsgM4L8 dDzqIuwXadwUzxRl4bt+uc5L3r1SVcBF0rnPYP5S1q6Wb98bP8bdcg+8V3ZKr5fIud8z jygQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=avPSfMgSYD0HfKnTeETtRffWk1VZ9tSp8NqyrmwlnCg=; b=Br3uesj4YxfvpGLXJvmxn/ePILBfjdfjPTMoHhlAin12jGyKwvs4DOOOo74X3d3Wqp gHpBYSu1lsULvfc7B5YXY5Bx1MV+E5epfv3HtHEimpd1HusMK2Gi2U4oiuopdlXo2cty RY9ITKQgiK1kbnMGpOBXohM0pBEizQThANtztUWUaOY7SzWBAj3Y64gmznlSe5B2gSRK cjDW5FXUfzzgoy3iEgw6fDIrIpW6QvWYhVJlkPXnPM2GVaYhuGUjhX0tF/RRyoR6IiWY DM2tlOY6VTLO9rmBKi8jaJcMoTop252vyn8NCDh7gUzO9VE4qTwSjne7/1xNVSEdRZQL W+uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si1796220pfz.197.2019.08.12.05.14.13; Mon, 12 Aug 2019 05:14:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728294AbfHLMN3 (ORCPT + 99 others); Mon, 12 Aug 2019 08:13:29 -0400 Received: from verein.lst.de ([213.95.11.211]:47869 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbfHLMN3 (ORCPT ); Mon, 12 Aug 2019 08:13:29 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 32BC4227A81; Mon, 12 Aug 2019 14:13:25 +0200 (CEST) Date: Mon, 12 Aug 2019 14:13:24 +0200 From: Christoph Hellwig To: Ram Pai Cc: Christoph Hellwig , "Michael S. Tsirkin" , Thiago Jung Bauermann , virtualization@lists.linux-foundation.org, linuxppc-devel@lists.ozlabs.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Jason Wang , David Gibson , Alexey Kardashevskiy , Paul Mackerras , Benjamin Herrenschmidt Subject: Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted Message-ID: <20190812121324.GA9405@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-Disposition: inline In-Reply-To: <20190811064621.GB5964@ram.ibm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.