diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kvm_host.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 309774715897..996661eb8e99 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -667,7 +667,6 @@ static inline wait_queue_head_t *kvm_arch_vcpu_wq(struct kvm_vcpu *vcpu) | |||
667 | 667 | ||
668 | int kvm_arch_init_vm(struct kvm *kvm, unsigned long type); | 668 | int kvm_arch_init_vm(struct kvm *kvm, unsigned long type); |
669 | void kvm_arch_destroy_vm(struct kvm *kvm); | 669 | void kvm_arch_destroy_vm(struct kvm *kvm); |
670 | void kvm_free_all_assigned_devices(struct kvm *kvm); | ||
671 | void kvm_arch_sync_events(struct kvm *kvm); | 670 | void kvm_arch_sync_events(struct kvm *kvm); |
672 | 671 | ||
673 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); | 672 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); |
@@ -736,7 +735,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); | |||
736 | /* For vcpu->arch.iommu_flags */ | 735 | /* For vcpu->arch.iommu_flags */ |
737 | #define KVM_IOMMU_CACHE_COHERENCY 0x1 | 736 | #define KVM_IOMMU_CACHE_COHERENCY 0x1 |
738 | 737 | ||
739 | #ifdef CONFIG_IOMMU_API | 738 | #ifdef CONFIG_KVM_DEVICE_ASSIGNMENT |
740 | int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); | 739 | int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); |
741 | void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot); | 740 | void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot); |
742 | int kvm_iommu_map_guest(struct kvm *kvm); | 741 | int kvm_iommu_map_guest(struct kvm *kvm); |
@@ -745,7 +744,7 @@ int kvm_assign_device(struct kvm *kvm, | |||
745 | struct kvm_assigned_dev_kernel *assigned_dev); | 744 | struct kvm_assigned_dev_kernel *assigned_dev); |
746 | int kvm_deassign_device(struct kvm *kvm, | 745 | int kvm_deassign_device(struct kvm *kvm, |
747 | struct kvm_assigned_dev_kernel *assigned_dev); | 746 | struct kvm_assigned_dev_kernel *assigned_dev); |
748 | #else /* CONFIG_IOMMU_API */ | 747 | #else |
749 | static inline int kvm_iommu_map_pages(struct kvm *kvm, | 748 | static inline int kvm_iommu_map_pages(struct kvm *kvm, |
750 | struct kvm_memory_slot *slot) | 749 | struct kvm_memory_slot *slot) |
751 | { | 750 | { |
@@ -757,28 +756,11 @@ static inline void kvm_iommu_unmap_pages(struct kvm *kvm, | |||
757 | { | 756 | { |
758 | } | 757 | } |
759 | 758 | ||
760 | static inline int kvm_iommu_map_guest(struct kvm *kvm) | ||
761 | { | ||
762 | return -ENODEV; | ||
763 | } | ||
764 | |||
765 | static inline int kvm_iommu_unmap_guest(struct kvm *kvm) | 759 | static inline int kvm_iommu_unmap_guest(struct kvm *kvm) |
766 | { | 760 | { |
767 | return 0; | 761 | return 0; |
768 | } | 762 | } |
769 | 763 | #endif | |
770 | static inline int kvm_assign_device(struct kvm *kvm, | ||
771 | struct kvm_assigned_dev_kernel *assigned_dev) | ||
772 | { | ||
773 | return 0; | ||
774 | } | ||
775 | |||
776 | static inline int kvm_deassign_device(struct kvm *kvm, | ||
777 | struct kvm_assigned_dev_kernel *assigned_dev) | ||
778 | { | ||
779 | return 0; | ||
780 | } | ||
781 | #endif /* CONFIG_IOMMU_API */ | ||
782 | 764 | ||
783 | static inline void __guest_enter(void) | 765 | static inline void __guest_enter(void) |
784 | { | 766 | { |
@@ -1032,11 +1014,13 @@ static inline bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu) { return true; } | |||
1032 | 1014 | ||
1033 | #endif | 1015 | #endif |
1034 | 1016 | ||
1035 | #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT | 1017 | #ifdef CONFIG_KVM_DEVICE_ASSIGNMENT |
1036 | 1018 | ||
1037 | long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, | 1019 | long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, |
1038 | unsigned long arg); | 1020 | unsigned long arg); |
1039 | 1021 | ||
1022 | void kvm_free_all_assigned_devices(struct kvm *kvm); | ||
1023 | |||
1040 | #else | 1024 | #else |
1041 | 1025 | ||
1042 | static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, | 1026 | static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, |
@@ -1045,6 +1029,8 @@ static inline long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl, | |||
1045 | return -ENOTTY; | 1029 | return -ENOTTY; |
1046 | } | 1030 | } |
1047 | 1031 | ||
1032 | static inline void kvm_free_all_assigned_devices(struct kvm *kvm) {} | ||
1033 | |||
1048 | #endif | 1034 | #endif |
1049 | 1035 | ||
1050 | static inline void kvm_make_request(int req, struct kvm_vcpu *vcpu) | 1036 | static inline void kvm_make_request(int req, struct kvm_vcpu *vcpu) |