Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2362091ybl; Sat, 10 Aug 2019 23:48:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVqUwV+gsglmcrBGfT+zpn4U+TCbmhNdLMKRsUR8yNDORpI7aXGxNSLRnqUsrJWhij60kb X-Received: by 2002:a17:902:54d:: with SMTP id 71mr26687769plf.140.1565506121662; Sat, 10 Aug 2019 23:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565506121; cv=none; d=google.com; s=arc-20160816; b=phyQtDAFT1+qjwJkdXvflKw1Hem7Px5+SapFipHH90N9dh+ldHXgMv33eNAvWMzBDQ 7PQTiV0k4XeLiXzsZEOy4K9NEIL5xQOMTvuQPJtG+79oOxPRedEahFo0haN97dp21nol sPbjU1OGA0aUtk979WeEQH372WBvN5876pKorsOebU0jfIAPN91LwoEJFmWuXXyXlD8a vNJe2Jpz8ZKI6RSxlGRjRpx4nNUDQykOafHwAUFdQcWP+giVsZgPrOP/d1Q+RKNZYYAB rTY4/so+Wu02mBATI5N7+1OnKdNspDl9LBofWM959jtqjnYhTs0KxdPJ1It4oPqh6qJm BUwA== 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=zkJ9gokSx20QI7TyPT08/Ti+x73fWpk26yXrO6b73rk=; b=FTqIo9nxw8/4hdnjNvr+7llHV7eu3qt+fi4cBQ0EJ69IH+J6cxIANOz2jUCfy4g6HO DyKPcxuRZQcMt9wU7Z0V6UFmNSbmGfDrILK3rHZHjgTzZDtak2X5F9IhtuO9NzPW9NXv Jeh5pvr8onwVGNiZ8z6j27INniAgPO+PgN7S9eVCp9U8y5gwIYWAa6jvT/pw0vSLpo55 bsm4LkrKQye2GVN0a5oonhOE9BF+v99dPmhbcG/V2rl/JLF7FAcCt/OJVFu8Kb04XEYA 4ostDeFCLjiseKchoe+4LPds65o5wX6obpBKV5vpfqG1R4L9ZUMZkxKH+s9KJJfFF49O 5O5Q== 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 a6si54032497pla.259.2019.08.10.23.48.03; Sat, 10 Aug 2019 23:48:41 -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 S1726014AbfHKGqf (ORCPT + 99 others); Sun, 11 Aug 2019 02:46:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32656 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725776AbfHKGqf (ORCPT ); Sun, 11 Aug 2019 02:46:35 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7B6gpT3006684 for ; Sun, 11 Aug 2019 02:46:34 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2uabhtbb10-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 11 Aug 2019 02:46:33 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 11 Aug 2019 07:46:32 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sun, 11 Aug 2019 07:46:28 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7B6kRjD40894894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Aug 2019 06:46:27 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 06C9742045; Sun, 11 Aug 2019 06:46:27 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 141EE42042; Sun, 11 Aug 2019 06:46:24 +0000 (GMT) Received: from ram.ibm.com (unknown [9.85.191.17]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sun, 11 Aug 2019 06:46:23 +0000 (GMT) Date: Sat, 10 Aug 2019 23:46:21 -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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190811055607.GA12488@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19081106-0020-0000-0000-0000035E6383 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19081106-0021-0000-0000-000021B36F43 Message-Id: <20190811064621.GB5964@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-11_03:,, 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=575 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908110076 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 11, 2019 at 07:56:07AM +0200, Christoph Hellwig wrote: > sev_active() is gone now in linux-next, at least as a global API. > > And once again this is entirely going in the wrong direction. The only > way using the DMA API is going to work at all is if the device is ready > for it. So we need a flag on the virtio device, exposed by the > hypervisor (or hardware for hw virtio devices) that says: hey, I'm real, > don't take a shortcut. > > And that means on power and s390 qemu will always have to set thos if > you want to be ready for the ultravisor and co games. It's not like we > haven't been through this a few times before, have we? We have been through this so many times, but I dont think, we ever understood each other. I have a fundamental question, the answer to which was never clear. Here it is... 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? -- Ram Pai