Received: by 10.192.165.148 with SMTP id m20csp106100imm; Thu, 3 May 2018 15:54:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZocOvJapK6upQqEP89LK9mKDsTGMh8LumwrzHVSxfsNGUK5dfSCmk+pb7YG67ZLL2kBQsau X-Received: by 10.98.141.81 with SMTP id z78mr10503828pfd.69.1525388079332; Thu, 03 May 2018 15:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525388079; cv=none; d=google.com; s=arc-20160816; b=rHaPSDSbdEgHjlN67FPrrIeEQ+NjiLT2pE8fPOTwv2ch2GxI7V5YlWBKx/kXnG+ouy J4J7XZXjviKsED2np6p+uff6C6IvdggFV11E/T8KRPlrraNbBYEdc+JB8A0/ecSxx4ut 02Qo4sspvTNSX5ukAgrbBDd9Pk0vIBpsT9PkJc/2JPkT66r8WtwHCJUlCihVzT5ng0dE ai4AlS9hCprOO6s0lEfC+m1+yBoh6fDYaaQ8+pdHQdbl4dE66/7it05SYePZ73fPf6+h ijVJsKFl9QXoMjw4q9HhWPFMWUYCWUgcdRc29yxUDglbV0JwTRa2dwHM3i/OUj1i4g13 k7hA== 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:dkim-signature:arc-authentication-results; bh=sq1TPY+/srOzMhG87B3Ksf7Zc5B4PkDVotPMKXfkZ2s=; b=Lmr/njYt175ZGmJ0SGNvRJM/deeeDLGm38QbPI8akshL4jaZj7nHaihlPWRH9/7zuX Vo0xijFzQgbQtRYjaINqHaZxrqxt0PJdhS3bYzFZgyl1MOOCeD5tvS9Q4IWlcjyurDjb dEVEGvd516t8W0hMlUj5gugpwldzz5bZB8IWlI/TBl2mwGK7KaLfEZuKv5JOmtBi5tG+ p6yeWXK5NEy0TbmkHQRNRmemUemt0qTp8wZD9Yni/NyrMB6HTMsQQloEIusC5OdunC5+ uJLaJPizVhBAcQZO6MTMpqmCGzFDmcqDvSQEvJb89dC1Pqdrm8xXvCbkJPIeoHpQGzqV zOrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a+zmgfz8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18-v6si2682464pgu.59.2018.05.03.15.54.24; Thu, 03 May 2018 15:54:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=a+zmgfz8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751361AbeECWw5 (ORCPT + 99 others); Thu, 3 May 2018 18:52:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:45450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbeECWw4 (ORCPT ); Thu, 3 May 2018 18:52:56 -0400 Received: from localhost (unknown [69.71.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD51021716; Thu, 3 May 2018 22:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525387976; bh=06GiyFzpXn8jOA+Ym60iPaYHYPvNF6AMGBjkn+yaf68=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a+zmgfz8ZEIOdV/TqoOTDtmND1tUtU4xx2SoltHtmkG9p7jQCDIiLAKePkK8qSgQ0 +4Xbapojmes9Tqrf28pRz5+atgH2D76sJl+GKt/PQUtbrJ1yJV5QKu3e8qPdSixMBW CA4HDqLFXsY0JehdfPrMneTzDASBvEOJ+KQ0kLdY= Date: Thu, 3 May 2018 17:52:54 -0500 From: Bjorn Helgaas To: Sinan Kaya Cc: Joerg Roedel , Gil Kupfer , dwmw2@infradead.org, bhelgaas@google.com, iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, nadav.amit@gmail.com, Gil Kupfer , Will Deacon Subject: Re: [RFC/RFT] Add noats flag to boot parameters Message-ID: <20180503225254.GC15790@bhelgaas-glaptop.roam.corp.google.com> References: <1525025808-2365-1-git-send-email-gilkup@cs.technion.ac.il> <20180503133459.waawna3ebtu3udn6@8bytes.org> <359d736a-a7ac-f0e4-f4db-dc7bb506481c@codeaurora.org> <20180503135920.o2rdh3exai7qmkvu@8bytes.org> <5cf699f1-90c1-5ad8-07fe-a65042395d05@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5cf699f1-90c1-5ad8-07fe-a65042395d05@codeaurora.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 03, 2018 at 10:23:02AM -0400, Sinan Kaya wrote: > +Bjorn, > > On 5/3/2018 9:59 AM, Joerg Roedel wrote: > > On Thu, May 03, 2018 at 09:46:34AM -0400, Sinan Kaya wrote: > >> I also like the idea in general. > >> Minor nit.. > >> > >> Shouldn't this be an iommu parameter rather than a PCI kernel command line parameter? > >> We now have an iommu.passthrough argument that prevents page translation. > >> > >> Doesn't this fit into the same category especially when it is the IOMMU drivers that > >> call ATS functions for enablement not the PCI drivers. > > > > ATS is a bit of a grey area between PCI and IOMMU, but since ATS is > > PCI-specific and the code to enable/disable it is in PCI as well, I > > think the parameter makes sense for PCI too. > > OK. Bjorn was interested in having a command line driven feature enables > in driver/pci directory with bitmasks for each optional PCI spec > capability rather than noXYZ feature. It's true that I try to avoid adding *any* kernel parameters as much as possible because they're usually not practical for end-users. I think it's unreasonable to expect users to use "pci=" parameters based on what specific hardware they have. That's too hard to discover and too hard to use. I did wonder about a "pci=safe" parameter that would disable potentially risky features just as a debugging feature [1]. This ATS case is a security question and the parameter is not something that would have to be used to get certain hardware to work, so I think it's probably reasonable to add. I would maybe expand the documentation so it includes the reason somebody might want it, i.e., to defend against malicious PCIe devices. A parameter using bitmasks could be conceivable for developers but sounds too unwieldy for end-users. [1] https://bugzilla.kernel.org/show_bug.cgi?id=196197#c53