Thread (77 messages) 77 messages, 4 authors, 2025-01-23

Re: [PATCH v5 08/14] iommufd/viommu: Add iommufd_viommu_report_event helper

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2025-01-10 19:51:19
Also in: linux-doc, linux-iommu, linux-kselftest, linux-patches, lkml

On Fri, Jan 10, 2025 at 10:38:42AM -0800, Nicolin Chen wrote:
quoted
The virtual event queue should behave the same as if the physical
event queue overflows, and that logic should be in the smmu driver -
this should return some Exxx to indicate the queue is filled.
Hmm, the driver only screams...

static irqreturn_t arm_smmu_evtq_thread(int irq, void *dev)
{
[...]
		/*
		 * Not much we can do on overflow, so scream and pretend we're
		 * trying harder.
		 */
		if (queue_sync_prod_in(q) == -EOVERFLOW)
			dev_err(smmu->dev, "EVTQ overflow detected -- events lost\n");
Well it must know from the HW somehow that the overflow has happened??
quoted
I supposed we will need a way to indicate lost events to userspace on
top of this?
Perhaps another u32 flag in the arm_smmuv3_vevent struct to report
an overflow. That said, what userspace/VMM will need to do with it?
Trigger the above code in the VM somehow?

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help