[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] s390x/pci: indicate QEMU supports relaxed translation for pa
From: |
Matthew Rosato |
Subject: |
[PATCH 2/2] s390x/pci: indicate QEMU supports relaxed translation for passthrough |
Date: |
Mon, 9 Dec 2024 14:29:27 -0500 |
Specifying this bit in the guest CLP response indicates that the guest
can optionally choose to skip translation and instead use
identity-mapped operations.
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
---
hw/s390x/s390-pci-vfio.c | 4 +++-
include/hw/s390x/s390-pci-clp.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 7dbbc76823..51ac5ff3eb 100644
--- a/hw/s390x/s390-pci-vfio.c
+++ b/hw/s390x/s390-pci-vfio.c
@@ -224,7 +224,9 @@ static void s390_pci_read_group(S390PCIBusDevice *pbdev,
resgrp = &pbdev->pci_group->zpci_group;
if (cap->flags & VFIO_DEVICE_INFO_ZPCI_FLAG_REFRESH) {
- resgrp->fr = 1;
+ resgrp->fr = (CLP_RSP_QPCIG_MASK_RTR | CLP_RSP_QPCIG_MASK_REFRESH);
+ } else {
+ resgrp->fr = CLP_RSP_QPCIG_MASK_RTR;
}
resgrp->dasm = cap->dasm;
resgrp->msia = cap->msi_addr;
diff --git a/include/hw/s390x/s390-pci-clp.h b/include/hw/s390x/s390-pci-clp.h
index 03b7f9ba5f..6a635d693b 100644
--- a/include/hw/s390x/s390-pci-clp.h
+++ b/include/hw/s390x/s390-pci-clp.h
@@ -158,6 +158,7 @@ typedef struct ClpRspQueryPciGrp {
#define CLP_RSP_QPCIG_MASK_NOI 0xfff
uint16_t i;
uint8_t version;
+#define CLP_RSP_QPCIG_MASK_RTR 0x20
#define CLP_RSP_QPCIG_MASK_FRAME 0x2
#define CLP_RSP_QPCIG_MASK_REFRESH 0x1
uint8_t fr;
--
2.47.0
- [PATCH 0/2] s390x/pci: relax I/O address translation requirement, Matthew Rosato, 2024/12/09
- [PATCH 2/2] s390x/pci: indicate QEMU supports relaxed translation for passthrough,
Matthew Rosato <=
- [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, Matthew Rosato, 2024/12/09
- Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, David Hildenbrand, 2024/12/09
- Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, Matthew Rosato, 2024/12/09
- Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, David Hildenbrand, 2024/12/09
- Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, Matthew Rosato, 2024/12/09
- Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, David Hildenbrand, 2024/12/10
- Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, Matthew Rosato, 2024/12/13
Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, Thomas Huth, 2024/12/11
Re: [PATCH 1/2] s390x/pci: add support for guests that request direct mapping, Cédric Le Goater, 2024/12/11