From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAE7DC2D0EE for ; Tue, 31 Mar 2020 08:17:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B026E20714 for ; Tue, 31 Mar 2020 08:17:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730097AbgCaIR5 convert rfc822-to-8bit (ORCPT ); Tue, 31 Mar 2020 04:17:57 -0400 Received: from mga01.intel.com ([192.55.52.88]:53189 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726528AbgCaIR5 (ORCPT ); Tue, 31 Mar 2020 04:17:57 -0400 IronPort-SDR: 67ZQKu81zLM7PAU4TWk4AbNzmNvvfj5lHu0wOi2TareV7ZnpTytIlkt15QxVotMxuLH1FfphV+ lo+ODrY6qwYg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 01:17:57 -0700 IronPort-SDR: /DBBFxmhPzWtTuq7YmUEaIF0ft1fAGcDXCvBHKx2w8duWFEL0NpnBO5z+dT4Ey7hoc1z9vg/Bi UOipnwdIOyWw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,327,1580803200"; d="scan'208";a="242292819" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 31 Mar 2020 01:17:56 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 01:17:56 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 31 Mar 2020 01:17:56 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 31 Mar 2020 01:17:55 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.89]) with mapi id 14.03.0439.000; Tue, 31 Mar 2020 16:17:52 +0800 From: "Liu, Yi L" To: Christoph Hellwig CC: "alex.williamson@redhat.com" , "eric.auger@redhat.com" , "jean-philippe@linaro.org" , "Tian, Kevin" , "Raj, Ashok" , "kvm@vger.kernel.org" , "Tian, Jun J" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "Sun, Yi Y" , "Wu, Hao" Subject: RE: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Topic: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Index: AQHWAEUbC4GB74LMekup8jIcF6WIFqhh3EqAgACGbhA= Date: Tue, 31 Mar 2020 08:17:52 +0000 Message-ID: References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-2-git-send-email-yi.l.liu@intel.com> <20200331075331.GA26583@infradead.org> In-Reply-To: <20200331075331.GA26583@infradead.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Christoph Hellwig > Sent: Tuesday, March 31, 2020 3:54 PM > To: Liu, Yi L > Subject: Re: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) > > Who is going to use thse exports? Please submit them together with > a driver actually using them. Hi Hellwig, These are exposed for SVA (Shared Virtual Addressing) usage in VMs. If say a driver who actually using them, it is the iommu driver running in guest. The flow is: guest iommu driver programs the virtual command interface and it traps to host. The virtual IOMMU device model lays in QEMU will utilize the exported ioctl to get PASIDs. Here is iommu kernel driver patch which utilizes virtual command interface to request pasid alloc/free. https://lkml.org/lkml/2020/3/20/1176 And, the below patch is one which utilizes the ioctl exported in this patch: https://patchwork.kernel.org/patch/11464601/ Regards, Yi Liu