diff options
Diffstat (limited to 'virt/kvm/vtd.c')
-rw-r--r-- | virt/kvm/vtd.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/virt/kvm/vtd.c b/virt/kvm/vtd.c index 174ea1f8cee5..d46de9af838b 100644 --- a/virt/kvm/vtd.c +++ b/virt/kvm/vtd.c | |||
@@ -205,22 +205,12 @@ static int kvm_iommu_unmap_memslots(struct kvm *kvm) | |||
205 | 205 | ||
206 | int kvm_iommu_unmap_guest(struct kvm *kvm) | 206 | int kvm_iommu_unmap_guest(struct kvm *kvm) |
207 | { | 207 | { |
208 | struct kvm_assigned_dev_kernel *entry; | ||
209 | struct dmar_domain *domain = kvm->arch.intel_iommu_domain; | 208 | struct dmar_domain *domain = kvm->arch.intel_iommu_domain; |
210 | 209 | ||
211 | /* check if iommu exists and in use */ | 210 | /* check if iommu exists and in use */ |
212 | if (!domain) | 211 | if (!domain) |
213 | return 0; | 212 | return 0; |
214 | 213 | ||
215 | list_for_each_entry(entry, &kvm->arch.assigned_dev_head, list) { | ||
216 | printk(KERN_DEBUG "VT-d unmap: host bdf = %x:%x:%x\n", | ||
217 | entry->host_busnr, | ||
218 | PCI_SLOT(entry->host_devfn), | ||
219 | PCI_FUNC(entry->host_devfn)); | ||
220 | |||
221 | /* detach kvm dmar domain */ | ||
222 | intel_iommu_detach_device(domain, entry->dev); | ||
223 | } | ||
224 | kvm_iommu_unmap_memslots(kvm); | 214 | kvm_iommu_unmap_memslots(kvm); |
225 | intel_iommu_free_domain(domain); | 215 | intel_iommu_free_domain(domain); |
226 | return 0; | 216 | return 0; |