Re: [PATCH v12 05/12] iommu/arm-smmu-v3: Add ARM_SMMU_FEAT_EVTQ for the event queue

From: John Garry

Date: Mon Nov 16 2026 - 06:00:31 EST


On 11/2/26 05:19, Nicolin Chen wrote:
The driver programs and enables the event queue unconditionally, while the
PRI queue has an ARM_SMMU_FEAT_PRI gating each of its touch points. Yet a
kdump kernel wants to leave both of the queues alone, which would take an
is_kdump_kernel() test at every one of those places.

Add an ARM_SMMU_FEAT_EVTQ that the probe always sets, as the event queue is
architecturally mandatory, and gate the queue's allocation, its interrupt,
its MSI vector, and its CR0 and IRQ_CTRL enables on it. A subsequent change
will turn the queue off in a single place.

No functional change intended.

Suggested-by: Jason Gunthorpe<jgg@xxxxxxxxxx>
Suggested-by: Robin Murphy<robin.murphy@xxxxxxx>
Acked-by: Kiryl Shutsemau (Meta)<kas@xxxxxxxxxx>
Reviewed-by: Jason Gunthorpe<jgg@xxxxxxxxxx>
Reviewed-by: Mostafa Saleh<smostafa@xxxxxxxxxx>
Tested-by: Breno Leitao<leitao@xxxxxxxxxx>
Tested-by: Cristian Prundeanu<cpru@xxxxxxxxxx>
Tested-by: Shuai Xue<xueshuai@xxxxxxxxxxxxxxxxx>
Signed-off-by: Nicolin Chen<nicolinc@xxxxxxxxxx>
---

FWIW, regardless of nitpicking:

Reviewed-by: John Garry <john.garry@xxxxxxx>

+ /* The event queue is architecturally mandatory, unlike the PRI queue */

nit: I don't see a need to mention PRI

+ smmu->features |= ARM_SMMU_FEAT_EVTQ;
+


> + if (smmu->features & ARM_SMMU_FEAT_EVTQ) {
> + irq = smmu->evtq.q.irq;
> + if (irq) {

Again I am wondering if ARM_SMMU_FEAT_EVTQ unset is equivalent to irq == 0? If we only checked irq != 0, then we would get the useful "no evtq irq - events will not be reported!\n" message. I don't think that this is printed elsewhere (for no evtq). But maybe I am missing something on this.