intel-iommu: Fix reference by physical address in intel_iommu_attach_device()
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · On Saturday 12 June 2010 19:21:42 Sheng Yang wrote:
Commit
a99c47a2"intel-iommu: errors with smaller iommu widths" replace thedmar_domain->pgdwith the first entry of page table when iommu's supported width is smaller than dmar_domain's. But it use physical address directly for newdmar_domain->pgd...This result in KVM oops with VT-d on some machines.
BTW: I think this need to be queued for 2.6.35-rc as well.
--
regards
Yang, Sheng
Quoted 22 lines
Reported-by Allen Kay <[email protected]>Cc Tom Lyon <[email protected]>Signed-off-by Sheng Yang <[email protected]>--- drivers/pci/intel-iommu.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/pci/intel-iommu.c +2
-1@@ -3603,7 +3603,8 @@ static int intel_iommu_attach_device(structiommu_domain *domain, pte = dmar_domain->pgd;if (dma_pte_present (pte)) {free_pgtable_page (dmar_domain->pgd); - dmar_domain->pgd = (struct dma_pte *)dma_pte_addr (pte); + dmar_domain->pgd = (struct dma_pte *) +phys_to_virt (dma_pte_addr (pte)); } dmar_domain->agaw--; }
Quoted 2 lines · Sheng Yang
BTW: I think this need to be queued for 2.6.35-rc as well.
I sent Linus the pull request yesterday.
Signature · 2 lines
David Woodhouse Open Source Technology Centre [email protected] Intel Corporation