From: Nicolin Chen <nicolinc@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "jgg@nvidia.com" <jgg@nvidia.com>,
"will@kernel.org" <will@kernel.org>,
"joro@8bytes.org" <joro@8bytes.org>,
"suravee.suthikulpanit@amd.com" <suravee.suthikulpanit@amd.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"eric.auger@redhat.com" <eric.auger@redhat.com>,
"jean-philippe@linaro.org" <jean-philippe@linaro.org>,
"mdf@kernel.org" <mdf@kernel.org>,
"mshavit@google.com" <mshavit@google.com>,
"shameerali.kolothum.thodi@huawei.com"
<shameerali.kolothum.thodi@huawei.com>,
"smostafa@google.com" <smostafa@google.com>,
"Liu, Yi L" <yi.l.liu@intel.com>, "aik@amd.com" <aik@amd.com>,
"zhangfei.gao@linaro.org" <zhangfei.gao@linaro.org>,
"patches@lists.linux.dev" <patches@lists.linux.dev>
Subject: Re: [PATCH v4 00/11] iommufd: Add vIOMMU infrastructure (Part-1)
Date: Fri, 25 Oct 2024 09:28:09 -0700 [thread overview]
Message-ID: <ZxvHGQJW65H+/zpy@Asurada-Nvidia> (raw)
In-Reply-To: <BN9PR11MB52769BCEED1DC36DBCA75AF98C4F2@BN9PR11MB5276.namprd11.prod.outlook.com>
On Fri, Oct 25, 2024 at 08:34:05AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Tuesday, October 22, 2024 8:19 AM
> >
> > This series introduces a new vIOMMU infrastructure and related ioctls.
> >
> > IOMMUFD has been using the HWPT infrastructure for all cases, including a
> > nested IO page table support. Yet, there're limitations for an HWPT-based
> > structure to support some advanced HW-accelerated features, such as
> > CMDQV
> > on NVIDIA Grace, and HW-accelerated vIOMMU on AMD. Even for a multi-
> > IOMMU
> > environment, it is not straightforward for nested HWPTs to share the same
> > parent HWPT (stage-2 IO pagetable), with the HWPT infrastructure alone: a
> > parent HWPT typically hold one stage-2 IO pagetable and tag it with only
> > one ID in the cache entries. When sharing one large stage-2 IO pagetable
> > across physical IOMMU instances, that one ID may not always be available
> > across all the IOMMU instances. In other word, it's ideal for SW to have
> > a different container for the stage-2 IO pagetable so it can hold another
> > ID that's available.
>
> Just holding multiple IDs doesn't require a different container. This is
> just a side effect when vIOMMU will be required for other said reasons.
>
> If we have to put more words here I'd prefer to adding a bit more for
> CMDQV which is more compelling. not a big deal though. 😊
Ack.
> > For this "different container", add vIOMMU, an additional layer to hold
> > extra virtualization information:
> >
> > ________________________________________________________________
> > _______
> > | iommufd (with vIOMMU) |
> > | |
> > | [5] |
> > | _____________ |
> > | | | |
> > | |----------------| vIOMMU | |
> > | | | | |
> > | | | | |
> > | | [1] | | [4] [2] |
> > | | ______ | | _____________ ________ |
> > | | | | | [3] | | | | | |
> > | | | IOAS |<---|(HWPT_PAGING)|<---| HWPT_NESTED |<--| DEVICE | |
> > | | |______| |_____________| |_____________| |________| |
> > | | | | | | |
> >
> > |______|________|______________|__________________|_____________
> > __|_____|
> > | | | | |
> > ______v_____ | ______v_____ ______v_____ ___v__
> > | struct | | PFN | (paging) | | (nested) | |struct|
> > |iommu_device| |------>|iommu_domain|<----|iommu_domain|<----
> > |device|
> > |____________| storage|____________| |____________| |______|
> >
>
> nit - [1] ... [5] can be removed.
They are copied from the Documentation where numbers are needed.
I will take all the numbers out in the cover-letters.
> > The vIOMMU object should be seen as a slice of a physical IOMMU instance
> > that is passed to or shared with a VM. That can be some HW/SW resources:
> > - Security namespace for guest owned ID, e.g. guest-controlled cache tags
> > - Access to a sharable nesting parent pagetable across physical IOMMUs
> > - Virtualization of various platforms IDs, e.g. RIDs and others
> > - Delivery of paravirtualized invalidation
> > - Direct assigned invalidation queues
> > - Direct assigned interrupts
> > - Non-affiliated event reporting
>
> sorry no idea about 'non-affiliated event'. Can you elaborate?
I'll put an "e.g.".
> > On a multi-IOMMU system, the vIOMMU object must be instanced to the
> > number
> > of the physical IOMMUs that are passed to (via devices) a guest VM, while
>
> 'to the number of the physical IOMMUs that have a slice passed to ..."
Ack.
Thanks
Nicolin
next prev parent reply other threads:[~2024-10-25 16:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1729553811.git.nicolinc@nvidia.com>
2024-10-25 8:34 ` [PATCH v4 00/11] iommufd: Add vIOMMU infrastructure (Part-1) Tian, Kevin
2024-10-25 15:42 ` Jason Gunthorpe
2024-10-28 2:35 ` Tian, Kevin
2024-10-25 16:28 ` Nicolin Chen [this message]
[not found] ` <1452c535a2e6a6c61f38fa752132db7e88b55770.1729553811.git.nicolinc@nvidia.com>
2024-10-25 8:34 ` [PATCH v4 01/11] iommufd: Move struct iommufd_object to public iommufd header Tian, Kevin
[not found] ` <74fec8c38a7d568bd88beba9082b4a5a4bc2046f.1729553811.git.nicolinc@nvidia.com>
[not found] ` <b2c75705-2998-4e51-90f4-00b8bab785f5@linux.intel.com>
[not found] ` <ZxcspVGPBmABjUPu@nvidia.com>
[not found] ` <dd7eb37f-13c6-4c6e-8adc-954ad9974b93@linux.intel.com>
[not found] ` <20241022131554.GF13034@nvidia.com>
2024-10-25 8:47 ` [PATCH v4 02/11] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct Tian, Kevin
2024-10-25 15:24 ` Jason Gunthorpe
2024-10-28 2:30 ` Tian, Kevin
[not found] ` <b48254df9ee530bedaf436e5aff279d9a882a7ca.1729553811.git.nicolinc@nvidia.com>
2024-10-25 8:49 ` [PATCH v4 03/11] iommufd: Add iommufd_verify_unfinalized_object Tian, Kevin
[not found] ` <1314e12b76edd84a8c9d0f14a6598538c8eeb50e.1729553811.git.nicolinc@nvidia.com>
2024-10-25 9:00 ` [PATCH v4 05/11] iommufd: Add domain_alloc_nested op to iommufd_viommu_ops Tian, Kevin
[not found] ` <ba9ce9b3c8a93c9c790fee52961d075dfbb63ca7.1729553811.git.nicolinc@nvidia.com>
2024-10-25 9:04 ` [PATCH v4 06/11] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC Tian, Kevin
2024-10-25 16:14 ` Nicolin Chen
[not found] ` <9da2cf334a182ced4d4ffa578b87889e9c0856f3.1729553811.git.nicolinc@nvidia.com>
2024-10-25 8:59 ` [PATCH v4 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl Tian, Kevin
2024-10-25 16:22 ` Nicolin Chen
2024-10-25 9:05 ` Tian, Kevin
2024-10-25 16:17 ` Nicolin Chen
[not found] ` <97fa87a511f0132ee0e233cadf09af075e4404c5.1729553811.git.nicolinc@nvidia.com>
2024-10-25 9:11 ` [PATCH v4 10/11] Documentation: userspace-api: iommufd: Update vIOMMU Tian, Kevin
[not found] ` <2180fdf423d0f2fcc5c031687690100b12c2ba51.1729553811.git.nicolinc@nvidia.com>
2024-10-25 9:18 ` [PATCH v4 11/11] iommu/arm-smmu-v3: Add IOMMU_VIOMMU_TYPE_ARM_SMMUV3 support Tian, Kevin
2024-10-25 15:41 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZxvHGQJW65H+/zpy@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=aik@amd.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=eric.auger@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=jean-philippe@linaro.org \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=mshavit@google.com \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shuah@kernel.org \
--cc=smostafa@google.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
--cc=yi.l.liu@intel.com \
--cc=zhangfei.gao@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox