aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
authorBen-Ami Yassour <benami@il.ibm.com>2008-09-13 20:48:28 -0400
committerAvi Kivity <avi@redhat.com>2008-10-15 08:25:04 -0400
commit62c476c7c7f25a5b245b9902a935636e6316e58c (patch)
tree6584591c7c345fcbb3c6d437203dc7f4a628573a /include/linux/kvm.h
parent387179464257921eb9aa3d15cc3ff194f6945a7c (diff)
KVM: Device Assignment with VT-d
Based on a patch by: Kay, Allen M <allen.m.kay@intel.com> This patch enables PCI device assignment based on VT-d support. When a device is assigned to the guest, the guest memory is pinned and the mapping is updated in the VT-d IOMMU. [Amit: Expose KVM_CAP_IOMMU so we can check if an IOMMU is present and also control enable/disable from userspace] Signed-off-by: Kay, Allen M <allen.m.kay@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Ben-Ami Yassour <benami@il.ibm.com> Signed-off-by: Amit Shah <amit.shah@qumranet.com> Acked-by: Mark Gross <mgross@linux.intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index ef4bc6f89778..4269be171faf 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -384,6 +384,7 @@ struct kvm_trace_rec {
384#define KVM_CAP_COALESCED_MMIO 15 384#define KVM_CAP_COALESCED_MMIO 15
385#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ 385#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */
386#define KVM_CAP_DEVICE_ASSIGNMENT 17 386#define KVM_CAP_DEVICE_ASSIGNMENT 17
387#define KVM_CAP_IOMMU 18
387 388
388/* 389/*
389 * ioctls for VM fds 390 * ioctls for VM fds
@@ -495,4 +496,6 @@ struct kvm_assigned_irq {
495 __u32 flags; 496 __u32 flags;
496}; 497};
497 498
499#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
500
498#endif 501#endif