Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp725317pxj; Thu, 13 May 2021 15:38:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuiTSeqeANaE9nb1ox4z+hz0eHLdmABXuO4s/Gln2BDGXTY5I8JX7Tqa+hIF8yI18Vb56m X-Received: by 2002:a92:d7c2:: with SMTP id g2mr38866657ilq.265.1620945484512; Thu, 13 May 2021 15:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620945484; cv=none; d=google.com; s=arc-20160816; b=PQ7kq847TF4woeZuBF8gdsiAsenrdMPXsnMPph2pTgJe0TMgNAysiVEp9BDGjGVmuc uzg3aG46GCAr/vqXXlrLKSRWT7g/CsrINHGnD4La/UzDLb52h+/lO5/EIzt2RRxkv8oW CM3QcmqWnNvX9jyr/oGTB3PR3dGTwtRbIAlJdbVzGOz8fyvzkX/N8uY/yqJ3ljyOX6cn S893t/LFd5qcMb5r6N9BLGkyaAX1PBXrSHNQY8aI5nl3022ITnv8tM5agtXBM9UhBPk3 BCKlWTK7RlSlTezEdAZkHqMgQngB0L8MV1nbhyVKAAHkGWjeG98oaUsYL3H5EsdUAtl9 czPQ== 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=WIfs5IhYhOZz5NULajo+nB9uooOJ9TVKhTVGUqVtbPM=; b=rvIVGKBHrlb8lA5RPI+pDiiK4tq0DgbiRFUDmzKSoEQg6VT2iCi+NTG+YCzcEutpq2 oUGFkZ3zdkGZYzIvMDqh5X1F6iV327tpJiiDNFkvAVqR8JzqzFe5dDEtZMV1LJMBtM5L 1L9MYY4cBaCXWM0OWsf/08Xuqq2qExcIu/vxXDZX+ZXzWQoJc/mmQ1sdrWaM7Cqe0pVq l4eWIfLxDhGcYkx3eWcmL1gnp6JOtnJBmOrTN4VSQdXd786ZwG4AiypJGZq97udzm6Y6 zgMpAK8ywYV1SKEuw1yfnMMQXKrE/psw0X5q2SL9spOOsDMGrzHVES99shVH6zhGbr2a kk0g== 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 b26si5147066jap.85.2021.05.13.15.37.51; Thu, 13 May 2021 15:38:04 -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 S233959AbhEMQqG convert rfc822-to-8bit (ORCPT + 99 others); Thu, 13 May 2021 12:46:06 -0400 Received: from mga11.intel.com ([192.55.52.93]:6529 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232279AbhEMQpj (ORCPT ); Thu, 13 May 2021 12:45:39 -0400 IronPort-SDR: 9cnCEjKqC0Pv0uVCBfb8g4jmvOL1JmcLuVbOpptGI2DKlYuo0vQggWVRq4uCm1aFRLbP1vX6Ac N090UbY6UGjQ== X-IronPort-AV: E=McAfee;i="6200,9189,9983"; a="196896531" X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="196896531" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2021 09:44:17 -0700 IronPort-SDR: IzZGvtmnOazCD/bdR7ddiOefUMtd/AXraOiK6SBYoyzo+X5ZP/cBfdwwYrFpbll8uQyCUSKjPz m0Sm8Wk2hywA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="626299114" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga005.fm.intel.com with ESMTP; 13 May 2021 09:44:15 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 09:44:15 -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 09:44:14 -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 09:44:14 -0700 From: "Luck, Tony" To: Jacob Pan , Jason Gunthorpe CC: 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//6FJIA== Date: Thu, 13 May 2021 16:44:14 +0000 Message-ID: References: <1620653108-44901-2-git-send-email-jacob.jun.pan@linux.intel.com> <20210510233749.GG1002214@nvidia.com> <20210510203145.086835cc@jacob-builder> <20210511114848.GK1002214@nvidia.com> <20210511091452.721e9a03@jacob-builder> <20210511163521.GN1002214@nvidia.com> <20210511110550.477a434f@jacob-builder> <20210511194726.GP1002214@nvidia.com> <20210513060012.0fcc7653@jacob-builder> <20210513133834.GC1002214@nvidia.com> <20210513081050.5cf6a6ed@jacob-builder> In-Reply-To: <20210513081050.5cf6a6ed@jacob-builder> 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 > For shared workqueue, it can only generate DMA request with PASID. The > submission is done by ENQCMDS (S for supervisor) instruction. > > If we were not to share page tables with init_mm, we need a system PASID > that doing the same direct mapping in IOMMU page tables. Note that for the currently envisioned kernel use cases for accelerators it would be OK for this system PASID to just provide either: 1) A 1:1 mapping for physical addresses. Kernel users of the accelerators would provide physical addresses in descriptors. 2) The same mapping that the kernel uses for its "1:1" map of all physical memory. Users would use kernel virtual addresses in that "1:1" range (e.g. those obtained from page_to_virt(struct page *p);) If people want to use an accelerator on memory allocated by vmalloc() things will get more complicated. But maybe we can delay solving that problem until someone comes up with a real use case that needs to do this? -Tony