xref: /openbmc/qemu/include/hw/s390x/s390-pci-vfio.h (revision a6caeee8)
1 /*
2  * s390 vfio-pci interfaces
3  *
4  * Copyright 2020 IBM Corp.
5  * Author(s): Matthew Rosato <mjrosato@linux.ibm.com>
6  *
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.
10  */
11 
12 #ifndef HW_S390_PCI_VFIO_H
13 #define HW_S390_PCI_VFIO_H
14 
15 #include "hw/s390x/s390-pci-bus.h"
16 #include CONFIG_DEVICES
17 
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 void s390_pci_get_clp_info(S390PCIBusDevice *pbdev);
24 #else
25 static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail)
26 {
27     return false;
28 }
29 static inline S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s,
30                                                         S390PCIBusDevice *pbdev)
31 {
32     return NULL;
33 }
34 static inline void s390_pci_end_dma_count(S390pciState *s,
35                                           S390PCIDMACount *cnt) { }
36 static inline void s390_pci_get_clp_info(S390PCIBusDevice *pbdev) { }
37 #endif
38 
39 #endif
40