Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2474285yba; Sun, 7 Apr 2019 20:17:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLE7nUsfT1o3FHCLqNQsz9OyrCO759eumt4WXxpVt+bk/qMu+jOjB+YMWO3jWnP/+mWZw6 X-Received: by 2002:a65:62c3:: with SMTP id m3mr25740382pgv.159.1554693479758; Sun, 07 Apr 2019 20:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554693479; cv=none; d=google.com; s=arc-20160816; b=LBd9d0veBMBtHic7/XV0Ef27t2lGHv4sTOc5/WBl4fxibpv5zXrTSdQD0OZ+cq5t2W wM+AHrKFPhgU1ULYK0EQK87qFwb1YT2fOd7DW6m+pg+fs/rerT0lHV0A5DLHQobzpMRy 1ULkNpT8c+7bHivoq4eBb0Pt4EDO+mkaqwZCUi/Uo7FZ2O9avnTAEBe6mnPBWwDpjr9q kwhXlMTJHmD7ux+RmYlDOccZblRcBY5GonRUf23wOCuq1EMOINESFvZNFqmPsAhiQUYD tMxbbmIIQqVUAr9dnGrupXPLMAbskRmWedwXEAY4tOng0TRqKWcC2HPByVYw6PL10DwB 7tIQ== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject; bh=tZ299inDZqvMIU+kUyjXKx/EwmNuCqHk3xJq8CorjWc=; b=vEcYOBIyrwJpGcsoj6USGrIbXJr+6PHBdgcZMfosxcrxqTFbrFFnCSDqrX9g2MoLZ+ A+R6/BIvqLyGuEsEenvo/UxmkWP63yNJp4n7zGwGqVtourRhMpfY0QKItnHGrflQYqXx DlGmedesMdKMD4d/uZ/t/1lLhInq+pRYAwPv1GsBq+fJSTADumJ2QHGOz7PI32iQOh6h ERLHAVmrbSvO958xAkyUCjpm8SnHn/O3wfwDQkWceZBrIipalI2Ko3XgPiy52/ZogwPd wyJveNK9yMzmMGt6AyMRpt4I22JI1H34cRQ0y7tn411B5pGcG3PnjJIc6K5emmOxma5/ W2VA== 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 c184si4673022pga.578.2019.04.07.20.17.34; Sun, 07 Apr 2019 20:17:59 -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 S1726646AbfDHDQe (ORCPT + 99 others); Sun, 7 Apr 2019 23:16:34 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:36498 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726349AbfDHDQe (ORCPT ); Sun, 7 Apr 2019 23:16:34 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9665736192FA5693B86B; Mon, 8 Apr 2019 11:16:31 +0800 (CST) Received: from [127.0.0.1] (10.177.23.164) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.408.0; Mon, 8 Apr 2019 11:16:22 +0800 Subject: Re: [PATCH v4 0/6] normalize IOMMU dma mode boot options To: Hanjun Guo , Jean-Philippe Brucker , John Garry , "Robin Murphy" , Will Deacon , "Joerg Roedel" , Jonathan Corbet , linux-doc , Sebastian Ott , "Gerald Schaefer" , Martin Schwidefsky , Heiko Carstens , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Tony Luck , Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , David Woodhouse , iommu , linux-kernel , linux-s390 , linuxppc-dev , x86 , linux-ia64 References: <20190407124147.13576-1-thunder.leizhen@huawei.com> From: "Leizhen (ThunderTown)" Message-ID: <5CAABD03.9000301@huawei.com> Date: Mon, 8 Apr 2019 11:16:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/8 9:14, Hanjun Guo wrote: > Hi Zhen, > > On 2019/4/7 20:41, Zhen Lei wrote: >> As Robin Murphy's suggestion: >> "It's also not necessarily obvious to the user how this interacts with >> IOMMU_DEFAULT_PASSTHROUGH, so if we really do go down this route, maybe it >> would be better to refactor the whole lot into a single selection of something >> like IOMMU_DEFAULT_MODE anyway." >> >> In this version, I tried to normalize the IOMMU dma mode boot options for all >> ARCHs. When IOMMU is enabled, there are 3 dma modes: paasthrough(bypass), >> lazy(mapping but defer the IOTLB invalidation), strict. But currently each >> ARCHs defined their private boot options, different with each other. For >> example, to enable/disable "passthrough", ARM64 use iommu.passthrough=1/0, >> X86 use iommu=pt/nopt, PPC/POWERNV use iommu=nobypass. >> >> >> Zhen Lei (6): >> iommu: use iommu.dma_mode to replace iommu.passthrough and >> iommu.strict >> iommu: keep dma mode build options consistent with cmdline options >> iommu: add iommu_default_dma_mode_get() helper >> s390/pci: use common boot option iommu.dma_mode >> powernv/iommu: use common boot option iommu.dma_mode >> x86/iommu: use common boot option iommu.dma_mode > > This will break systems using boot options as now, and I think > this is unacceptable. If you want to do so, just introduce iommu.dma_mode > on top of those iommu boot options with dma mode boot options unchanged, > and iommu.dma_mode is for all archs but compatible with them. I just changed the boot options name, but keep the function no change. I added all related maintainers/supporters in the "to=" list, maybe we can disuss this. Should I add some "obsoleted" warnings for old options and keep them for a while? But I think this kind of thing is best done in one go. > > Thanks > Hanjun > > > . > -- Thanks! BestRegards