From: Nicolin Chen <nicolinc@nvidia.com>
To: "Duan, Zhenzhong" <zhenzhong.duan@intel.com>
Cc: "Cédric Le Goater" <clg@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"Liu, Yi L" <yi.l.liu@intel.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"eric.auger@redhat.com" <eric.auger@redhat.com>,
"mst@redhat.com" <mst@redhat.com>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"peterx@redhat.com" <peterx@redhat.com>,
"ddutile@redhat.com" <ddutile@redhat.com>,
"shameerali.kolothum.thodi@huawei.com"
<shameerali.kolothum.thodi@huawei.com>,
"joao.m.martins@oracle.com" <joao.m.martins@oracle.com>,
"clement.mathieu--drif@eviden.com"
<clement.mathieu--drif@eviden.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
"Peng, Chao P" <chao.p.peng@intel.com>
Subject: Re: [PATCH v1 1/6] backends/iommufd: Add a helper to invalidate user-managed HWPT
Date: Thu, 29 May 2025 14:07:07 -0700 [thread overview]
Message-ID: <aDjMe56/goeuu386@Asurada-Nvidia> (raw)
In-Reply-To: <SJ0PR11MB6744B5EEAD02E7DA89263AA99266A@SJ0PR11MB6744.namprd11.prod.outlook.com>
On Thu, May 29, 2025 at 06:46:20AM +0000, Duan, Zhenzhong wrote:
> >Looking at the kernel iommufd_hwpt_invalidate() routine and
> >intel_nested_cache_invalidate_user(), it doesn't seem possible to
> >return a different number of cache entries. Are you anticipating
> >other implementations (sMMU) ?
>
> Yes, same for sMMU's arm_vsmmu_cache_invalidate() and selftest's
> mock_viommu_cache_invalidate() and mock_domain_cache_invalidate_user().
>
> I'm not sure if this should apply to all types of IOMMUs, uAPI doc doesn't talk about it.
It should. The uAPI defines that at entry_num:
* struct iommu_hwpt_invalidate - ioctl(IOMMU_HWPT_INVALIDATE)
...
* @entry_num: Input the number of cache invalidation requests in the array.
* Output the number of requests successfully handled by kernel.
This applies to either ret != 0 case too.
> @Liu, Yi L, @nicolinc@nvidia.com, @Jason Gunthorpe, should I treat ret = 0
> and total_entries != cache.entry_num as a kernel bug or not?
Selftest has that coverage, so it would be a kernel bug that will
unlikely occur. That being said, it doesn't hurt to do that IMHO.
Thanks
Nicolin
next prev parent reply other threads:[~2025-05-29 21:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 6:04 [PATCH v1 0/6] VFIO and IOMMU prerequisite stuff for IOMMU nesting support Zhenzhong Duan
2025-05-28 6:04 ` [PATCH v1 1/6] backends/iommufd: Add a helper to invalidate user-managed HWPT Zhenzhong Duan
2025-05-28 9:59 ` Cédric Le Goater
2025-05-29 6:46 ` Duan, Zhenzhong
2025-05-29 21:07 ` Nicolin Chen [this message]
2025-05-28 6:04 ` [PATCH v1 2/6] vfio/iommufd: Add properties and handlers to TYPE_HOST_IOMMU_DEVICE_IOMMUFD Zhenzhong Duan
2025-05-28 10:29 ` Cédric Le Goater
2025-05-29 6:50 ` Duan, Zhenzhong
2025-05-28 6:04 ` [PATCH v1 3/6] vfio/iommufd: Initialize iommufd specific members in HostIOMMUDeviceIOMMUFD Zhenzhong Duan
2025-05-28 10:29 ` Cédric Le Goater
2025-05-28 6:04 ` [PATCH v1 4/6] vfio/iommufd: Implement [at|de]tach_hwpt handlers Zhenzhong Duan
2025-05-28 10:29 ` Cédric Le Goater
2025-05-28 6:04 ` [PATCH v1 5/6] vfio/iommufd: Save vendor specific device info Zhenzhong Duan
2025-05-28 6:04 ` [PATCH v1 6/6] iommufd: Implement query of host VTD IOMMU's capability Zhenzhong Duan
2025-05-28 10:47 ` Cédric Le Goater
2025-05-29 7:16 ` Duan, Zhenzhong
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=aDjMe56/goeuu386@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=chao.p.peng@intel.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=clg@redhat.com \
--cc=ddutile@redhat.com \
--cc=eric.auger@redhat.com \
--cc=jasowang@redhat.com \
--cc=jgg@nvidia.com \
--cc=joao.m.martins@oracle.com \
--cc=kevin.tian@intel.com \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=yi.l.liu@intel.com \
--cc=zhenzhong.duan@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.