Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp859840ybn; Wed, 2 Oct 2019 07:19:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxE2/1tLDu0AAbb2Ftv+46eAHyntwdtTbfCGFSZgBMNlT1qk9Wbvuun9aNjdtIhgzW4K2Oy X-Received: by 2002:a17:906:c310:: with SMTP id s16mr3342048ejz.178.1570025976434; Wed, 02 Oct 2019 07:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570025976; cv=none; d=google.com; s=arc-20160816; b=t+0Caycz/hGXHtvOJTEPFwVM5S5qSBqrccI4YVf6uRySgw5sHj9LkchoKVGf0z4YZk 9EYVk8pym9twzAEJMftKdeeK38vVK22RFyjGTQP/o6aQQeqQK5iRV7Il7z1ibb4iyizF 3YvZqYFQH+9EGPLcxXV/h1pj+k0S29E0u7jKvmow1DzniONgmtBmfpESmkC8pdBBfbNG Z7FYKMGHtBQawcvGx4vDOA2b+0LYZxdJWbuLhdC79zk0naS/hUZw9Rx0v3ID2oU/HiNj ErhSJrHR3D7FqrkNM3hfcbq2G1q+EZ17z4c/UcZwC9rdu6B8K1XLV6r0XaVlx2zgm5S7 hZRg== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=XJQCwhfekB4eph49BesH0EqdzjFKBaP+WMXHnnsf3Zw=; b=OrjEl4nXrSSRtLaCn38y0CXvkJZPsxf7WCeXMF1DrmwQCjhiAFMua69z1ZUxypw0yU AvGMWHwm7b+Uv1CCC2MMtQrrOkIxEH9WGvVosaSB2iAvbp4yhNpuP5eayRYkg0Kw5vQ0 v7QOvCFg0VR9ETa4cUqYDVPXibN9SAe891t9BPHYj1by+4zu1JjKRyHT7+KFgQ76Bvav fIAExmU9d+hD9Tl/fiYvc+uXbR6ySDlkeTX7a+P5veSoKgKROqyV+yaL22GJkMrJXF7Z lmFYMuVCJExuRkNSvq0cBcrma8d9p916kGsFzlQqf45T726M+ny3YYQvDBEnc+Wc+O5z Napw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si10080210eju.147.2019.10.02.07.19.11; Wed, 02 Oct 2019 07:19:36 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728140AbfJBOSB (ORCPT + 99 others); Wed, 2 Oct 2019 10:18:01 -0400 Received: from mga14.intel.com ([192.55.52.115]:23502 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbfJBOSA (ORCPT ); Wed, 2 Oct 2019 10:18:00 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2019 07:17:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,574,1559545200"; d="scan'208";a="182060537" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga007.jf.intel.com with ESMTP; 02 Oct 2019 07:17:59 -0700 Date: Wed, 2 Oct 2019 07:22:08 -0700 From: Jacob Pan To: iommu@lists.linux-foundation.org, LKML , Joerg Roedel , David Woodhouse , Alex Williamson , Jean-Philippe Brucker Cc: "Yi Liu" , "Tian, Kevin" , Raj Ashok , "Christoph Hellwig" , "Lu Baolu" , Jonathan Cameron , Eric Auger , Jerry Snitselaar , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v3 0/4] User API for nested shared virtual address (SVA) Message-ID: <20191002072208.243995a1@jacob-builder> In-Reply-To: <1569972805-27664-1-git-send-email-jacob.jun.pan@linux.intel.com> References: <1569972805-27664-1-git-send-email-jacob.jun.pan@linux.intel.com> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jean, Just wondering if you have more comments on ioasid custom allocator, v3 is largely the same as v2 other than shuffling header within the set. Thanks, Jacob On Tue, 1 Oct 2019 16:33:21 -0700 Jacob Pan wrote: > This set consists of IOMMU APIs to support SVA in the guest, a.k.a > nested SVA. As the complete SVA support is complex, we break down the > enabling effort into three stages: > 1. PCI device direct assignment > 2. Fault handling, especially page request service support > 3. Mediated device assignment > > Each stage includes common API and vendor specific IOMMU driver > changes. This series is the common uAPI for stage #1. It is intended > to build consensus on the interface which all vendors reply on. > > This series is extracted from the complete stage1 set which includes > VT-d code. https://lkml.org/lkml/2019/8/15/951 > > Changes: > - Use spinlock instead of mutex to protect ioasid custom allocators. > This is to support callers in atomic context > - Added more padding to guest PASID bind data for future extensions, > suggested by Joerg. > After much thinking, I did not do name change from PASID to IOASID in > the uAPI, considering we have been using PASID in the rest of uAPIs. > IOASID will remain used within the kernel. > > For more discussions lead to this series, checkout LPC 2019 > VFIO/IOMMU/PCI microconference materials. > https://linuxplumbersconf.org/event/4/sessions/66/#20190909 > > > Change log: > v3: - include errno.h in ioasid.h to fix compile error > - rebased to v5.4-rc1, no change > > v2: > - Addressed review comments by Jean on IOASID custom > allocators, locking fix, misc control flow fix. > - Fixed a compile error with missing header errno.h > - Updated Jean-Philiippe's new email and updateded > reviewed-by tag > > > Jacob Pan (2): > iommu/ioasid: Add custom allocators > iommu: Introduce guest PASID bind function > > Jean-Philippe Brucker (1): > iommu: Add I/O ASID allocator > > Yi L Liu (1): > iommu: Introduce cache_invalidate API > > drivers/iommu/Kconfig | 4 + > drivers/iommu/Makefile | 1 + > drivers/iommu/ioasid.c | 432 > +++++++++++++++++++++++++++++++++++++++++++++ > drivers/iommu/iommu.c | 30 ++++ include/linux/ioasid.h | > 76 ++++++++ include/linux/iommu.h | 36 ++++ > include/uapi/linux/iommu.h | 169 ++++++++++++++++++ > 7 files changed, 748 insertions(+) > create mode 100644 drivers/iommu/ioasid.c > create mode 100644 include/linux/ioasid.h > [Jacob Pan]