Received: by 10.213.65.68 with SMTP id h4csp2019947imn; Thu, 5 Apr 2018 07:41:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+qyNajiVNtlgdMIaPBVN5vDCz3eXwNE8n8cs0kkqSrrGronT4vtua/0Q/kiPdTJyRvpRs+ X-Received: by 10.99.183.67 with SMTP id w3mr15094358pgt.153.1522939283547; Thu, 05 Apr 2018 07:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522939283; cv=none; d=google.com; s=arc-20160816; b=NzBTHdOrlqWsN+8wGGrYEadcxXkJoOgOmujEx/OkS5naWYY6TPQqTVsa8La2ME3g3L jHBoYbbVHoWEmg3ZoWjRkKQayt3fAfRswUwlPBZwpeDx6ro796WdmLRYxQGwOT12t4y8 fidUelLn1IZ+vYqiAmFD+w7EqwQJeiUdGKcveWANmQrs5xbPtbCwmPe0zMoSNuU0lfTf Rg91fSq2HmEg9gSaliAIG7M+j1/eF1QBWA3ccqKUia6Nd5hhOuceaFyAzR/vLL6bo9QY LnYTlYos9Sqi3FfvM4RWK1YtSveR6mSE1NvkSPkjvFbLSBZNtqie8K7R8dX12e/KFEv+ KfNA== 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=/VyNvVidjiRnN07TP8alAvJXKo0NhmmFR5fmKKfAHhQ=; b=LCzravhhFlVU7+fkW2a58GBiqLmFhveDlWlL6apigafiiFQ1a/PRXLzOiCz2M5UNBw W1T9OedR9iorfeznd0woPjgYrUg4LxWrpoaYwbMi84+yG7wDxG7jXfqyWTEPs+mMo8wR z1lnCoiIHK5aJYgR/T5es4iqgsSQIAItWel+1rfVbxykdOCsm5XwYDEh9HUyebxNTAxi QQJbo6CpJwPxUHPSdSbfjfOUsj6ofAXdde0+XYgjH6jSe2NnD6ld6+igOHVDxfyt7fap qwWaSIzfqs9mVf1p2CWt/BlHyJA/461IRJJ0uMs/daRvaIpJvJTG7JqnBtGoMmTn8T3w Loyw== 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 65si5470583pgj.618.2018.04.05.07.41.08; Thu, 05 Apr 2018 07:41:23 -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 S1751344AbeDEOkC (ORCPT + 99 others); Thu, 5 Apr 2018 10:40:02 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54198 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbeDEOkB (ORCPT ); Thu, 5 Apr 2018 10:40:01 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w35Ed0hX120132 for ; Thu, 5 Apr 2018 10:39:59 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h5ms5b7nj-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 05 Apr 2018 10:39:59 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Apr 2018 15:39:53 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 5 Apr 2018 15:39:49 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w35Ednrh6291964; Thu, 5 Apr 2018 14:39:49 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5257052049; Thu, 5 Apr 2018 14:30:55 +0100 (BST) Received: from localhost.localdomain (unknown [9.77.201.225]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1FD6F52043; Thu, 5 Apr 2018 14:30:52 +0100 (BST) Subject: Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU To: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20180405105631.9514-1-khandual@linux.vnet.ibm.com> Cc: robh@kernel.org, aik@ozlabs.ru, jasowang@redhat.com, joe@perches.com, linuxppc-dev@lists.ozlabs.org, elfring@users.sourceforge.net, david@gibson.dropbear.id.au, "Michael S. Tsirkin" From: Anshuman Khandual Date: Thu, 5 Apr 2018 20:09:30 +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: <20180405105631.9514-1-khandual@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18040514-0044-0000-0000-00000543DC6E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040514-0045-0000-0000-00002883F93B Message-Id: <3e1b113b-79ca-b700-5be9-10c66d74aabe@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-04-05_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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804050153 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/2018 04:26 PM, Anshuman Khandual wrote: > There are certian platforms which would like to use SWIOTLB based DMA API > for bouncing purpose without actually requiring an IOMMU back end. But the > virtio core does not allow such mechanism. Right now DMA MAP API is only > selected for devices which have an IOMMU and then the QEMU/host back end > will process all incoming SG buffer addresses as IOVA instead of simple > GPA which is the case for simple bounce buffers after being processed with > SWIOTLB API. To enable this usage, it introduces an architecture specific > function which will just make virtio core front end select DMA operations > structure. > > Signed-off-by: Anshuman Khandual + "Michael S. Tsirkin"