public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device()
       [not found] <1276341702-16540-1-git-send-email-sheng@linux.intel.com>
@ 2010-06-17 10:10 ` Sheng Yang
  2010-06-17 10:21   ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yang @ 2010-06-17 10:10 UTC (permalink / raw)
  To: David Woodhouse, kvm; +Cc: iommu, Tom Lyon

On Saturday 12 June 2010 19:21:42 Sheng Yang wrote:
> Commit a99c47a2 "intel-iommu: errors with smaller iommu widths" replace the
> dmar_domain->pgd with the first entry of page table when iommu's supported
> width is smaller than dmar_domain's. But it use physical address directly
> for new dmar_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

> 
> Reported-by: Allen Kay <allen.m.kay@intel.com>
> Cc: Tom Lyon <pugs@cisco.com>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> ---
>  drivers/pci/intel-iommu.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
> index 796828f..3bd3055 100644
> --- a/drivers/pci/intel-iommu.c
> +++ b/drivers/pci/intel-iommu.c
> @@ -3603,7 +3603,8 @@ static int intel_iommu_attach_device(struct
> iommu_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--;
>  	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device()
  2010-06-17 10:10 ` [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device() Sheng Yang
@ 2010-06-17 10:21   ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2010-06-17 10:21 UTC (permalink / raw)
  To: Sheng Yang; +Cc: kvm, iommu, Tom Lyon

On Thu, 2010-06-17 at 18:10 +0800, Sheng Yang wrote:
> 
> BTW: I think this need to be queued for 2.6.35-rc as well.

I sent Linus the pull request yesterday.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-17 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1276341702-16540-1-git-send-email-sheng@linux.intel.com>
2010-06-17 10:10 ` [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device() Sheng Yang
2010-06-17 10:21   ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox