Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2475642lqo; Mon, 20 May 2024 07:07:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkFesniB3hDALatLsnEomcG1+sgLdKNV1pQD7y32sR+owjOZ2+OOxKDqU0CFwnZwLrsMoQPCK6IXSrMfsxIawMLadngcljUaRbTnRjzA== X-Google-Smtp-Source: AGHT+IGGDyntrqmVL0jqXfV0ExvXuUCgOfpaj3RcmhCa4cgriqiuCl8o/g+mgXB1nzmWYVczkGc4 X-Received: by 2002:a17:90b:90:b0:2bd:5eea:6335 with SMTP id 98e67ed59e1d1-2bd6038c382mr8717210a91.7.1716214045908; Mon, 20 May 2024 07:07:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716214045; cv=pass; d=google.com; s=arc-20160816; b=c7r1wKd8sT6GuezWMn6NYBvSiJ0nl5kO7WQYD/xdnrESKzLPgIxfjcOehcqy3uKEnG e8PorOdCWO1yMqm2QaeHHg4Ba1mQyy4dB9Vgs379vdCTT4KVgNq94G6R45WPk7Y8L3ku 76k4y/MV80vx265nnfVKoyavuhSbHylhqlP5NrXcT1g5TQEVGKMN1HR2dXwV7i4STQN5 xqM83k/dlWY7UnR7zfCjvd+xXpcxHDuFVfUZ6NmlWUThGg+YEfe9HmXndkTQZi0wJIcS b/Ou+P1qy9GdzbGSWfKR/pflLNRUrm1lWoHUWjF0ziKLLHd59sv279UUOiP8uAoDp4Zp Vkvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wpWEoUMWnFLJr+MkLtPIZ/EXAlokieryuSaCz8a6I3M=; fh=kzCWRlJvq4K++JYiGyxeS/ilJ120Ra0qC6pwG4NgSxY=; b=AF7hMjNhVnpsXhnZiI8AwfrCtA4HpXdf6n2PwKnTYdYZeBJIUaUIu1ZwWIiKAQdSi+ EUVgwwZyVI3yoag2v/FJRX55KGvDgpdjALUPzAB5Rpql4MCXnvHkaVkTJlCuqAob4iQ7 Llr3p+kV5q/ctiOqKpVpL1NWkX1ZEuoJuoaOQ4vQTuYA4oWOUd8fFBu7Ea80oPlyj33w ZnoVqZRhhZh3R/Sr7uuZ//FyxdORzlDYO8Enrh3dktf6pXj8bxpCMHEaSBoORgDl5gdP vFWyGINYVbBSe7ttXfWSc4lyiO+PI7DoYfDAJEt6UAFttaHeoL3iPylFuCyPQ7uhThEn N49w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=nzXujvLQ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-183821-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183821-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bd76f97102si2453018a91.98.2024.05.20.07.07.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 07:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183821-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=nzXujvLQ; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-183821-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183821-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8452E283E28 for ; Mon, 20 May 2024 14:07:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC919136990; Mon, 20 May 2024 14:07:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="nzXujvLQ" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D57BF45026; Mon, 20 May 2024 14:07:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716214037; cv=none; b=fFo7hhFcbhd1TaQsgNdI77dvKPpl6U+FuCuvuEjnHVqi7kx0uwVC3eQUB3aZePmaLiePnohksU7X+mOaxBvQ7DEQITkAV4Bqtqr6OypZwlMi2S7di6UKqvibEtBg8nV13eSyPBbn1lsiQUHTWACFwCi9fgTrisKQWMNw6evzta8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716214037; c=relaxed/simple; bh=w4T6LcRjlCHTTZIBTqyyyFIHQt2VX43DOdStKH+dMjo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WFLWUfJfl2p/+J2Y+7xaEqlIwqSFkjQ+OTWrEYjESxf7Q+nENKnl6qVLNDoX++mHDgKtR+rwcI3tCNexPZucW/KbS+J43TDreVjnVXhsZ3BwHWGonZdE2IZwNibmR3KIWJc+xmVq/DW39FVSHivMCu8ILj32qsgVRnM5sYRDk7E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=nzXujvLQ; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=wpWEoUMWnFLJr+MkLtPIZ/EXAlokieryuSaCz8a6I3M=; b=nzXujvLQghLXfJUbZl0u3JiQ/V njxgWrULaemEv1rhjj7uGwTNzAM865guFORckfkd4Elr/e93FJxZ7xTyAiIdHg5YdZ5fZ5uXnfPLZ CkqyBZ+Fnjku555e7eD3RcC1Zsq4vNK1IowWSRMEcMyM/9W+5QQhEQob/6fQ6CZLxDh8rF+J2mz7B ne6Lxk1tkPc4pO11ZuBp7Vn+3Cjy+Gsmh1kKjw1cn5zxMQmGVEIK5F3Q+mhhHaOwFlPewXynlVCI6 yLaq/aRiNH+FsLzpdW2E0VFX3q2kB5KFtFAoFVn5xw4OdNAZXy5oqxQlyYTJG9vVi3+f7x+gT2JRa Z5hYlxBA==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s93fS-0000000EfNO-3kiZ; Mon, 20 May 2024 14:07:10 +0000 Date: Mon, 20 May 2024 07:07:10 -0700 From: Christoph Hellwig To: Yan Zhao Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, alex.williamson@redhat.com, jgg@nvidia.com, kevin.tian@intel.com, iommu@lists.linux.dev, pbonzini@redhat.com, seanjc@google.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, corbet@lwn.net, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, baolu.lu@linux.intel.com, yi.l.liu@intel.com, Russell King Subject: Re: [PATCH 3/5] x86/mm: Introduce and export interface arch_clean_nonsnoop_dma() Message-ID: References: <20240507061802.20184-1-yan.y.zhao@intel.com> <20240507062044.20399-1-yan.y.zhao@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240507062044.20399-1-yan.y.zhao@intel.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Tue, May 07, 2024 at 02:20:44PM +0800, Yan Zhao wrote: > Introduce and export interface arch_clean_nonsnoop_dma() to flush CPU > caches for memory involved in non-coherent DMAs (DMAs that lack CPU cache > snooping). Err, no. There should really be no exported cache manipulation macros, as drivers are almost guaranteed to get this wrong. I've added Russell to the Cc list who has been extremtly vocal about this at least for arm.