[PATCH v4 0/6] KVM s390x PCI fixes

Farhan Ali posted 6 patches 2 days, 5 hours ago
There is a newer version of this series
arch/s390/kvm/pci.c | 102 +++++++++++++++++++++++++++++++++++---------
arch/s390/kvm/pci.h |   2 +
2 files changed, 84 insertions(+), 20 deletions(-)
[PATCH v4 0/6] KVM s390x PCI fixes
Posted by Farhan Ali 2 days, 5 hours ago
Hi,

This series attempts to fix some the pre-existing issues[1] found by sashiko.

[1] https://lore.kernel.org/all/20260624063447.85DF51F000E9@smtp.kernel.org/

Thanks
Farhan

ChangeLog
---------
v3: https://lore.kernel.org/all/20260720175819.1723-1-alifm@linux.ibm.com/
v3 -> v4
   - Add validation checks for AISB/AIBV spanning more than a page.
   - Reject multiple ioctl call for the same device, if adapter interrupt
   forwarding is already enabled for the device.
   - Rebase on 7.2-rc4.

v2: https://lore.kernel.org/all/20260716175241.1039-1-alifm@linux.ibm.com/
v2 -> v3
   - Remove overwriting guest FIB since we don't use it for
   re-issue (patch 4).

v1: https://lore.kernel.org/all/20260713172600.1284-1-alifm@linux.ibm.com/
v1 -> v2
   - Drop fix handling AISB/AIBV spanning multiple pages.
   - Fix memory accounting functions for the case when interrupt forwarding
   is enabled by one process but disabled by a different process (patch 1).


Farhan Ali (6):
  KVM: s390: pci: Reject adapter interrupt forwarding if already enabled
  KVM: s390: pci: Fix memory accounting for pinned/unpinned pages
  KVM: s390: pci: Fix missing error codes and memory unaccounting
  KVM: s390: pci: Fix NULL dereference on AIBV allocation failure
  KVM: s390: pci: Fix resource leak on IRQ registration failure
  KVM: s390: pci: Validate AIBV and AISB before pinning guest pages

 arch/s390/kvm/pci.c | 102 +++++++++++++++++++++++++++++++++++---------
 arch/s390/kvm/pci.h |   2 +
 2 files changed, 84 insertions(+), 20 deletions(-)

-- 
2.43.0
Re: [PATCH v4 0/6] KVM s390x PCI fixes
Posted by Christian Borntraeger 1 day, 9 hours ago
Am 22.07.26 um 19:06 schrieb Farhan Ali:
> Hi,
> 
> This series attempts to fix some the pre-existing issues[1] found by sashiko.
> 
> [1] https://lore.kernel.org/all/20260624063447.85DF51F000E9@smtp.kernel.org/
> 
> Thanks
> Farhan
> 
> ChangeLog
> ---------
> v3: https://lore.kernel.org/all/20260720175819.1723-1-alifm@linux.ibm.com/
> v3 -> v4
>     - Add validation checks for AISB/AIBV spanning more than a page.
>     - Reject multiple ioctl call for the same device, if adapter interrupt
>     forwarding is already enabled for the device.
>     - Rebase on 7.2-rc4.
> 
> v2: https://lore.kernel.org/all/20260716175241.1039-1-alifm@linux.ibm.com/
> v2 -> v3
>     - Remove overwriting guest FIB since we don't use it for
>     re-issue (patch 4).
> 
> v1: https://lore.kernel.org/all/20260713172600.1284-1-alifm@linux.ibm.com/
> v1 -> v2
>     - Drop fix handling AISB/AIBV spanning multiple pages.
>     - Fix memory accounting functions for the case when interrupt forwarding
>     is enabled by one process but disabled by a different process (patch 1).
> 
> 
> Farhan Ali (6):
>    KVM: s390: pci: Reject adapter interrupt forwarding if already enabled
>    KVM: s390: pci: Fix memory accounting for pinned/unpinned pages
>    KVM: s390: pci: Fix missing error codes and memory unaccounting
>    KVM: s390: pci: Fix NULL dereference on AIBV allocation failure
>    KVM: s390: pci: Fix resource leak on IRQ registration failure
>    KVM: s390: pci: Validate AIBV and AISB before pinning guest pages
> 
>   arch/s390/kvm/pci.c | 102 +++++++++++++++++++++++++++++++++++---------
>   arch/s390/kvm/pci.h |   2 +
>   2 files changed, 84 insertions(+), 20 deletions(-)
> 

I would take this series and do small fixups where necessary. Just tell
me if the change for patch 6 is fine. Or provide a v5.

I suggest to add cc stable to all patches.
Re: [PATCH v4 0/6] KVM s390x PCI fixes
Posted by Matthew Rosato 1 day, 9 hours ago
> I would take this series and do small fixups where necessary. Just tell
> me if the change for patch 6 is fine. Or provide a v5.
> 

I am reviewing and testing this today, please give me a few more hours.

> I suggest to add cc stable to all patches.

Agree
Re: [PATCH v4 0/6] KVM s390x PCI fixes
Posted by Matthew Rosato 1 day, 6 hours ago
On 7/23/26 9:00 AM, Matthew Rosato wrote:
> 
>> I would take this series and do small fixups where necessary. Just tell
>> me if the change for patch 6 is fine. Or provide a v5.
>>
> 
> I am reviewing and testing this today, please give me a few more hours.
> 

Farhan, could you do a v5 with comments addressed?

I am willing to also tag patch 2 if you either make the change I asked
for there (or explain to me why it's not necessary).

I've also done a variety of testing, so I'd be happy to also give my
Tested-by to the series.  But would be good to do this on a v5.

>> I suggest to add cc stable to all patches.
> 
> Agree
Re: [PATCH v4 0/6] KVM s390x PCI fixes
Posted by Farhan Ali 1 day, 5 hours ago
On 7/23/2026 8:35 AM, Matthew Rosato wrote:
> On 7/23/26 9:00 AM, Matthew Rosato wrote:
>>> I would take this series and do small fixups where necessary. Just tell
>>> me if the change for patch 6 is fine. Or provide a v5.
>>>
>> I am reviewing and testing this today, please give me a few more hours.
>>
> Farhan, could you do a v5 with comments addressed?
>
> I am willing to also tag patch 2 if you either make the change I asked
> for there (or explain to me why it's not necessary).

Yes I can spin a v5, I think we have enough reviews to warrant a v5. 
Thanks all for reviewing.

Thanks

Farhan

>
> I've also done a variety of testing, so I'd be happy to also give my
> Tested-by to the series.  But would be good to do this on a v5.
>
>>> I suggest to add cc stable to all patches.
>> Agree