diff options
author | Sheng Yang <sheng@linux.intel.com> | 2009-04-27 08:35:43 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:50 -0400 |
commit | 522c68c4416de3cd3e11a9ff10d58e776a69ae1e (patch) | |
tree | 62940e35988f5e2a52df10276882ec64518ee369 /include/linux/kvm_host.h | |
parent | 4b12f0de33a64dfc624b2480f55b674f7fa23ef2 (diff) |
KVM: Enable snooping control for supported hardware
Memory aliases with different memory type is a problem for guest. For the guest
without assigned device, the memory type of guest memory would always been the
same as host(WB); but for the assigned device, some part of memory may be used
as DMA and then set to uncacheable memory type(UC/WC), which would be a conflict of
host memory type then be a potential issue.
Snooping control can guarantee the cache correctness of memory go through the
DMA engine of VT-d.
[avi: fix build on ia64]
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 72d56844f388..bdce8e1303c9 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -367,6 +367,9 @@ void kvm_unregister_irq_ack_notifier(struct kvm_irq_ack_notifier *kian); | |||
367 | int kvm_request_irq_source_id(struct kvm *kvm); | 367 | int kvm_request_irq_source_id(struct kvm *kvm); |
368 | void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); | 368 | void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); |
369 | 369 | ||
370 | /* For vcpu->arch.iommu_flags */ | ||
371 | #define KVM_IOMMU_CACHE_COHERENCY 0x1 | ||
372 | |||
370 | #ifdef CONFIG_IOMMU_API | 373 | #ifdef CONFIG_IOMMU_API |
371 | int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn, | 374 | int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn, |
372 | unsigned long npages); | 375 | unsigned long npages); |