Linux 4.2.2
[linux/fpc-iii.git] / arch / x86 / kvm / assigned-dev.h
bloba428c1a211b2ef34b1970c540928deee359fc722
1 #ifndef ARCH_X86_KVM_ASSIGNED_DEV_H
2 #define ARCH_X86_KVM_ASSIGNED_DEV_H
4 #include <linux/kvm_host.h>
6 #ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
7 int kvm_assign_device(struct kvm *kvm, struct pci_dev *pdev);
8 int kvm_deassign_device(struct kvm *kvm, struct pci_dev *pdev);
10 int kvm_iommu_map_guest(struct kvm *kvm);
11 int kvm_iommu_unmap_guest(struct kvm *kvm);
13 long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
14 unsigned long arg);
16 void kvm_free_all_assigned_devices(struct kvm *kvm);
17 #else
18 static inline int kvm_iommu_unmap_guest(struct kvm *kvm)
20 return 0;
23 static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
24 unsigned long arg)
26 return -ENOTTY;
29 static inline void kvm_free_all_assigned_devices(struct kvm *kvm) {}
30 #endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */
32 #endif /* ARCH_X86_KVM_ASSIGNED_DEV_H */