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 17 #ifdef CONFIG_LINUX 18 bool s390_pci_update_dma_avail(int fd, unsigned int *avail); 19 S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s, 20 S390PCIBusDevice *pbdev); 21 void s390_pci_end_dma_count(S390pciState *s, S390PCIDMACount *cnt); 22 void s390_pci_get_clp_info(S390PCIBusDevice *pbdev); 23 #else 24 static inline bool s390_pci_update_dma_avail(int fd, unsigned int *avail) 25 { 26 return false; 27 } 28 static inline S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s, 29 S390PCIBusDevice *pbdev) 30 { 31 return NULL; 32 } 33 static inline void s390_pci_end_dma_count(S390pciState *s, 34 S390PCIDMACount *cnt) { } 35 static inline void s390_pci_get_clp_info(S390PCIBusDevice *pbdev) { } 36 #endif 37 38 #endif 39