Re: [PATCH v1 1/3] s390/pci: Preserve FMB state in device re-enablement
From: Niklas Schnelle
Date: Tue May 05 2026 - 11:49:52 EST
On Fri, 2026-05-01 at 15:25 -0400, Omar Elghoul wrote:
> Introduce a function zpci_fmb_reenable_device() that checks for the state
> of the FMB and reuses the same buffer where appropriate. If FMB was not
> previously enabled, it enables it for the device. Call this function during
> a zPCI device re-enablement, which in turn implicitly ensures that the FMB
> is enabled for host devices during their KVM registration.
>
> This function also clears out the software counters, so that a program
> resetting an FMB would see all its counters restart from zero as expected.
> The function to clear the software counters is also separated into a static
> function as it is now reused in both zpci_fmb_enable_device() and
> zpci_fmb_reenable_device().
>
> Signed-off-by: Omar Elghoul <oelghoul@xxxxxxxxxxxxx>
> ---
> arch/s390/include/asm/pci.h | 1 +
> arch/s390/pci/pci.c | 71 ++++++++++++++++++++++++++++++-------
> 2 files changed, 59 insertions(+), 13 deletions(-)
>
Looks good to me. I also gave this a quick sniff test on an LPAR but
still have to test with the FMB handling for KVM that this enabled so
not enough for a Tested-by yet.
Still feel free to add my:
Reviewed-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
Thanks,
Niklas