From: "Leizhen (ThunderTown)" Date: Mon, 08 Apr 2019 03:16:19 +0000 Subject: Re: [PATCH v4 0/6] normalize IOMMU dma mode boot options Message-Id: <5CAABD03.9000301@huawei.com> List-Id: References: <20190407124147.13576-1-thunder.leizhen@huawei.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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