Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp107954pxj; Thu, 13 May 2021 22:41:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6FJGbwvbBYHiOEybVJRl8g+iCVxZ/SzKOe+Px5DiDypyKVawK1ChMvWSmDwYk4WeocHGT X-Received: by 2002:a50:ff0a:: with SMTP id a10mr8478861edu.273.1620970877031; Thu, 13 May 2021 22:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620970877; cv=none; d=google.com; s=arc-20160816; b=n1Li/9TrBSOAY/14Ks6wfAH3bdUPCowOAWhlsq40hE+7WW2CXC2HArm9aiIYBkX+xa 9sBjkJDM66ndpSNhIvQGIS56+XCXrG5zV7dkyaJJD34CPcKw+kOPyUpaNpzWaq8K4VQs 2Q6pIhVQkFNnAloCQc3Bj+NkmuwK+f9fRTdqYPeWWD+h4ohQQC4E+y5mRthr8iPSiWjz J8XNTAoThXxmQ3WrrWfzE1WbAd+K6E9yHbCObHw7uMzIiiRXAYanezz+7aQyhB9OCQP5 GUxbRIXR71XEL36KtLVd6zDNmDj6lPOkgmIr3f8MuWd2TABTTl0kyscynjI+zoJkzjwx fBBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=squoRLEpHvsAwrBvp9fDdTK/LoZ9SxdGEUuJNUSILas=; b=rDRz4KpQ9jWFNkoNmzj7tbzijbpGaW2knnNwQ48oHDrqCS+lZjms9ASdeKQRB6y9QP rBVMdvLn5/dGfLpQ7ohvuN+BvFiVM1hmBHacHbdZdcoxgsutSqDhHwnSV5R327hS+7W6 ydlwzJnn7CYBmnwv1DuVrN5SAQeDAebgkFj69AvMzidfIt346N5MYm7fgQrPw01sorbg Z+XOV4ciLmCAMc56egzMuGGgHWKBRLo+kTrq3MVLUPbN6gizsja0iUSc3k0XfXzmgsPF +3QUQA3St6e8HQbhLUeceVk5FbS2N3qzDpLoJfDl0Io4KL8n7WyIuppi7fqrC9PHK3hU bmnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v17si4732789edq.94.2021.05.13.22.40.54; Thu, 13 May 2021 22:41:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbhEMTQI convert rfc822-to-8bit (ORCPT + 99 others); Thu, 13 May 2021 15:16:08 -0400 Received: from mga09.intel.com ([134.134.136.24]:59001 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230394AbhEMTQH (ORCPT ); Thu, 13 May 2021 15:16:07 -0400 IronPort-SDR: KHly6+fCOkPbbg5ahhEZxygiwK/6IS0qWWIqyg/eR2r/ZuAaPMF/nxazFDLgBrbePMwxmE8cys hZltrnjORE8w== X-IronPort-AV: E=McAfee;i="6200,9189,9983"; a="200082105" X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="200082105" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2021 12:14:57 -0700 IronPort-SDR: 7WEggcpESFwbovgw4qCaZtkJ0dnpYOGOo+UvuJZn9NCMESFuAGSr/nAaGZZYjsp3VWNrGfznTf SBUHkmiZmNHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="401132951" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 13 May 2021 12:14:56 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Thu, 13 May 2021 12:14:55 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 13 May 2021 12:14:54 -0700 Received: from fmsmsx610.amr.corp.intel.com ([10.18.126.90]) by fmsmsx610.amr.corp.intel.com ([10.18.126.90]) with mapi id 15.01.2106.013; Thu, 13 May 2021 12:14:54 -0700 From: "Luck, Tony" To: Jason Gunthorpe CC: Jacob Pan , Christoph Hellwig , LKML , "iommu@lists.linux-foundation.org" , "Joerg Roedel" , Lu Baolu , Jean-Philippe Brucker , "Liu, Yi L" , "Raj, Ashok" , "Tian, Kevin" , "Jiang, Dave" , "wangzhou1@hisilicon.com" , "zhangfei.gao@linaro.org" , "vkoul@kernel.org" , David Woodhouse Subject: RE: [PATCH v4 1/2] iommu/sva: Tighten SVA bind API with explicit flags Thread-Topic: [PATCH v4 1/2] iommu/sva: Tighten SVA bind API with explicit flags Thread-Index: AQHXR/foStIq1WXEVUyqodFI447jQarh3/IAgAAZyAD//6FJIIAAhnOA//+hPACAAHc/AP//jORg Date: Thu, 13 May 2021 19:14:54 +0000 Message-ID: References: <20210511163521.GN1002214@nvidia.com> <20210511110550.477a434f@jacob-builder> <20210511194726.GP1002214@nvidia.com> <20210513060012.0fcc7653@jacob-builder> <20210513133834.GC1002214@nvidia.com> <20210513081050.5cf6a6ed@jacob-builder> <20210513173303.GL1002214@nvidia.com> <20210513185349.GA801495@agluck-desk2.amr.corp.intel.com> <20210513190040.GR1002214@nvidia.com> In-Reply-To: <20210513190040.GR1002214@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > If you want this then be explicit about what it is you are making when > building the API. Don't try to hide it under some generic idea of > "kernel PCI DMA SVA" So, a special API call (that Dave can call from IDXD) to set up this kernel PASID. With suitable documentation to explain the scope. Maybe with a separate CONFIG option so it can be completely stubbed out (IDXD does *NOT* "select" this option ... users have to explicitly pick it). > I could easily see an admin option to "turn this off" entirely as > being too dangerous, especially if the users have no interest in IDXD. And a kernel command line option to block IDXD from using that special API ... for users on generic kernels who want to block this use model (but still use IDXD in non-kernel cases). Users who don't want IDXD at all can block loading of the driver. Would that work? -Tony