KVM: use gfn_to_pfn_memslot in kvm_iommu_map_pages

So its possible to iommu map a memslot before making it visible to
kvm.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Marcelo Tosatti
2009-12-23 14:35:20 -02:00
parent 506f0d6f9c
commit 3ad26d8139
3 changed files with 8 additions and 10 deletions

View File

@@ -684,7 +684,7 @@ skip_lpage:
spin_unlock(&kvm->mmu_lock);
#ifdef CONFIG_DMAR
/* map the pages in iommu page table */
r = kvm_iommu_map_pages(kvm, base_gfn, npages);
r = kvm_iommu_map_pages(kvm, memslot);
if (r)
goto out;
#endif