Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp66669pxk; Wed, 2 Sep 2020 14:41:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNtAPpkMlHXgPS1NsP7Xt8OEgAOLvBKNZBKkCrhkeUKN5qLyEV2SqIvXQo/BAgy/Hu68mM X-Received: by 2002:a17:907:9c3:: with SMTP id bx3mr174396ejc.164.1599082860451; Wed, 02 Sep 2020 14:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599082860; cv=none; d=google.com; s=arc-20160816; b=X9HKXf4WNIfpzEazszez6OEgsubecI8suoq/fKy8e6a5KDOBNNwts2SBlGhwNEvs8k KNSC9rz9JvvtaNsQuhxTgkpZFFC6U0sLVY6q20aKpWIlh410b0I2rbkfi8gHZV6UE1Hv qKiHKaOpkiGq24+Zmq4hnV6m+PA16dS51XcVXVbHk7vDvQBiVzyASXtm09CejASC3pym tmnj93/oNXuvOKNoQOH9iJV7cU3GR0l2ylstOOJCUqjI8/1ve36yuiqmdcu8hd05vVRE sVR34sysmZEeiZ2/9cvjKibeS/rpeHxaUpeqRWcRsMbmvyeA6K+7mPqIlRXffWk9qz/+ goRA== 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:ironport-sdr:ironport-sdr; bh=q8JX667ryjNrA0ETCduObPTl8Q/fNrCMZvRCocSUnlY=; b=E4AyUGF35hv6EUpCZv/n4ZxWkFVmFkxE1O3dQYyb+wd0bvEFCG04kinE72OzpSo9uw lVU7fquS4CqLvBQfk/oczMWo9fI8xy8ia6nwKitcT7NhDEamCQjDzgnw0AnvkIw561t5 xYYQGtaf9r+hRR9evPmPzI3xoYqJZe7OGNpW7Ur2CoGXPnK8yWKVYBRALZs43mfevlkI eYzxfLEOa9icOWmDXEhosezzktB6dqwEuXbAMIce8OlDnJ66FSNtsTF9NkULQ3D60OP/ 245/J4fdwbGD49dyUPksxRnK2qIXZs/30SeNdrCxCRO2PwtMsI5k/oFnGe22oMmNaYVr r9+w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si540502ejr.4.2020.09.02.14.40.38; Wed, 02 Sep 2020 14:41:00 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726686AbgIBVkB (ORCPT + 99 others); Wed, 2 Sep 2020 17:40:01 -0400 Received: from mga01.intel.com ([192.55.52.88]:39576 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgIBVkA (ORCPT ); Wed, 2 Sep 2020 17:40:00 -0400 IronPort-SDR: 9xUbG0934/O4+mvBeZ3XtwGC2wcZzXFbdvheTEPYPVXlG4rqP7lw0KeQqA13LYOmC+vzDMVKkC GtymY9lQPjWw== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="175532402" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="175532402" 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; 02 Sep 2020 14:39:59 -0700 IronPort-SDR: 3aN1bVBGjYGTxOItKGjSaxdAAnK0XFpwLvwn33eSYR7d579dGO4MNdI00YPL/2qu7AkYJRhHaH WB2X0WmURgiQ== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="331572226" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:39:59 -0700 Date: Wed, 2 Sep 2020 14:47:06 -0700 From: Jacob Pan To: Randy Dunlap Cc: Jean-Philippe Brucker , Jacob Pan , "Tian, Kevin" , Raj Ashok , Jean-Philippe Brucker , LKML , iommu@lists.linux-foundation.org, Wu Hao , David Woodhouse , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v2 3/9] iommu/ioasid: Introduce ioasid_set APIs Message-ID: <20200902144706.331e1032@jacob-builder> In-Reply-To: <1be98989-fab3-f9e4-cbd6-cf72a67dc5f1@infradead.org> 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> <1be98989-fab3-f9e4-cbd6-cf72a67dc5f1@infradead.org> 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 On Mon, 24 Aug 2020 11:34:29 -0700 Randy Dunlap wrote: > 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 > got it. thanks! > >> + * @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; > >> }; > > [Jacob Pan]