aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorWeidong Han <weidong.han@intel.com>2008-12-02 08:03:39 -0500
committerJoerg Roedel <joerg.roedel@amd.com>2009-01-03 08:02:19 -0500
commit260782bcfdaaa7850f29d6bb2ec6603019168c57 (patch)
tree6f0b72f07ee04ad1210aca861dd4ee8c51846609 /include/linux/kvm_host.h
parentfe40f1e020d0923f5f35ca15f02a206c75a28053 (diff)
KVM: use the new intel iommu APIs
intel iommu APIs are updated, use the new APIs. In addition, change kvm_iommu_map_guest() to just create the domain, let kvm_iommu_assign_device() assign device. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index eafabd5c66b2..c96739b4b7a3 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -330,9 +330,10 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id);
330#ifdef CONFIG_DMAR 330#ifdef CONFIG_DMAR
331int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn, 331int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn,
332 unsigned long npages); 332 unsigned long npages);
333int kvm_iommu_map_guest(struct kvm *kvm, 333int kvm_iommu_map_guest(struct kvm *kvm);
334 struct kvm_assigned_dev_kernel *assigned_dev);
335int kvm_iommu_unmap_guest(struct kvm *kvm); 334int kvm_iommu_unmap_guest(struct kvm *kvm);
335int kvm_assign_device(struct kvm *kvm,
336 struct kvm_assigned_dev_kernel *assigned_dev);
336#else /* CONFIG_DMAR */ 337#else /* CONFIG_DMAR */
337static inline int kvm_iommu_map_pages(struct kvm *kvm, 338static inline int kvm_iommu_map_pages(struct kvm *kvm,
338 gfn_t base_gfn, 339 gfn_t base_gfn,
@@ -341,9 +342,7 @@ static inline int kvm_iommu_map_pages(struct kvm *kvm,
341 return 0; 342 return 0;
342} 343}
343 344
344static inline int kvm_iommu_map_guest(struct kvm *kvm, 345static inline int kvm_iommu_map_guest(struct kvm *kvm)
345 struct kvm_assigned_dev_kernel
346 *assigned_dev)
347{ 346{
348 return -ENODEV; 347 return -ENODEV;
349} 348}
@@ -352,6 +351,12 @@ static inline int kvm_iommu_unmap_guest(struct kvm *kvm)
352{ 351{
353 return 0; 352 return 0;
354} 353}
354
355static inline int kvm_assign_device(struct kvm *kvm,
356 struct kvm_assigned_dev_kernel *assigned_dev)
357{
358 return 0;
359}
355#endif /* CONFIG_DMAR */ 360#endif /* CONFIG_DMAR */
356 361
357static inline void kvm_guest_enter(void) 362static inline void kvm_guest_enter(void)