Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / hw / s390x / s390-pci-kvm.h
blob933814a4025bb050af9d5a675d4f8a52f8eced33
1 /*
2 * s390 PCI KVM interfaces
4 * Copyright 2022 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_KVM_H
13 #define HW_S390_PCI_KVM_H
15 #include "hw/s390x/s390-pci-bus.h"
16 #include "hw/s390x/s390-pci-inst.h"
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)
25 return false;
27 static inline int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib,
28 bool assist)
30 return -EINVAL;
32 static inline int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev)
34 return -EINVAL;
36 #endif
38 #endif