Received: by 10.213.65.68 with SMTP id h4csp1873841imn; Mon, 19 Mar 2018 16:00:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELv/WUcKEfVzyiNAYBTbz5QC8syVHCf/FWcJfzKToABXsGCa+haLFWsZGlzW69wLD6WIAoYm X-Received: by 2002:a17:902:7007:: with SMTP id y7-v6mr14173186plk.275.1521500403625; Mon, 19 Mar 2018 16:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521500403; cv=none; d=google.com; s=arc-20160816; b=F9FsUsBcODZs1z8jQ2+MbDU3dM5eiR2cpsSuKvRiOmKbBuWSBov0VhSXzyCTowL2lC ih7amNwZ+ThYl3A4YvCPT4wtgdCx3ll7wa3PEYXUbMQtMhF++AQtBYJhJsj+DBbJASo7 N1u6YpxQeJSoOl2jlFgfNBySpdjA9l1F+SMV1ATZ1BSZWoO5Qn167IPDcDV11qMAfVTa HAaPM4cUsmC8GAOx9iBn5smuqwtmQb0VglD7TcBqbV7Nnbvi/x+trWWB6KnAi/0jpKTX Wq/CqIdgC32Zm2xtOQx5ABWX6rbPwxi0aLMmhXzKfTy6dHnJS57AlGBMvRteP5xmGvLm Pn3Q== 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:arc-authentication-results; bh=bTvYi5AkBmf4Pb+CSdjNDOBq6/JtVdrFczUBkr5cmq8=; b=Jh12LfWzvvJtQB5Vc/REqcMuTConlnAZ6kdsGvIyBH3wCETZlAtf8bKdJ26TY2GOgl 4wWlQekkLjXl9RCv9h702fF5CHk9r44OgQWNoJEZ0UIcXYQt+55hCpq6TCEnZqjv++Hx p/vSX7ZtmoGg5aEW9iYkjAGfwsXIlbD/CM2RJA96L0eaw33rdLWCLbl46iqxWR/6j04c 91SMCixueWBc8GjlOfJuJP0kvwMg+RUvH6nGsjNXY5FqDzG+P5K3X7l/4MsEuJvRlRrG KnOoMr4d2IFZ6ExrRyni9GtJlLoSvwBoSRuzhslOuK5anndM09XB58d+B5ZoinLOks+3 baow== 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 m11si134564pgc.243.2018.03.19.15.59.47; Mon, 19 Mar 2018 16:00:03 -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 S933859AbeCSPs6 (ORCPT + 99 others); Mon, 19 Mar 2018 11:48:58 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54136 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933739AbeCSPsZ (ORCPT ); Mon, 19 Mar 2018 11:48:25 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 29D711529; Mon, 19 Mar 2018 08:48:25 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EE9E93F24A; Mon, 19 Mar 2018 08:48:24 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 3C4851AE553A; Mon, 19 Mar 2018 15:48:33 +0000 (GMT) Date: Mon, 19 Mar 2018 15:48:33 +0000 From: Will Deacon To: Robin Murphy Cc: Christoph Hellwig , x86@kernel.org, Tom Lendacky , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, Muli Ben-Yehuda , iommu@lists.linux-foundation.org, David Woodhouse , Catalin Marinas Subject: Re: [PATCH 12/14] dma-direct: handle the memory encryption bit in common code Message-ID: <20180319154832.GD14916@arm.com> References: <20180319103826.12853-1-hch@lst.de> <20180319103826.12853-13-hch@lst.de> <20180319152442.GA27915@lst.de> <5316b479-7e75-d62f-6b17-b6bece55187c@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5316b479-7e75-d62f-6b17-b6bece55187c@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 19, 2018 at 03:37:20PM +0000, Robin Murphy wrote: > On 19/03/18 15:24, Christoph Hellwig wrote: > >On Mon, Mar 19, 2018 at 03:19:04PM +0000, Robin Murphy wrote: > >>As a heads-up, I've just realised there's now a silent (but build-breaking) > >>conflict with the current arm64 queue brewing here, as we've unfortunately > >>had to reintroduce ARCH_HAS_PHYS_TO_DMA as a means of being safe against an > >>ugly architectural corner case - currently commit 1f85b42a691c ("arm64: > >>Revert L1_CACHE_SHIFT back to 6 (64-byte cache line size)") in -next. > > > >Please revert that arm64 commit. This condition should be handled > >in common code as it is not arm specific. And next time please CC > >the iommu list and dma-mapping maintainers before doing such a change. > > There didn't seem enough justification to clutter up core SWIOTLB code with > the ability to force bouncing on a per-device basis, but if you think there > are real potential users out there then fair enough. For arm64, it's > extremely unlikely that anyone will ever build a sufficiently wacky system > to actually hit this code path; we really only implemented it for peace of > mind per the letter of the architecture. I'm less sure. We will certainly see systems with large writeback granules, the real question is whether or not they will be expected to work with non-coherent DMA. Having silent data corruption in those situations is just about the worst possible behaviour, so I'd like to do *something* instead of that. Falling back to swiotlb bouncing with a taint seems sensible to me. Why can't we just resolve the conflict by adding the underscores? Will