Re: [PATCH v12 4/7] s390/pci: Store PCI error information for passthrough devices

From: Matthew Rosato

Date: Tue Mar 31 2026 - 15:30:26 EST


On 3/31/26 3:23 PM, Farhan Ali wrote:
>> Actually..  Could mediated_recovery just be part of the
>> zpci_ccdf_pending stucture?  AFAICT the bit basically controls whether
>> or not the zpci_ccdf_pending structure is used / has meaning.  You even
>> turn the bit off at the same time you memset(&zdev->pending_errs, 0) in
>> zpci_stop_mediated_recovery() -- though an explicit setting of
>> mediated_devices = false would still be nice for code clarity.
>>
>> Then the spinlock continues to protect only this structure.
>
> You are right, the mediated_recovery flag drives the use of the
> zpci_ccdf_pending struct. IMHO keeping the flag helped me with code
> clarity and keeping the struct simple and not be tied with the flag. But
> if you (or anyone) feels strongly about it then I can add the flag to
> the zpci_ccdf_pending struct.
>

FWIW I am fine with leaving it as-is as long as there is a clear comment
tying the bool to the mutex.

Thanks,
Matt