aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMatthew Rosato <mjrosato@linux.ibm.com>2025-02-26 16:00:13 -0500
committerThomas Huth <thuth@redhat.com>2025-03-07 09:24:00 +0100
commitd9b5dfc7122559e5b5959ecf534788b90c3dd102 (patch)
tree9019e1c3eff45f2ded45ac42417c82a3be152d0d /hw
parentdfcee1ea4c52ac60e0a06221eafb7b6253eb10c3 (diff)
downloadqemu-d9b5dfc7122559e5b5959ecf534788b90c3dd102.zip
qemu-d9b5dfc7122559e5b5959ecf534788b90c3dd102.tar.gz
qemu-d9b5dfc7122559e5b5959ecf534788b90c3dd102.tar.bz2
s390x/pci: indicate QEMU supports relaxed translation for passthrough
Specifying this bit in the guest CLP response indicates that the guest can optionally choose to skip translation and instead use identity-mapped operations. Tested-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Message-ID: <20250226210013.238349-3-mjrosato@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/s390-pci-vfio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 443e222..6236ac7 100644
--- a/hw/s390x/s390-pci-vfio.c
+++ b/hw/s390x/s390-pci-vfio.c
@@ -238,8 +238,11 @@ static void s390_pci_read_group(S390PCIBusDevice *pbdev,
pbdev->pci_group = s390_group_create(pbdev->zpci_fn.pfgid, start_gid);
resgrp = &pbdev->pci_group->zpci_group;
+ if (pbdev->rtr_avail) {
+ resgrp->fr |= CLP_RSP_QPCIG_MASK_RTR;
+ }
if (cap->flags & VFIO_DEVICE_INFO_ZPCI_FLAG_REFRESH) {
- resgrp->fr = 1;
+ resgrp->fr |= CLP_RSP_QPCIG_MASK_REFRESH;
}
resgrp->dasm = cap->dasm;
resgrp->msia = cap->msi_addr;