Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4353895imm; Mon, 6 Aug 2018 23:29:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdrMkEal1im/JbYFT6kOqSxp1RMAx4DvPlmeTdKOQYhHgYnA8I3PMXUpQ552VP7hM/PC3Oo X-Received: by 2002:a17:902:c6:: with SMTP id a64-v6mr16690570pla.180.1533623357866; Mon, 06 Aug 2018 23:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533623357; cv=none; d=google.com; s=arc-20160816; b=q397tKPGGZ6/qJefetaDJI64HMaQ6U+zdBEKWdsCC6i+ANjzZwMIlTBe9LTAdCAU1q AlfHCAhD9CR7z9LWUlYsVofNf9IdlGSM5wYd2OXtO+VQPWylUS9uG5Md9PLGXJLy5D2G na/sYb7333dv9Txa+J1xOB6k5hM2rAzDQSDIXZIvc5Jv3Wc09VwlRjZ0OByvmf6osYXh 9S2CxuByPbsc+xsq5A+W9gYsYGCNp9n/uQYKevDTydBkxWStBezu5aoK1y6airlcXaHC BcwaRD6zynR2emDVpfYOnZ9X1ytKUkmzVrzIX0CpugrJGzWZf+XqboayGAlwJQtyVvyp StKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=F4rh7HgXnyQJR3oXwJCjaVNEhZH0MovozoosbP4eIVw=; b=XLbT5omccyrEBMEJ8Y8+TWHXO1clb0m1QMNAM7tZGqamBTKNDm9HUT04LGQodfzI8I 04lYkm3a7tp9iksy8a8aMKWUZJnaI67O76LjS/QW1zLUdKmcXS4Pq4IVNS10twqMI+l0 z8begB9+C7Qc+OuvnM3bFMJPP+Jmka/cVjEjMH5ZlgFAKRIBLGbRi58npTiiQSMmG8OZ +O5EM7MoSlLOUF5etvHYMErE09HHTaF641d2MM+2bcz2WuVW3aRtbwV2u3RNZjK1UfcN qZPm4bCcjLA2K4CXTEVruST+88iLiwS98PPL5+5r94o/Khd3pdQkHa7HfPSj0uFECrEt WH/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hlC2N5Gw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13-v6si616804pgj.495.2018.08.06.23.29.03; Mon, 06 Aug 2018 23:29:17 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hlC2N5Gw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388204AbeHGIkY (ORCPT + 99 others); Tue, 7 Aug 2018 04:40:24 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48204 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727725AbeHGIkY (ORCPT ); Tue, 7 Aug 2018 04:40:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=F4rh7HgXnyQJR3oXwJCjaVNEhZH0MovozoosbP4eIVw=; b=hlC2N5GwLk+Z4nJI8+XGyJk3s lkfhMktmcYPHQRQEcNCha/S8njMhvGTH02HKOJNxsJUjL0jGzOUhI8RU5STrq7+k6dqBQc17Zx7Om XGPi28W2aZMQsH+oARkUcGlOVjzBtMWdP+aWEEKkTRaN1aDdv3zfmFoPUI3K46w6tpXavVg/gmP1T BePqd0mqmbxHhVQGNhYpUkS6qW3UpfLWOT94r6dNveGhwOQKDBtM0WgP7K+HdCNqSJipXRRVC7zHl ixLUxnkwIzFjPPRz7DWekwHI3TLQRLYbwBk6jeO7rfVYcKccbAe+z+QKrYYyK+Of5WKTxI0PmkGZT wk+TRgmEQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmvSt-0008Ku-KW; Tue, 07 Aug 2018 06:27:31 +0000 Date: Mon, 6 Aug 2018 23:27:31 -0700 From: Christoph Hellwig To: Benjamin Herrenschmidt Cc: "Michael S. Tsirkin" , Christoph Hellwig , Will Deacon , Anshuman Khandual , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, aik@ozlabs.ru, robh@kernel.org, joe@perches.com, elfring@users.sourceforge.net, david@gibson.dropbear.id.au, jasowang@redhat.com, mpe@ellerman.id.au, linuxram@us.ibm.com, haren@linux.vnet.ibm.com, paulus@samba.org, srikar@linux.vnet.ibm.com, robin.murphy@arm.com, jean-philippe.brucker@arm.com, marc.zyngier@arm.com Subject: Re: [RFC 0/4] Virtio uses DMA API for all devices Message-ID: <20180807062731.GA23159@infradead.org> References: <20180803220443-mutt-send-email-mst@kernel.org> <051fd78e15595b414839fa8f9d445b9f4d7576c6.camel@kernel.crashing.org> <20180805031046-mutt-send-email-mst@kernel.org> <20180806164106-mutt-send-email-mst@kernel.org> <20180806233024-mutt-send-email-mst@kernel.org> <0967fc30001323e6e38ed12c8dba8ee3d1aa13f5.camel@kernel.crashing.org> <20180807002857-mutt-send-email-mst@kernel.org> <93518075238a07e9f011774d89bdc652c083f1ba.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93518075238a07e9f011774d89bdc652c083f1ba.camel@kernel.crashing.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 07, 2018 at 08:13:56AM +1000, Benjamin Herrenschmidt wrote: > It would be indeed ideal if all we had to do was setup some kind of > bus_dma_mask on all PCI devices and have virtio automagically insert > swiotlb when necessary. For 4.20 I plan to remove the swiotlb ops and instead do the bounce buffering in the common code, including a direct call to the direct ops to avoid retpoline overhead. For that you still need a flag in virtio that instead of blindly working physical addresses it needs to be treated like a real device in terms of DMA. And for powerpc to make use of that I need to get the dma series I posted last week reviewed and included, otherwise powerpc will have to be excepted (like arm, where rmk didn't like the way the code was factored, everything else has already been taken care of). https://lists.linuxfoundation.org/pipermail/iommu/2018-July/028989.html