Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / hw / s390x / s390-pci-vfio.h
blobae1b126ff70bb3e5a2357fada2ec6c68999e8b80
1 /*
2 * s390 vfio-pci interfaces
4 * Copyright 2020 IBM Corp.
5 * Author(s): Matthew Rosato <mjrosato@linux.ibm.com>
7 * This work is licensed under the terms of the GNU GPL, version 2 or (at
8 * your option) any later version. See the COPYING file in the top-level
9 * directory.
12 #ifndef HW_S390_PCI_VFIO_H
13 #define HW_S390_PCI_VFIO_H
15 #include "hw/s390x/s390-pci-bus.h"
16 #include CONFIG_DEVICES
18 #ifdef CONFIG_VFIO
19 bool s390_pci_update_dma_avail(int fd, unsigned int *avail);
20 S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
21 S390PCIBusDevice *pbdev);
22 void s390_pci_end_dma_count(S390pciState *s, S390PCIDMACount *cnt);
23 bool s390_pci_get_host_fh(S390PCIBusDevice *pbdev, uint32_t *fh);
24 void s390_pci_get_clp_info(S390PCIBusDevice *pbdev);
25 #else
26 static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail)
28 return false;
30 static inline S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
31 S390PCIBusDevice *pbdev)
33 return NULL;
35 static inline void s390_pci_end_dma_count(S390pciState *s,
36 S390PCIDMACount *cnt) { }
37 static inline bool s390_pci_get_host_fh(S390PCIBusDevice *pbdev, uint32_t *fh)
39 return false;
41 static inline void s390_pci_get_clp_info(S390PCIBusDevice *pbdev) { }
42 #endif
44 #endif