Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4807702ybp; Mon, 14 Oct 2019 10:18:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4HTYjg8EQW9aWbA5qPqZocYSrFspi3Cz4QobF8LnZYN4GSpPZEOLusAp4bdFm4O+bAycT X-Received: by 2002:a17:906:19cf:: with SMTP id h15mr30717332ejd.184.1571073533328; Mon, 14 Oct 2019 10:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571073533; cv=none; d=google.com; s=arc-20160816; b=GvfgVomwqYWI4YA9E2Hl7WSfHjfCmY02kJI5lZRuAQUwLcw+df9A2wszX4eZTGgxDA QHw2p4HLAVwQAnJr+YbzgRdCl+JolanavNh8Ghw3btTEjzVCqhg+cM4bPq2lMDkTzI7S 1G+5BBpmg2Ix7c62gUwgyNZnZMOgh52NMWu0cKXjfZyF7eYBXF/KzUhiSWDgRM8lFozU Y5xrxPE0WrWd+aknTEw7/gljzJ7nll53SmdxPuSTN7kfZ2HL308TL5cUF64f0gqlvZ1p +O4yM1iqYr7RzS326GkorX6+DRbDFFGXzMAtzcoij82loDpwRL1mkXlriIb7nj+4FE2t RpBQ== 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=A3MAEj+KfO8C/0a4Auygr4PKV+F7bS1my0obdniMXCY=; b=lPReZ8Fvy9EGG1keFe6ljorhQElFTEy6Sdwn4TOgiYJe3AMq8v9XKYuHMzmOl1LOcr qw9FEsDkH8TQx0BkZ6uYpGg4emRi42sUxkUQBbKA2pvHrOWx2uGXiCHQMjhCMRTl/L7p cY9PfjDR0BxhDkRQRtZLNZ4mN/+dVCDtXJYOtUq5duFU5skJeOW6LQN/u1uobQYa318/ eaZx7BgxHpgujjdQcVx4rLexu2OCXiz8UqlH100WHBypjPWGJk5yHntS/XGdsGLPcVhM qG/KUpUWZxIKa6jsqV+XfEkm4AjxgkYytM5whSqC8bYOyvKMzIgCiDol2fQysA1+30JL NwrA== 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 f57si13225671edb.165.2019.10.14.10.18.29; Mon, 14 Oct 2019 10:18:53 -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 S2388157AbfJNRJu (ORCPT + 99 others); Mon, 14 Oct 2019 13:09:50 -0400 Received: from mga12.intel.com ([192.55.52.136]:62831 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729900AbfJNRJu (ORCPT ); Mon, 14 Oct 2019 13:09:50 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 10:09:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,296,1566889200"; d="scan'208";a="189079736" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga008.jf.intel.com with ESMTP; 14 Oct 2019 10:09:49 -0700 Date: Mon, 14 Oct 2019 10:14:05 -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 v4 0/4] User API for nested shared virtual address (SVA) Message-ID: <20191014101405.5429571b@jacob-builder> In-Reply-To: <20191007123912.60c19a79@jacob-builder> References: <1570045363-24856-1-git-send-email-jacob.jun.pan@linux.intel.com> <20191007123912.60c19a79@jacob-builder> 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 Joerg, Just another gentle reminder. I think we have reached consensus in this common code. Jean and Eric can confirm. Thanks, Jacob On Mon, 7 Oct 2019 12:39:12 -0700 Jacob Pan wrote: > Hi Joerg and all, > > Just wondering if you have more comments on this series. > > Thanks, > > Jacob > > On Wed, 2 Oct 2019 12:42:39 -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: > > v4: - minor patch regroup and fixes based on review from Jean > > 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 | 422 > > +++++++++++++++++++++++++++++++++++++++++++++ > > drivers/iommu/iommu.c | 30 ++++ include/linux/ioasid.h | > > 76 ++++++++ include/linux/iommu.h | 36 ++++ > > include/uapi/linux/iommu.h | 169 ++++++++++++++++++ > > 7 files changed, 738 insertions(+) > > create mode 100644 drivers/iommu/ioasid.c > > create mode 100644 include/linux/ioasid.h > > > > [Jacob Pan] [Jacob Pan]