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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC54CC43334 for ; Tue, 14 Jun 2022 04:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238375AbiFNEsN (ORCPT ); Tue, 14 Jun 2022 00:48:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235722AbiFNEsL (ORCPT ); Tue, 14 Jun 2022 00:48:11 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D66D831534 for ; Mon, 13 Jun 2022 21:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655182090; x=1686718090; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=WNnlhhRpKdqwqyAN58id52IIA5QPWLuUwmueWv7fjlE=; b=lgMWPtyZKLhRwsEPlgzgbimrlL/lFXA52aJveyWkYTnFrgCjYhd4DDDQ dbWIpZVSo8FWG1IxDA1kQKXnSrtMQ0c+9oG55SFJAWBCWEsX8ykQFG3TV H8NVyMF2wfEvR4amEqyGjwokAy1NKkpYqcePEofSj84LSNuIfrTROMvji 0497HBLnqD15do7EFzq9Ws8i+SLZ7lTYdCO3KJZjmSdAZMdlfiTWv/9mm 4C97/VG6Kr17+WMpf5FjjxCxArso5DoVi7zR1IDh1bvACgD3ULls/Z+Vh fc+rL5sZkBuJfbdy7Q72FLtnv7DqjF7ddpoLe+RcT9kVC551J6vNGSCRV A==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="261537115" X-IronPort-AV: E=Sophos;i="5.91,299,1647327600"; d="scan'208";a="261537115" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 21:48:10 -0700 X-IronPort-AV: E=Sophos;i="5.91,299,1647327600"; d="scan'208";a="910765884" Received: from gren5-mobl1.ccr.corp.intel.com (HELO [10.255.29.39]) ([10.255.29.39]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 21:48:08 -0700 Message-ID: <2d2a52db-70a8-788e-fedc-197789caa145@linux.intel.com> Date: Tue, 14 Jun 2022 12:48:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: baolu.lu@linux.intel.com, "Liu, Yi L" , "Pan, Jacob jun" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/1] iommu/vt-d: Add set_dev_pasid callbacks for default domain Content-Language: en-US To: "Tian, Kevin" , Joerg Roedel , "Raj, Ashok" , Jason Gunthorpe References: <20220614034411.1634238-1-baolu.lu@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/6/14 12:02, Tian, Kevin wrote: >> From: Lu Baolu >> Sent: Tuesday, June 14, 2022 11:44 AM >> >> This allows the upper layers to set a domain to a PASID of a device >> if the PASID feature is supported by the IOMMU hardware. The typical >> use cases are, for example, kernel DMA with PASID and hardware >> assisted mediated device drivers. >> > > why is it not part of the series for those use cases? There is no consumer > of added callbacks in this patch... It could be. I just wanted to maintain the integrity of Intel IOMMU driver implementation. > >> +/* PCI domain-subdevice relationship */ >> +struct subdev_domain_info { >> + struct list_head link_domain; /* link to domain siblings */ >> + struct device *dev; /* physical device derived from */ >> + ioasid_t pasid; /* PASID on physical device */ >> +}; >> + > > It's not subdev. Just dev+pasid in iommu's context. How about struct device_pasid_info? Best regards, baolu