Received: by 10.213.65.68 with SMTP id h4csp142558imn; Thu, 5 Apr 2018 19:54:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+CF5OPjTPM9OXEgdVVWrZ3sDaG5pRIOrp+lFkUbonfOXyg7QWUc0QV+jAl5DNT5d475NYA X-Received: by 10.167.131.147 with SMTP id u19mr18779454pfm.99.1522983281029; Thu, 05 Apr 2018 19:54:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522983280; cv=none; d=google.com; s=arc-20160816; b=Xq4FxncVDW5XFXILe7XVum3fQrXDCOEqYbIVcAuLbTEwSKgPXv0TT6PEYxBiaVlHVh jN/u/FXyhc7Lt2RyXD7L1+iQUz8rjm+SK/6VBYNnp2NeQrokkLVxG8Ye1wS8VxOF5c9C s1aPkOYj3KAQHFCi51FYhhK2rzLnfXIqlAR3HtNua0s72kNCPmp8/LMoj7NBYJ4zI5/9 lYPryz8hl3WXp2B4iQsZO94AvdOpcp7u9Mv5irFFrDvyg9Y2VIrK0jC6AsKr75hPq52H smd/vKtgBpzy3jJ1E+pveXlvJvj+IsChP7Z7z08Vmg8DUw7UPax1YmW0bM0q+5CD+RWL StLA== 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 :in-reply-to:mime-version:user-agent:date:from:cc:references:to :subject:arc-authentication-results; bh=7Fe03jaU9B97CGiOX2JCNQ78iLmbuOuD1Pj1fljdxC8=; b=K6T17LH/6GVdx5N4TSMWaSege+6oySyGncenuTeLqWRzV2a9TdVJ2vW9JVb9FLm69T 4eIIkMQ8+i90jCXs/iv4SpU714XSSkCSwsyjK6B5Sbhf3G1VXw/DaMpx1iiISgNV6f5A epHLc44VqrQTuGo3cXK2xbD4GeL67UayoXY6CiHO8cIAVcueLeYzmxU9EadCDTnxEzb+ sV/DH798EAOcMACghHVIbl3fcEexdLhD9E+hbcDLGs2KWgVQhLGJg5qSFxCQAObyJY5L VYmeyKSO7AdM6vFUNhSsFI4zuyoJWxT+oQ3oswSozBkfznOdl5s0DYxCAKzxYRJBtiq/ 74BQ== 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 v76si7172081pfa.96.2018.04.05.19.54.26; Thu, 05 Apr 2018 19:54:40 -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 S1751435AbeDFCxV (ORCPT + 99 others); Thu, 5 Apr 2018 22:53:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57782 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751315AbeDFCxT (ORCPT ); Thu, 5 Apr 2018 22:53:19 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w362nGhe121103 for ; Thu, 5 Apr 2018 22:53:19 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2h5wnfwqfp-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 05 Apr 2018 22:53:18 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Apr 2018 03:53:17 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 6 Apr 2018 03:53:13 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w362rCsJ51773594; Fri, 6 Apr 2018 02:53:12 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2BDEDA4053; Fri, 6 Apr 2018 03:45:37 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 71AB1A4051; Fri, 6 Apr 2018 03:45:35 +0100 (BST) Received: from localhost.localdomain (unknown [9.122.211.43]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 6 Apr 2018 03:45:35 +0100 (BST) Subject: Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU To: Benjamin Herrenschmidt , "Michael S. Tsirkin" References: <20180405105631.9514-1-khandual@linux.vnet.ibm.com> <3e1b113b-79ca-b700-5be9-10c66d74aabe@linux.vnet.ibm.com> <20180405175326-mutt-send-email-mst@kernel.org> <1522940983.21446.205.camel@kernel.crashing.org> <20180405213042-mutt-send-email-mst@kernel.org> <1522963113.21446.211.camel@kernel.crashing.org> Cc: robh@kernel.org, aik@ozlabs.ru, jasowang@redhat.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, joe@perches.com, david@gibson.dropbear.id.au, linuxppc-dev@lists.ozlabs.org, elfring@users.sourceforge.net From: Anshuman Khandual Date: Fri, 6 Apr 2018 08:23:10 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1522963113.21446.211.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18040602-0008-0000-0000-000004E75044 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040602-0009-0000-0000-00001E7A685E Message-Id: <70cb433f-a8f7-5199-3c96-a760c7624804@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-04-06_02:,, 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804060027 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/06/2018 02:48 AM, Benjamin Herrenschmidt wrote: > On Thu, 2018-04-05 at 21:34 +0300, Michael S. Tsirkin wrote: >>> In this specific case, because that would make qemu expect an iommu, >>> and there isn't one. >> >> >> I think that you can set iommu_platform in qemu without an iommu. > > No I mean the platform has one but it's not desirable for it to be used > due to the performance hit. Also the only requirement is to bounce the I/O buffers through SWIOTLB implemented as DMA API which the virtio core understands. There is no need for an IOMMU to be involved for the device representation in this case IMHO.