aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Rosato <mjrosato@linux.ibm.com>2022-09-02 13:27:36 -0400
committerThomas Huth <thuth@redhat.com>2022-09-26 17:23:47 +0200
commit9ee8f7e46a7d42ede69a4780200129bf1acb0d01 (patch)
treeaa573c2d1410da949a910d1719ae545fdd2686d5
parent30dcf4f7fd23bef7d72a2454c60881710fd4c785 (diff)
downloadqemu-9ee8f7e46a7d42ede69a4780200129bf1acb0d01.zip
qemu-9ee8f7e46a7d42ede69a4780200129bf1acb0d01.tar.gz
qemu-9ee8f7e46a7d42ede69a4780200129bf1acb0d01.tar.bz2
s390x/pci: reflect proper maxstbl for groups of interpreted devices
The maximum supported store block length might be different depending on whether the instruction is interpretively executed (firmware-reported maximum) or handled via userspace intercept (host kernel API maximum). Choose the best available value during group creation. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Pierre Morel <pmorel@linux.ibm.com> Message-Id: <20220902172737.170349-8-mjrosato@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--hw/s390x/s390-pci-vfio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 338f436..2aefa50 100644
--- a/hw/s390x/s390-pci-vfio.c
+++ b/hw/s390x/s390-pci-vfio.c
@@ -213,7 +213,11 @@ static void s390_pci_read_group(S390PCIBusDevice *pbdev,
resgrp->msia = cap->msi_addr;
resgrp->mui = cap->mui;
resgrp->i = cap->noi;
- resgrp->maxstbl = cap->maxstbl;
+ if (pbdev->interp && hdr->version >= 2) {
+ resgrp->maxstbl = cap->imaxstbl;
+ } else {
+ resgrp->maxstbl = cap->maxstbl;
+ }
resgrp->version = cap->version;
resgrp->dtsm = ZPCI_DTSM;
}