Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2350110pxa; Mon, 24 Aug 2020 11:38:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsirzUkv/Mcb1t7jUVPgm0tCh9rzfHbn1gc+DVzw3ffBLDpLXcd4RwJ0VwyPY8JAIidhty X-Received: by 2002:a05:6402:1218:: with SMTP id c24mr6550630edw.44.1598294317362; Mon, 24 Aug 2020 11:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598294317; cv=none; d=google.com; s=arc-20160816; b=w2yTpncSIQ5wUeCZKb3QBQUbdkvEGL5W+WxYSxnv0mGHPmjTBwAhuNsPU9JdyDfROG E69sLHsefBD/34HJFkuyYTlk0DlwX3BsOqDc7RXnuIoo159geK19U4qhrI9euUYyAobl chOEOdD33oufZBbCXgH7gS3fb7G6u+ZNP9e+3QMk23OJLraCp57uz63LqbuK8tX13nFm nsnu3FKHIQTPEbRCHsPVNLfjHO4b2dfEnplFWzEdmc3kQFLsj27JWb473bwDopoqHfLz iQoTJGG9W1qyQfzE5gS8AOYX5xyWPzaofVZpTzJ64JMCNp59Dm5LdTGMGDYig5ZXv1ex pQAg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=y5s9jJbL8Rdnw0BzneLpjPMhR5Y8x3gmv/6FKWKQqbA=; b=IhM5Du1bkd+hljc17oLSHxAjTeCpzeZv6mmSTs1vWgo5C1WgNW4ZxWT4ZR/OcbCZO0 WVDnPQ6QYZBNeGEUya7qjom32zUh65J2yShFimlihh0gHLbabc9VVLeoqLaROf1zyaUI qokxVQ5ciG1OVvrLUT42w50mFeJfLZy9tDAU9YxXkQriJtq4o+Poplh0lhxYmz9W/Rf7 OYBbcdn/ssZkRW+2YfItl4EsnoBz3t9KAoJiIHaGqTaQQv0jS3GSQvgwRWglRWjNdvB7 AdyJjWy81NS+vRGnuWUDM1ygb2Uglf54ef6Ivzqh2VBhqBWb1xojHW+95IcfmCIpfiQF AYEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=IfM7a9JV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y25si7157824ejc.510.2020.08.24.11.38.13; Mon, 24 Aug 2020 11:38:37 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=IfM7a9JV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726753AbgHXSem (ORCPT + 99 others); Mon, 24 Aug 2020 14:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgHXSel (ORCPT ); Mon, 24 Aug 2020 14:34:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70042C061573 for ; Mon, 24 Aug 2020 11:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=y5s9jJbL8Rdnw0BzneLpjPMhR5Y8x3gmv/6FKWKQqbA=; b=IfM7a9JVU/JJCyFN+zP5G7WS8O v3EwoMXZWsUSzwGrBMwfqMZ0tIY6iS+J/gCfWqjgdWhkOLlMNjD7CiKGrQeNYaFFBS4UQhEGs/aIT 6f/JYvHURS98AxH8ida6PLrU+rcmQuj4Q04WxtpyMg6S1EsjQPwkBBmYXszvZM15bbEoRtiGKw6i2 31etz6UIFDsU37Jie0ANCMou5VNPJzn55sElZcljfhftGzpCx3wj62cST8Qutrg+mD4/vPFsQaRKC i7od+AVevkO3fO1EXHNWwLiniqwHmbq7NDuQr8S4TBHSxjW9UXrehWRltpA4r76ZpCIuhjf/r91Go e7uNpriA==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAHIg-00017M-7J; Mon, 24 Aug 2020 18:34:34 +0000 Subject: Re: [PATCH v2 3/9] iommu/ioasid: Introduce ioasid_set APIs To: Jean-Philippe Brucker , Jacob Pan Cc: iommu@lists.linux-foundation.org, LKML , Jean-Philippe Brucker , Lu Baolu , Joerg Roedel , David Woodhouse , Yi Liu , "Tian, Kevin" , Raj Ashok , Eric Auger , Wu Hao References: <1598070918-21321-1-git-send-email-jacob.jun.pan@linux.intel.com> <1598070918-21321-4-git-send-email-jacob.jun.pan@linux.intel.com> <20200824182848.GB3210689@myrica> From: Randy Dunlap Message-ID: <1be98989-fab3-f9e4-cbd6-cf72a67dc5f1@infradead.org> Date: Mon, 24 Aug 2020 11:34:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200824182848.GB3210689@myrica> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/24/20 11:28 AM, Jean-Philippe Brucker wrote: >> +/** >> + * struct ioasid_set - Meta data about ioasid_set >> + * @type: Token types and other features > nit: doesn't follow struct order > >> + * @token: Unique to identify an IOASID set >> + * @xa: XArray to store ioasid_set private IDs, can be used for >> + * guest-host IOASID mapping, or just a private IOASID namespace. >> + * @quota: Max number of IOASIDs can be allocated within the set >> + * @nr_ioasids Number of IOASIDs currently allocated in the set * @nr_ioasids: Number of IOASIDs currently allocated in the set >> + * @sid: ID of the set >> + * @ref: Reference count of the users >> + */ >> struct ioasid_set { >> - int dummy; >> + void *token; >> + struct xarray xa; >> + int type; >> + int quota; >> + int nr_ioasids; >> + int sid; >> + refcount_t ref; >> + struct rcu_head rcu; >> }; -- ~Randy