[PATCH] irqchip/gicv3-its: Add workaround for HIP09/HIP10/HIP10C erratum 162100803/162200807/162400807
Marc Zyngier
maz at kernel.org
Mon Sep 15 07:46:54 PDT 2025
On Mon, 15 Sep 2025 15:06:35 +0100,
Zhou Wang <wangzhou1 at hisilicon.com> wrote:
>
> On 2025/9/15 20:23, Marc Zyngier wrote:
> > On Wed, 10 Sep 2025 04:27:15 +0100,
> > Zhou Wang <wangzhou1 at hisilicon.com> wrote:
> >>
>
> [...]
>
> >>>
> >>> You are telling the ITS that it is allowed to go and access
> >>> unspecified data (16 bit worth of translations). That's not
> >>> acceptable. If you *have* to do that, then override the size in the
> >>> driver code to actually allocate the corresponding memory.
> >>
> >> Then we have to override the ITT memory to 2 ^ 16 * 8 for one device
> >> :(
> >
> > But what's the alternative? Letting the ITS speculate in random
> > memory, possibly under the control of userspace or a guest? I don't
> > think that's acceptable.
>
> Seems that only a bad device who could send an interrupt which is not be
> declared may bring a problem here.
>
> Not sure how dose userspace or a guest make a problem here?
Assign a device to a guest, let it generate an MSI with an event-id
that's in the correct range, observe it accessing the memory.
All you need is to be in control of how the device generates MSIs.
> >>>> +#ifdef CONFIG_HISILICON_ERRATUM_162100803
> >>>> + {
> >>>> + .desc = "ITS: Hip09 erratum 162100803",
> >>>> + .iidr = 0x00051736,
> >>>> + .mask = 0xffffffff,
> >>>> + .init = its_enable_quirk_162100803,
> >>>> + },
> >>>> + {
> >>>> + .desc = "ITS: Hip10 erratum 162200807",
> >>>> + .iidr = 0x01051736,
> >>>> + .mask = 0xffffffff,
> >>>> + .init = its_enable_quirk_162100803,
> >>>> + },
> >>>> + {
> >>>> + .desc = "ITS: Hip10c erratum 162400807",
> >>>> + .iidr = 0x00061736,
> >>>> + .mask = 0xffffffff,
> >>>> + .init = its_enable_quirk_162100803,
> >>>
> >>> Can you try to merge these three entries and adjust the mask
> >>> accordingly? mask=0xeffcffff should do the trick, assuming that you
> >>> don't have any other hardware overlapping this.
> >>
> >> The iidrs are different, how to merge these entries?
> >
> > By using the mask:
> >
> > {
> > .desc = "ITS: Hip10 erratum, will eat your vSGIs",
> > .iidr = 0x01051736,
> > .mask = 0xeffcffff,
> > .init = its_enable_quirk_162100803,
> > },
> >
> > will match all three platforms, assuming I got the mask correctly.
>
> iidrs are differet, so one iidr can not match all. e.g.
> for iidr = 0x00061736, mask with 0xeffcffff will be 0x00041736, which
> will not be 0x01051736.
Sorry, copy paste, and wrong mask. This works (I actually checked):
{
.desc = "ITS: Hip10 erratum, will eat your vSGIs",
.iidr = 0x00041736,
.mask = 0xfefcffff,
.init = its_enable_quirk_162100803,
},
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list