Re: [PATCH 1/2] PCI/AER: Make aer_mask_override effective for injected errors

From: Bjorn Helgaas

Date: Tue Nov 24 2026 - 19:37:54 EST


On Wed, Oct 28, 2026 at 05:30:38PM +0000, Priyank Rathod wrote:
> Hi Bjorn,
>
> Thank you for reviewing the patch!
>
> On Tue, Oct 27, 2026 at 06:08:53PM -0500, Bjorn Helgaas wrote:
> > Can you start with a one- or two-sentence description of what's going
> > on here? Evidently injecting some errors doesn't work as expected
> > today? As long as the justification is compelling and the code is
> > readable, I don't think we need quite as much detail about every
> > little implementation detail.
>
> Good point, thank you. Would a shorter commit log like the following
> look better to you?
>
> aer_mask_override=1 is supposed to allow injecting masked errors, but
> aer_inject() corrupts the hardware Mask registers with "&= !" and
> restores them before irq_inject_interrupt(), so aer_isr() still drops
> the error as masked. Emulate aer_mask_override in config space reads
> and writes instead of modifying the hardware Mask registers, and
> document the parameter with MODULE_PARM_DESC().
>
> I am happy to send a v2 with this updated commit message, unless you
> prefer to adjust it directly when applying.

Mixing the logical "!" with the bitwise "&=" in
"cor_mask &= !(einj->cor_status)" definitely looks bogus.

Please post a v2 with updated commit message. Better to minimize
change between what you post and what gets applied.