* [PATCH] KVM: s390: pci: Fix handling of AIF enable without AISB
@ 2026-07-09 13:54 Matthew Rosato
2026-07-09 14:23 ` Christian Borntraeger
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Rosato @ 2026-07-09 13:54 UTC (permalink / raw)
To: linux-s390
Cc: alifm, farman, borntraeger, frankja, imbrenda, david, hca, gor,
agordeev, svens, schnelle, kvm, linux-kernel, stable
When a guest seeks to register IRQs without a summary bit specified,
ensure that the associated GAITE then stores 0 for the guest AISB
location instead of virt_to_phys(page_address(NULL)).
Fixes: 3c5a1b6f0a18 ("KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding")
Cc: stable@vger.kernel.org
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
---
arch/s390/kvm/pci.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/s390/kvm/pci.c b/arch/s390/kvm/pci.c
index 5b075c38998e..dc748cde4703 100644
--- a/arch/s390/kvm/pci.c
+++ b/arch/s390/kvm/pci.c
@@ -300,9 +300,14 @@ static int kvm_s390_pci_aif_enable(struct zpci_dev *zdev, struct zpci_fib *fib,
gaite->gisc = fib->fmt0.isc;
gaite->count++;
- gaite->aisbo = fib->fmt0.aisbo;
- gaite->aisb = virt_to_phys(page_address(aisb_page) + (fib->fmt0.aisb &
- ~PAGE_MASK));
+ if (fib->fmt0.sum == 1) {
+ gaite->aisbo = fib->fmt0.aisbo;
+ gaite->aisb = virt_to_phys(page_address(aisb_page) +
+ (fib->fmt0.aisb & ~PAGE_MASK));
+ } else {
+ gaite->aisbo = 0;
+ gaite->aisb = 0;
+ }
aift->kzdev[zdev->aisb] = zdev->kzdev;
spin_unlock_irq(&aift->gait_lock);
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: s390: pci: Fix handling of AIF enable without AISB
2026-07-09 13:54 [PATCH] KVM: s390: pci: Fix handling of AIF enable without AISB Matthew Rosato
@ 2026-07-09 14:23 ` Christian Borntraeger
0 siblings, 0 replies; 2+ messages in thread
From: Christian Borntraeger @ 2026-07-09 14:23 UTC (permalink / raw)
To: Matthew Rosato, linux-s390
Cc: alifm, farman, frankja, imbrenda, david, hca, gor, agordeev,
svens, schnelle, kvm, linux-kernel, stable
Am 09.07.26 um 15:54 schrieb Matthew Rosato:
> When a guest seeks to register IRQs without a summary bit specified,
> ensure that the associated GAITE then stores 0 for the guest AISB
> location instead of virt_to_phys(page_address(NULL)).
>
> Fixes: 3c5a1b6f0a18 ("KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding")
> Cc: stable@vger.kernel.org
> Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
applied and queued for master.
Thank you
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-09 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 13:54 [PATCH] KVM: s390: pci: Fix handling of AIF enable without AISB Matthew Rosato
2026-07-09 14:23 ` Christian Borntraeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox