Hi, When accel=on is enabled for an SMMUv3 instance, the host hardware SMMUv3 may generate Stage-1 (S1) fault or event notifications that are targeted toward the vIOMMU instance in userspace.
This series adds support in QEMU to receive such host events through a vEVENTQ object and propagate them to the guest. The implementation leverages the vEVENTQ interface provided by the IOMMUFD kernel subsystem. This is being sent as an RFC since it depends on the "Add support for user-creatable accelerated SMMUv3" series which is currently under discussion[0]. I have lightly tested this on a Grace platform with some hacks to generate faults events. Further testing and feedbacks welcome. Thanks, Shameer [0] https://lore.kernel.org/qemu-devel/[email protected]/ Nicolin Chen (2): backends/iommufd: Introduce iommufd_backend_alloc_veventq hw/arm/smmuv3-accel: Allocate vEVENTQ for accelerated SMMUv3 devices Shameer Kolothum (2): 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 | 123 +++++++++++++++++++++++++++++++++++++++ hw/arm/smmuv3-accel.h | 8 +++ hw/arm/smmuv3-internal.h | 4 ++ hw/arm/smmuv3.c | 28 +++++++-- hw/arm/trace-events | 2 +- include/system/iommufd.h | 12 ++++ 8 files changed, 202 insertions(+), 7 deletions(-) -- 2.43.0
