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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_RED,USER_AGENT_SANE_1 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 467A7C433B4 for ; Mon, 10 May 2021 02:57:31 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C726F613D0 for ; Mon, 10 May 2021 02:57:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C726F613D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 855F0401B9; Mon, 10 May 2021 02:57:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3roAysP1oOKi; Mon, 10 May 2021 02:57:29 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTP id 2EEAD401B1; Mon, 10 May 2021 02:57:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 151A1C000E; Mon, 10 May 2021 02:57:29 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id DC5CAC0001 for ; Mon, 10 May 2021 02:57:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id C3017401B9 for ; Mon, 10 May 2021 02:57:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tKlfGFVooPNA for ; Mon, 10 May 2021 02:57:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by smtp2.osuosl.org (Postfix) with ESMTPS id 23218401B1 for ; Mon, 10 May 2021 02:57:27 +0000 (UTC) IronPort-SDR: JTbnhyiXaCvXVgCWCINVOl/zHMNwoa2W5mPcyEYRpLR/GsuFcHEch5E3klUloW/dvnaLbo3MJD BFJub/1oJAag== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="260364748" X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="260364748" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2021 19:57:26 -0700 IronPort-SDR: 6K91kGL+MSn6CKe/D+S+5wlos8v6m0M5XDa+qOzvai4vrihr7gv1hyF8fEllhvE+Z003sBqTg7 jQhqlwfqP/xg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="621044664" Received: from allen-box.sh.intel.com (HELO [10.239.159.128]) ([10.239.159.128]) by fmsmga006.fm.intel.com with ESMTP; 09 May 2021 19:57:21 -0700 Subject: Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs To: "Tian, Kevin" , Alex Williamson References: <20210421162307.GM1370958@nvidia.com> <20210421105451.56d3670a@redhat.com> <20210421175203.GN1370958@nvidia.com> <20210421133312.15307c44@redhat.com> <20210421230301.GP1370958@nvidia.com> <20210422121020.GT1370958@nvidia.com> <20210423114944.GF1370958@nvidia.com> <20210426123817.GQ1370958@nvidia.com> <20210428090625.5a05dae8@redhat.com> <20210507110614.7b8e6998@redhat.com> From: Lu Baolu Message-ID: Date: Mon, 10 May 2021 10:56:37 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Cc: Jean-Philippe Brucker , Li Zefan , "Jiang, Dave" , "Raj, Ashok" , Jonathan Corbet , Jean-Philippe Brucker , LKML , "iommu@lists.linux-foundation.org" , Jason Gunthorpe , Johannes Weiner , Tejun Heo , "cgroups@vger.kernel.org" , "Wu, Hao" , David Woodhouse X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 5/8/21 3:31 PM, Tian, Kevin wrote: >> From: Alex Williamson >> Sent: Saturday, May 8, 2021 1:06 AM >> >>>> Those are the main ones I can think of. It is nice to have a simple >>>> map/unmap interface, I'd hope that a new /dev/ioasid interface wouldn't >>>> raise the barrier to entry too high, but the user needs to have the >>>> ability to have more control of their mappings and locked page >>>> accounting should probably be offloaded somewhere. Thanks, >>>> >>> Based on your feedbacks I feel it's probably reasonable to start with >>> a type1v2 semantics for the new interface. Locked accounting could >>> also start with the same VFIO restriction and then improve it >>> incrementally, if a cleaner way is intrusive (if not affecting uAPI). >>> But I didn't get the suggestion on "more control of their mappings". >>> Can you elaborate? >> Things like I note above, userspace cannot currently specify mapping >> granularity nor has any visibility to the granularity they get from the >> IOMMU. What actually happens in the IOMMU is pretty opaque to the user >> currently. Thanks, >> > It's much clearer. Based on all the discussions so far I'm thinking about > a staging approach when building the new interface, basically following > the model that Jason pointed out - generic stuff first, then platform > specific extension: > > Phase 1: /dev/ioasid with core ingredients and vfio type1v2 semantics > - ioasid is the software handle representing an I/O page table A trivial proposal, is it possible to use /dev/ioas? Conceptually, it's an IO address space representation and has nothing to do with any ID. Best regards, baolu _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu