Received: by 10.213.65.68 with SMTP id h4csp1609222imn; Mon, 19 Mar 2018 08:39:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELt8S28jGwIGJzyxen2kc3KeZ5bLXoZGwTPY12FThdD6XMmwVEnrsScmu52OVz4KIYmfpQeC X-Received: by 2002:a17:902:5a0b:: with SMTP id q11-v6mr13290331pli.199.1521473958801; Mon, 19 Mar 2018 08:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521473958; cv=none; d=google.com; s=arc-20160816; b=dfgX1bcaF4KZM3IDuVbP0IcDB5P+Zb8BvQFd+ttcq64cpjDsvrEeJkD4Wdr79Mlj+Z y/vZ5OalOweNdlEeuzfPzhiXEB6/wtAjyVpfhsIKialP5S2kKRt5I7Icq+ACj3oycBOu p2vhJnRHxD9/YYmvTvQY+QLjWbEhXwsB6cUXuL9vttDTZsvAoKu2ZY4A4OgQugcv4LtY ToVSqa3kEFimratJ9ssxuuJaXsaFEtaDYUBmf42QamzpjE944LxX8dEmrk8+gtmcDL7q KXnB5RFMQ+q8fGrh40daZ8S+xd/Dp2RCMF2/E8fg80rGr71fxu3cmBIO1CkBvJJb/YQM bdyw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=gzOw4Lc9Yq9P9ul+uHdwysSMn8ceDd1aTc3VIYZA/lU=; b=NU8gk0cmT6NoCyhzaet6ac+7VVy6jF5MmzHlInuKV7Mtrl/NnbidLvG9VB6Vx35Z6p UJyngQjZ6JjaxLf92cgf1B3Y6akAeuA3/4rxUU2dK3tcqyH2DfxlXvqyWL7YHojF/wV9 KuFbL3epQZgN4E+xYpUszArlZMa0Mr848MKjFDEk1u1K4Pv1X6HcQDxUfvCY7ylWIEgf h2JKSF68XEUJHVLDDLSskurXRGbq04tELA97fX3Oiy/9Ja7RQ3Qkc3UlN7yODMkGD7AX +VGJ9y3ZtrM6qER7/CmiEwzaKqvcC/gLTQmecHgU5MD4ggF/GnOjrXLdSikAYGwfgPq2 7KIw== 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 z62si133638pgd.819.2018.03.19.08.39.03; Mon, 19 Mar 2018 08:39:18 -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 S1755902AbeCSPh1 (ORCPT + 99 others); Mon, 19 Mar 2018 11:37:27 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53978 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755845AbeCSPhX (ORCPT ); Mon, 19 Mar 2018 11:37:23 -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 511891529; Mon, 19 Mar 2018 08:37:23 -0700 (PDT) Received: from [10.1.210.88] (e110467-lin.cambridge.arm.com [10.1.210.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 930183F24A; Mon, 19 Mar 2018 08:37:21 -0700 (PDT) Subject: Re: [PATCH 12/14] dma-direct: handle the memory encryption bit in common code To: Christoph Hellwig Cc: x86@kernel.org, Tom Lendacky , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, Muli Ben-Yehuda , iommu@lists.linux-foundation.org, David Woodhouse , Will Deacon , Catalin Marinas References: <20180319103826.12853-1-hch@lst.de> <20180319103826.12853-13-hch@lst.de> <20180319152442.GA27915@lst.de> From: Robin Murphy Message-ID: <5316b479-7e75-d62f-6b17-b6bece55187c@arm.com> Date: Mon, 19 Mar 2018 15:37:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180319152442.GA27915@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Robin.