summaryrefslogtreecommitdiffstats
path: root/virt/kvm/iommu.c
Commit message (Collapse)AuthorAgeFilesLines
* KVM: enable PCI multiple-segments for pass-through deviceZhai, Edwin2010-03-011-3/+6
| | | | | | | | | Enable optional parameter (default 0) - PCI segment (or domain) besides BDF, when assigning PCI device to guest. Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: introduce kvm->srcu and convert kvm_set_memory_region to SRCU updateMarcelo Tosatti2010-03-011-2/+2
| | | | | | | | | | Use two steps for memslot deletion: mark the slot invalid (which stops instantiation of new shadow pages for that slot, but allows destruction), then instantiate the new empty slot. Also simplifies kvm_handle_hva locking. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: use gfn_to_pfn_memslot in kvm_iommu_map_pagesMarcelo Tosatti2010-03-011-7/+6Star
| | | | | | | So its possible to iommu map a memslot before making it visible to kvm. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: modify memslots layout in struct kvmMarcelo Tosatti2010-03-011-6/+12
| | | | | | | | | Have a pointer to an allocated region inside struct kvm. [alex: fix ppc book 3s] Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* KVM: Enable snooping control for supported hardwareSheng Yang2009-06-101-3/+24
| | | | | | | | | | | | | | | | 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>
* KVM: Fix assigned devices circular locking dependencyMark McLoughlin2009-02-151-4/+2Star
| | | | | | | | | | | kvm->slots_lock is outer to kvm->lock, so take slots_lock in kvm_vm_ioctl_assign_device() before taking kvm->lock, rather than taking it in kvm_iommu_map_memslots(). Cc: stable@kernel.org Signed-off-by: Mark McLoughlin <markmc@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* kvm/iommu: fix compile warningJoerg Roedel2009-01-031-1/+1
| | | | | | | This fixes a compile warning about a variable thats maybe used uninitialized in the function. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* KVM: change KVM to use IOMMU APIJoerg Roedel2009-01-031-24/+21Star
| | | | Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* KVM: rename vtd.c to iommu.cJoerg Roedel2009-01-031-0/+217
Impact: file renamed The code in the vtd.c file can be reused for other IOMMUs as well. So rename it to make it clear that it handle more than VT-d. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>