Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2939780pxv; Sun, 25 Jul 2021 10:38:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzouIWO4JTE7AXSXPjw8Jet+t2QQjVKCJn2bz3N2ieSGkQeY/zWVLZjqqBBfMiATKj9QjqN X-Received: by 2002:a05:6638:3a4:: with SMTP id z4mr12961041jap.65.1627234697390; Sun, 25 Jul 2021 10:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627234697; cv=none; d=google.com; s=arc-20160816; b=SKOBvRBQIQ0+YmV7m6IfPJAKDMqvQdDe/BHz1y8q8yCS0p1KG9B0xlU8hGZf53rF6H b2b4j85A4cim0yjGa6SQIENdPAF0w//booQZ4ODBYhmRfdVLJJzt15cHzGLjJLjEKrdX HXyXlIdvGCDMeNIfxPjpaxbxrdeieibbmcke1HWDTBUj370qAEyqT7Kvc/VgWftRNm68 jDym1KnEeki3b5iFfGSpsg9WNX82L+A+ZbPkaA84quLncPuHG/LaL/9p4b/ucBVhExwM 4jENDf+D+Xc3C70hJfY739oEu/ayrEqG4FTIe6WPuHQTjZYpRLOjVff9TCRPjbs+WfTL SnjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VWlRNY3LlmubsZmgJXQ96OY7Q2TJYsaXTfyxii0FK9E=; b=IK+n0XVpUNIO6vcoENsZ7/DVVz8jUQhHmGpRc+q7Dt8ohj9QC7+kKJAJm8LMH+rds9 wNmZk7RciqZglNEMOokAHI2LEHgNwLsjQKGa8PVxUUPc8EUCW4iSfMAZxLnEP5QhiUNZ BXxO7c+gnAeub9+0rfstsYLM4W3w9dUZpahT31/gxFi8j/l7/w8VlvBPD8m+goNqywxe huj3fykT/w2MjkWco0nquOF/D9jJPG9fInKQ5+PoMLTdZ0We8TgcvYe6mWyMJIPe3s0C 4mqd3hJsqhNr/4J6J+bfItj9FQGiHs3/T0uMW6waDUTVBk2NXsvJv8ehoTfus0/PFlx1 tdAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kEoCBUbJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si10572634ioc.42.2021.07.25.10.38.06; Sun, 25 Jul 2021 10:38:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kEoCBUbJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230217AbhGYQ4d (ORCPT + 99 others); Sun, 25 Jul 2021 12:56:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229545AbhGYQ4d (ORCPT ); Sun, 25 Jul 2021 12:56:33 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A181C061757 for ; Sun, 25 Jul 2021 10:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=VWlRNY3LlmubsZmgJXQ96OY7Q2TJYsaXTfyxii0FK9E=; b=kEoCBUbJ66NGZotknOlYmGqFPg wlFmNe2NWjqIltXcoSf3v7dCsWDjXXqxroveipRGwjEdIUHCg1plfT6DsE/AVe2VQV2Q9Dt5u+Hd6 4AV1dSJTKRnBKNDa33zK8Wlxv+2M+uRzxrMN4sbOR4B0TPBuF+UrjLxXcdqWH0gBZuyTQDc5x5lt0 cw+QA1zx/9Tuv2G+cg2WscdhSbMW96GddtYwbuZh0GfKFJ6JNpoEyVsDHxsQgo/czJUh/d6rYBOXD Gj/pT1YsMZ8ir4UwHxdIJ8jDQSazGiv718ydYzF0PXmJv9ULJNfeaUCgOTv3ak+yNk3pWWI63rQ0h g9y9KuGA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7i2u-00DDRb-Gh; Sun, 25 Jul 2021 17:36:24 +0000 Date: Sun, 25 Jul 2021 18:36:12 +0100 From: Christoph Hellwig To: Linus Torvalds Cc: Christoph Hellwig , Linux Kernel Mailing List , iommu Subject: Re: [GIT PULL] dma-mapping fix for Linux 5.14 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 25, 2021 at 09:50:29AM -0700, Linus Torvalds wrote: > On Sat, Jul 24, 2021 at 11:03 PM Christoph Hellwig wrote: > > > > dma-mapping fix for Lonux 5.14 > > We're calling it "Lonux" now? Only on weekends :) > > - handle vmalloc addresses in dma_common_{mmap,get_sgtable} > > (Roman Skakun) > > I've pulled this, but my reaction is that we've tried to avoid this in > the past. Why is Xen using vmalloc'ed addresses and passing those in > to the dma mapping routines? > > It *smells* to me like a Xen-swiotlb bug, and it would have been > better to try to fix it there. Was that just too painful? vmalloc (or rather vmap) addresses actually are the most common way to provide uncachable mappings on architectures that are not cache coherent. The only Xen part here is that swiotlb-xen is a mess and gets the address from the dma-direct allocator which does vmapping for arm/arm64, but then uses the common helpers later due to a variety of issues that will take a while to address.