Re: [PATCH v2 4/5] irqchip/gic-v3-its: Zero ITTs reused from the ITT pool

From: Fuad Tabba

Date: Mon Nov 23 2026 - 08:29:34 EST


Hi Marc,

On Mon, 23 Nov 2026 13:01:07 +0000, Marc Zyngier <maz@xxxxxxxxxx> wrote:
[...]
> > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
[...]
> > @@ -270,8 +270,10 @@ static void *itt_alloc_pool(int node, int size)
> >
> > do {
> > addr = gen_pool_alloc(itt_pool, size);
> > - if (addr)
> > + if (addr) {
> > + memset((void *)addr, 0, size);
> > break;
> > + }
> >
> > page = its_alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0);
> > if (!page)
>
> If we are going to zero every ITT that is dished out to the driver,
> then there is no point in asking for the page to be zeroed the first
> place, is it?

I'll drop it in v3. Until [1] is in, __GFP_ZERO is what clears a page
before a pKVM guest shares it with the host.

Cheers,
/fuad

[1] https://lore.kernel.org/all/20261116110549.1863653-1-fuad.tabba@xxxxxxxxx/