Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1910599ybv; Fri, 21 Feb 2020 05:33:37 -0800 (PST) X-Google-Smtp-Source: APXvYqytgBkLZMZPDsY2e1v3djI5MgzwtMdXs05oDjsfOB+Vn64MJljn/sEGI4qUbnWe8D+Ksh7g X-Received: by 2002:a9d:6748:: with SMTP id w8mr13887958otm.335.1582292017665; Fri, 21 Feb 2020 05:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582292017; cv=none; d=google.com; s=arc-20160816; b=cYcfo3fkPNG5YuuV3z1SZy5819oDtcx1SGIJiuSTFUwcnPQivQFOzbDcfreZknxuIb mAZNnoKtOE8x+oSpAqH3FmBKRlHk4kJzpLc8JO6D90gE+VfJW5CLbbMUTYACkVUE0w6/ oXtcu2cezadX1+PAvMifb2MC3rBsU+0CM6FTooNH512RqqjiDSx1S+LaaW18GunOSRvD e6IhkrfYAMy40OlmdIb0tFDJ2s19PLzLFstnXEOCDq3FAHt00PIdOlcnFbzj7z8JkoMm 3zZvcJ6y4clL9VQbk8zSY7mfVLRldehjlFwVZcwzaAOiXpXNnNQZxNZ+3eTu1AxJCrqf eHVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:organization:references:in-reply-to:subject:cc:to:from :date; bh=EzlJ0bH65tp764NEpo57j0yKXFBG4PxXCXK7Fa2Qwwc=; b=SGLUF7b/MQ7P5l3m+oviSRikuNuyXAbUa7DKzcPJqWYsbAEgtHuY1gy+qf9XdJJ0OU z/jfv/i9TBfvrIJxeA2R0HqrA4tcsXqGLf4u9ZyxZ4RUa+yK6Tm1BXDQc/6UYkwEwyAI RRHDVtc/lGuL/VRMXkKfk+fmpk+1LsFwgp+y/KxlI0Xp2iW8L7YB/sq3CN+vegRErY/p Emrh1TWY/vxiwdlVRlvb/UtYUIoL1fIPG/iTjMAPg1QlN24D4O257sIkPulhT9iuDdYS 74tAm7DkoYrgEPyWOHsuPlKaMtqhvJEqbzCUfXarGNVVN022AvNTnYwRluJCRokdOlEp J/6w== 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 d5si738205oij.139.2020.02.21.05.33.24; Fri, 21 Feb 2020 05:33:37 -0800 (PST) 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 S1728103AbgBUNcv (ORCPT + 99 others); Fri, 21 Feb 2020 08:32:51 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60534 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727053AbgBUNcv (ORCPT ); Fri, 21 Feb 2020 08:32:51 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01LDP1iH008827 for ; Fri, 21 Feb 2020 08:32:49 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y8ubr1pp6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 21 Feb 2020 08:32:49 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Feb 2020 13:32:46 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 21 Feb 2020 13:32:41 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01LDVOFv30474646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Feb 2020 13:31:24 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88636A4069; Fri, 21 Feb 2020 13:31:24 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 121EAA4055; Fri, 21 Feb 2020 13:31:24 +0000 (GMT) Received: from oc2783563651 (unknown [9.152.224.149]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 21 Feb 2020 13:31:24 +0000 (GMT) Date: Fri, 21 Feb 2020 14:31:21 +0100 From: Halil Pasic 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 Subject: Re: [PATCH 2/2] virtio: let virtio use DMA API when guest RAM is protected In-Reply-To: <8194d502-07d8-b798-a2b5-606a8c05b895@redhat.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> Organization: IBM X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 20022113-0016-0000-0000-000002E8FCB2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20022113-0017-0000-0000-0000334C1D34 Message-Id: <20200221143121.618134e8.pasic@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-21_03:2020-02-19,2020-02-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 spamscore=0 bulkscore=0 impostorscore=0 mlxlogscore=798 lowpriorityscore=0 malwarescore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002210104 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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