]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/x86/kvm/assigned-dev.h
Merge remote-tracking branch 'regulator/topic/core' into regulator-next
[mirror_ubuntu-zesty-kernel.git] / arch / x86 / kvm / assigned-dev.h
1 #ifndef ARCH_X86_KVM_ASSIGNED_DEV_H
2 #define ARCH_X86_KVM_ASSIGNED_DEV_H
3
4 #include <linux/kvm_host.h>
5
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);
9
10 int kvm_iommu_map_guest(struct kvm *kvm);
11 int kvm_iommu_unmap_guest(struct kvm *kvm);
12
13 long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
14 unsigned long arg);
15
16 void kvm_free_all_assigned_devices(struct kvm *kvm);
17 #else
18 static inline int kvm_iommu_unmap_guest(struct kvm *kvm)
19 {
20 return 0;
21 }
22
23 static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
24 unsigned long arg)
25 {
26 return -ENOTTY;
27 }
28
29 static inline void kvm_free_all_assigned_devices(struct kvm *kvm) {}
30 #endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */
31
32 #endif /* ARCH_X86_KVM_ASSIGNED_DEV_H */