Received: by 10.192.165.148 with SMTP id m20csp1869656imm; Thu, 3 May 2018 06:47:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpMIB7O2MaT/Izr+x2Q5sDYi+oaO2WRbZklXM1w80VvVHySo03Wb/u7QY8mU3wr5cYdKM4D X-Received: by 2002:a63:5fd2:: with SMTP id t201-v6mr19723106pgb.315.1525355230802; Thu, 03 May 2018 06:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525355230; cv=none; d=google.com; s=arc-20160816; b=yI9FGPZL9seH93HW9+AAKHoDS6GrBqO6v3IGxZdrBQoZwppHZmowL3fMeX4N9ZxznD HlTHgXuKgykuIJB5GK1IV3Dvr/iEODqNJAU6nHttsYOU4GbgsN+nX6ILsMBKeZm3DJXC kCwP696GR9UhBUFgcyHVpsmveQIKpBhRc3J6VGA8dDz9Zub11NMNsGpBKO8GPUgXNSWP H4/L1PnHmrROARss1b0T8R3WbWDF7kzRZ34+LWGO2jXCZgyW+NgFf6qeZIOGj8SbriF/ crDM4fgGCsg1fDn2GR7jsGh0YkxgCZc3+gGeG90iU+WP3DBZzqKKgL3H/Kva/a/T1Y7W IDsg== 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:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=gvTednIEYt/yrm4mgnCKiQIE1HqC9LBGHVJm/H3jqeM=; b=QoKVdlEWEnxqgmYXc876Qi09qY8dZCV2swtuBJMttRB2CyI+JH/N8MzWj//HInf+eV VQwWdW34OVRPOm6aCes84XcuWrkXCXyTUHg7A6k/lHO7FL/gIpoP96wgOAnF4Kg+kWGD sDXxE4ntbq5mPaTwZ1MHJz7PiTF3VY0ahRDU/G82gB6O+IKVyG03VeJdpklvXBjRJAVs L466akvfrxSifZXc1caNKsADuab0pkKWUfXStWIG2SO3gX5wLr5fyMN+S2Dqgrf5oWl3 /lA7tv0izUyCuYPAR3LMUCBqKmgilpn/QZYLQ9pNlOaEGbsrj2CEnaneqQHnPDzA95q0 wWnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=aEJhVhHi; dkim=pass header.i=@codeaurora.org header.s=default header.b=YIkbT/cz; 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 r14-v6si14152997plj.341.2018.05.03.06.46.56; Thu, 03 May 2018 06:47:10 -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=@codeaurora.org header.s=default header.b=aEJhVhHi; dkim=pass header.i=@codeaurora.org header.s=default header.b=YIkbT/cz; 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 S1751326AbeECNqk (ORCPT + 99 others); Thu, 3 May 2018 09:46:40 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54084 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbeECNqi (ORCPT ); Thu, 3 May 2018 09:46:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0C6866028D; Thu, 3 May 2018 13:46:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525355198; bh=uWOe953oEU1V5s0d+Oe4KJWy+45La1WXYaZOhB3M94Q=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=aEJhVhHiv+LjCFWQX17jcFmri+dXD3C6vg2/6qwxn7PVuykqIF6StlSABL/PnSJYA zokEow5GftMb0USQqVMyQmGdQYtWmKeNZcweJHGeLK23g2UHVLcwAQGl85lu2t0fyj viEPd4VxD8mXMjIEYvRHS3Bq/ficf9KZ121Tr7Y8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.0.105] (cpe-174-109-247-98.nc.res.rr.com [174.109.247.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8A3BB6028D; Thu, 3 May 2018 13:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525355197; bh=uWOe953oEU1V5s0d+Oe4KJWy+45La1WXYaZOhB3M94Q=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YIkbT/czeTijKdoh7idfmX7Nn6UiQd5LD4JP5UYB5o4oUL1//UoLQs+WjNTQPLPWO 8N9XUyrzOgfVDaVWyIy/7I9KmKDjLHvH55SLzsYrS5cstmJLFKrDkrxSClZGfGRzk4 yi8WU1gENOUCZXemA/2dyTwBOBoG0c6qXXhGKMjI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8A3BB6028D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [RFC/RFT] Add noats flag to boot parameters To: Joerg Roedel , Gil Kupfer Cc: 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 References: <1525025808-2365-1-git-send-email-gilkup@cs.technion.ac.il> <20180503133459.waawna3ebtu3udn6@8bytes.org> From: Sinan Kaya Message-ID: <359d736a-a7ac-f0e4-f4db-dc7bb506481c@codeaurora.org> Date: Thu, 3 May 2018 09:46:34 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180503133459.waawna3ebtu3udn6@8bytes.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/3/2018 9:35 AM, Joerg Roedel wrote: > On Sun, Apr 29, 2018 at 09:16:48PM +0300, Gil Kupfer wrote: >> This patch adds noats option to the pci boot parameter. >> When noats is selected, all ATS related functions fail immediately and >> the IOMMU is configured to not use device-iotlb. >> >> Any function that checks for ATS capabilities directly against the >> devices should also check this flag. (Currently, such functions exist >> only in IOMMU drivers, and they are covered by this patch.) >> >> The motivation behind this patch is the existence of malicious devices. >> Lots of research has been done about how to utilitize the IOMMU as a >> protection from such devices. When ATS is supported, any I/O device can >> access any physical access by faking device-IOTLB entries. >> Adding the ability to ignore these entries lets sysadmins enhance system >> security. >> >> Signed-off-by: Gil Kupfer > > This has also been on my list, thanks for doing that. > > Acked-by: Joerg Roedel > 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. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.