1 /* 2 * s390 PCI KVM interfaces 3 * 4 * Copyright 2022 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_KVM_H 13 #define HW_S390_PCI_KVM_H 14 15 #include "hw/s390x/s390-pci-bus.h" 16 #include "hw/s390x/s390-pci-inst.h" 17 18 #ifdef CONFIG_KVM 19 bool s390_pci_kvm_interp_allowed(void); 20 int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist); 21 int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev); 22 #else 23 static inline bool s390_pci_kvm_interp_allowed(void) 24 { 25 return false; 26 } 27 static inline int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, 28 bool assist) 29 { 30 return -EINVAL; 31 } 32 static inline int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev) 33 { 34 return -EINVAL; 35 } 36 #endif 37 38 #endif 39