Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4464767imm; Tue, 7 Aug 2018 01:50:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfYzc6+zNrM6/P1MxqSJuyE0nrjDeAazG6c/MeVyi3ZnsBxt0vmvWUJVFm7DsNPliJeOAiG X-Received: by 2002:a63:d916:: with SMTP id r22-v6mr17407154pgg.381.1533631819688; Tue, 07 Aug 2018 01:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533631819; cv=none; d=google.com; s=arc-20160816; b=TTslID42C5Oi3PNE1zZvU2cjfc48bMnsYPVt7UUtnBrDVJiZ8iKlX2OWNtuoey+sQL vtxmfY1Dzt1PDbOICWT9eRglQU+8tVJPkvNgCH4fnPhCCtcNzoJ+Vk6IaXYATGLhSJMO YTLHqbcl7qz/rzPNy3asYjMB556A4twRNAgI6T2sYDQX6OpJKWsIMeDTOUtS0SYyMjls HUaOwVh+HooKUCoAs+oidU245e7Jazy8Rt/6dZwKVd0+9YMD2763Cy0QYjpqOK6k4Tzh nbKNI7kvtTnutKeYon5hCUaFzUhXo1H2n05I6uxLXJU/z4/SWOXns+nL8OwtBPUrreEe 8f8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=4aFKVNKC1yc//FlbLNOiJrVhAKoPRPfi37fMrSIYRsk=; b=lw2EcSrOZb05M85h3c3AVed9Xu4VXBmG96CkFAfne8CieVtHOcGWMhfwGAMupVhc/4 YF2kRHZAbKqjsS5iTnnlWOurZmNjBRoAaTXTQ/gPkmQCstsdL2QfZOYpQEIFQ0IaDJYD 5ErHJTOHn+cMJ41XLcV6efVOUGtEoWRanyg3AxrauCaaTggq5P1O/WNmW79Se82d3rDS OYSiwxOBUzXGejKHXf6jzgbaOXDBUOycRsJqMEIl8weVGI997+O+Ntl/aanqV2IUv6pK gaAHTAvoNZviNCwRHIMGbNBW1e60N41gv0wryKDjYiWMA1SGP7HhiWUSlQaQwI6qseO3 GcxQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18-v6si758675pge.666.2018.08.07.01.49.52; Tue, 07 Aug 2018 01:50:19 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387855AbeHGJDA (ORCPT + 99 others); Tue, 7 Aug 2018 05:03:00 -0400 Received: from gate.crashing.org ([63.228.1.57]:38906 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727224AbeHGJDA (ORCPT ); Tue, 7 Aug 2018 05:03:00 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w776i1Uj029530; Tue, 7 Aug 2018 01:44:02 -0500 Message-ID: <7622efcbb499919616f165266968565b1d329a91.camel@kernel.crashing.org> Subject: Re: [RFC 0/4] Virtio uses DMA API for all devices From: Benjamin Herrenschmidt To: Christoph Hellwig Cc: "Michael S. Tsirkin" , 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 Date: Tue, 07 Aug 2018 16:44:01 +1000 In-Reply-To: <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> <20180807062731.GA23159@infradead.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.4 (3.28.4-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-08-06 at 23:27 -0700, Christoph Hellwig wrote: > 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. But you will still call the swiotlb infrastructure, right ? IE, I sitll need to control where/how the swiotlb "pool" is allocated. > > 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 Yes, I saw your series. I'm just back from a week of travel, I plan to start reviewing it this week if Michael doesn't beat me to it. Cheers, Ben.