aboutsummaryrefslogtreecommitdiff
path: root/include/hw/s390x/s390-pci-vfio.h
diff options
context:
space:
mode:
authorMatthew Rosato <mjrosato@linux.ibm.com>2020-10-26 11:34:41 -0400
committerAlex Williamson <alex.williamson@redhat.com>2020-11-01 12:30:52 -0700
commit1e7552ff5c34972a7a17d2b06900a0b66c79a68b (patch)
treecf45f711a925437b91fb72777310f558fb33e8bf /include/hw/s390x/s390-pci-vfio.h
parent92fe289ace3e559e2d18d0c2e49cdfb4cbd5a59b (diff)
downloadqemu-arm-1e7552ff5c34972a7a17d2b06900a0b66c79a68b.tar.gz
s390x/pci: get zPCI function info from host
We use the capability chains of the VFIO_DEVICE_GET_INFO ioctl to retrieve the CLP information that the kernel exports. To be compatible with previous kernel versions we fall back on previous predefined values, same as the emulation values, when the ioctl is found to not support capability chains. If individual CLP capabilities are not found, we fall back on default values for only those capabilities missing from the chain. This patch is based on work previously done by Pierre Morel. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> [aw: non-Linux build fixes] Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/hw/s390x/s390-pci-vfio.h')
-rw-r--r--include/hw/s390x/s390-pci-vfio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/s390x/s390-pci-vfio.h b/include/hw/s390x/s390-pci-vfio.h
index 539bcf04eb..c7984905b3 100644
--- a/include/hw/s390x/s390-pci-vfio.h
+++ b/include/hw/s390x/s390-pci-vfio.h
@@ -19,6 +19,7 @@ bool s390_pci_update_dma_avail(int fd, unsigned int *avail);
S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
S390PCIBusDevice *pbdev);
void s390_pci_end_dma_count(S390pciState *s, S390PCIDMACount *cnt);
+void s390_pci_get_clp_info(S390PCIBusDevice *pbdev);
#else
static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail)
{
@@ -31,6 +32,7 @@ static inline S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
}
static inline void s390_pci_end_dma_count(S390pciState *s,
S390PCIDMACount *cnt) { }
+static inline void s390_pci_get_clp_info(S390PCIBusDevice *pbdev) { }
#endif
#endif