Skip to content

Commit

Permalink
s390x/pci: reflect proper maxstbl for groups of interpreted devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rosatomj authored and huth committed Sep 26, 2022
1 parent 30dcf4f commit 9ee8f7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/s390x/s390-pci-vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9ee8f7e

Please sign in to comment.