Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp152143ybl; Mon, 12 Aug 2019 13:30:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZq5rbRBABe6q7K0hUHYSyhtq5OxKUzm8cksuE4RDLwzA0tBmdhGv/kw8Vrsh/MJXbRAKc X-Received: by 2002:a63:7c0d:: with SMTP id x13mr31427015pgc.360.1565641855211; Mon, 12 Aug 2019 13:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565641855; cv=none; d=google.com; s=arc-20160816; b=U6sr33wZ2Jin+ylP4xsgL5MtJ6FhPG9zmw0c5cxE9iaCI8Z9TFRxh/mU4mB+vEdyhS bYLF+95ShfXXv9r6gw7EOliTLK8Lt6SSOyWJD0KMGTzv92dsiMALqcBnrM6rWNYG308T 5hIjDDIOviQEkTlQNy3ImUy37TsTVTdDhUqIaI2cyvCPzARKPzfnci4ALcba7zY7MZax DZAVi86WvPoF/ZH5ql3eFR3zgKfy6zdCI4ayLquIRidhrWgFg1JAQueWRNoniRHIJZPe t9JIVHFXwAVkZJM4Xk+P2t4zmgsVawZIuQrHWqFSVOj2oqcS3DXpEJiljL7E/DIO93lg ijIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:cc:to:from :date; bh=gShQ71v/jv9mUK+4a4PfAbsblmyRusxDoZ0oI3tC0yg=; b=WlfJqm2W0cWbAkc84L8KBUhOE6z8QT/RJkypW0XzJLOdaFWyNkELQmE4oT1diKK/au 1wK8xgVnwjG80YMqwQbhdG4FpP3iYTjebXtB4UnBCbsSWSouH17wzTETA3wA7FjZRkmm bwZ5zs4Synz7s5Jn9/R0hMATa+1h0gmfdCZMax7b3HoE4n5u1r4k5KrcCziRfpL3gj4e jHpo/+iMo+OVMrb7OnFR38Ls92hDMs2AenY2HqMhooyyF08o+mrlZFmU0VaOXF861QKW 6EfzFNNzWaIF8fyCr8v9RPLRc9D8PZLMljbFood3GBOVj8FEl4AQlxSyuIgSPeCAGS4b tIrw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si10593818plr.158.2019.08.12.13.30.39; Mon, 12 Aug 2019 13:30:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727487AbfHLU3g (ORCPT + 99 others); Mon, 12 Aug 2019 16:29:36 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:61448 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726907AbfHLU3g (ORCPT ); Mon, 12 Aug 2019 16:29:36 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7CKLwFx099237 for ; Mon, 12 Aug 2019 16:29:34 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ubcqvwju6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 12 Aug 2019 16:29:34 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Aug 2019 21:29:32 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 12 Aug 2019 21:29:27 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7CKTQn254526030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Aug 2019 20:29:26 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1065A404D; Mon, 12 Aug 2019 20:29:25 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C6E1A4055; Mon, 12 Aug 2019 20:29:23 +0000 (GMT) Received: from ram.ibm.com (unknown [9.85.191.17]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 12 Aug 2019 20:29:22 +0000 (GMT) Date: Mon, 12 Aug 2019 13:29:20 -0700 From: Ram Pai To: Christoph Hellwig Cc: "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 Reply-To: Ram Pai 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> <20190812121324.GA9405@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190812121324.GA9405@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19081220-0008-0000-0000-000003084E4A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19081220-0009-0000-0000-00004A265E9B Message-Id: <20190812202920.GC5964@ram.ibm.com> Subject: RE: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-12_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=710 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908120202 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 12, 2019 at 02:13:24PM +0200, Christoph Hellwig wrote: > 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. if the decision has to be system-wide; for reasons known locally only to the kernel/driver, something that is independent of any device-flag, what would be the mechanism? RP