[PATCH v6 0/5] vEVENTQ support for accelerated SMMUv3 devices

Shameer Kolothum posted 5 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260213103942.142823-1-skolothumtho@nvidia.com
Maintainers: Yi Liu <yi.l.liu@intel.com>, Eric Auger <eric.auger@redhat.com>, Zhenzhong Duan <zhenzhong.duan@intel.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
backends/iommufd.c       |  31 +++++++++
backends/trace-events    |   1 +
hw/arm/smmuv3-accel.c    | 146 ++++++++++++++++++++++++++++++++++++---
hw/arm/smmuv3-accel.h    |   8 +++
hw/arm/smmuv3-internal.h |   4 ++
hw/arm/smmuv3.c          |  38 ++++++----
hw/arm/trace-events      |   2 +-
include/system/iommufd.h |  12 ++++
8 files changed, 220 insertions(+), 22 deletions(-)
[PATCH v6 0/5] vEVENTQ support for accelerated SMMUv3 devices
Posted by Shameer Kolothum 1 month, 3 weeks ago
Hi,

Changes from v5:
 https://lore.kernel.org/qemu-devel/20260211083415.133534-1-skolothumtho@nvidia.com/
 
 -Addressed feedback and picked up tags. Thanks!
 -Decoupled alloc_veventq on smmuv3_cmdq_consume() (patch  #3)
 -Updated error messages (patch #5)

Please take a look and let me know.

Thanks,
Shameer

---
Background(From v2):

When accel=on is enabled for an SMMUv3 instance, the host hardware SMMUv3
may generate Stage-1 (S1) event notifications that are intended for the
vIOMMU instance in userspace.

This series adds QEMU support for receiving such host events through the
vEVENTQ interface and propagating them to the guest. The implementation
uses the vEVENTQ support provided by the IOMMUFD subsystem in the kernel.

I have tested this on a Grace platform using some hacks to generate
events. Further testing and feedback are welcome.
---

Nicolin Chen (2):
  backends/iommufd: Introduce iommufd_backend_alloc_veventq
  hw/arm/smmuv3-accel: Allocate vEVENTQ for accelerated SMMUv3 devices

Shameer Kolothum (3):
  hw/arm/smmuv3-accel: Add viommu free helper
  hw/arm/smmuv3: Introduce a helper function for event propagation
  hw/arm/smmuv3-accel: Read and propagate host vIOMMU events

 backends/iommufd.c       |  31 +++++++++
 backends/trace-events    |   1 +
 hw/arm/smmuv3-accel.c    | 146 ++++++++++++++++++++++++++++++++++++---
 hw/arm/smmuv3-accel.h    |   8 +++
 hw/arm/smmuv3-internal.h |   4 ++
 hw/arm/smmuv3.c          |  38 ++++++----
 hw/arm/trace-events      |   2 +-
 include/system/iommufd.h |  12 ++++
 8 files changed, 220 insertions(+), 22 deletions(-)

-- 
2.43.0
Re: [PATCH v6 0/5] vEVENTQ support for accelerated SMMUv3 devices
Posted by Nicolin Chen 1 month, 3 weeks ago
On Fri, Feb 13, 2026 at 10:39:37AM +0000, Shameer Kolothum wrote:
> Hi,
> 
> Changes from v5:
>  https://lore.kernel.org/qemu-devel/20260211083415.133534-1-skolothumtho@nvidia.com/
>  
>  -Addressed feedback and picked up tags. Thanks!
>  -Decoupled alloc_veventq on smmuv3_cmdq_consume() (patch  #3)
>  -Updated error messages (patch #5)

I tested by hacking away the RMR nodes and msi_gpa to trigger some
translation faults at MSI doorbell.

Tested-by: Nicolin Chen <nicolinc@nvidia.com>
RE: [PATCH v6 0/5] vEVENTQ support for accelerated SMMUv3 devices
Posted by Shameer Kolothum Thodi 1 month, 3 weeks ago

> -----Original Message-----
> From: Nicolin Chen <nicolinc@nvidia.com>
> Sent: 13 February 2026 22:32
> To: Shameer Kolothum Thodi <skolothumtho@nvidia.com>
> Cc: qemu-arm@nongnu.org; qemu-devel@nongnu.org;
> eric.auger@redhat.com; peter.maydell@linaro.org; Nathan Chen
> <nathanc@nvidia.com>; Matt Ochs <mochs@nvidia.com>; Jiandi An
> <jan@nvidia.com>; Jason Gunthorpe <jgg@nvidia.com>;
> jonathan.cameron@huawei.com; zhangfei.gao@linaro.org;
> zhenzhong.duan@intel.com; Krishnakant Jaju <kjaju@nvidia.com>
> Subject: Re: [PATCH v6 0/5] vEVENTQ support for accelerated SMMUv3
> devices
> 
> On Fri, Feb 13, 2026 at 10:39:37AM +0000, Shameer Kolothum wrote:
> > Hi,
> >
> > Changes from v5:
> >  https://lore.kernel.org/qemu-devel/20260211083415.133534-1-
> skolothumtho@nvidia.com/
> >
> >  -Addressed feedback and picked up tags. Thanks!
> >  -Decoupled alloc_veventq on smmuv3_cmdq_consume() (patch  #3)
> >  -Updated error messages (patch #5)
> 
> I tested by hacking away the RMR nodes and msi_gpa to trigger some
> translation faults at MSI doorbell.
> 
> Tested-by: Nicolin Chen <nicolinc@nvidia.com>

Thanks. I also tested, modifying  STE0_S1CDMAX to trigger BAD_CD ones.

Shameer