public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: David Woodhouse <dwmw2@infradead.org>, kvm@vger.kernel.org
Cc: iommu@lists.linux-foundation.org, Tom Lyon <pugs@cisco.com>
Subject: Re: [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device()
Date: Thu, 17 Jun 2010 18:10:45 +0800	[thread overview]
Message-ID: <201006171810.45403.sheng@linux.intel.com> (raw)
In-Reply-To: <1276341702-16540-1-git-send-email-sheng@linux.intel.com>

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--;
>  	}

       reply	other threads:[~2010-06-17 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1276341702-16540-1-git-send-email-sheng@linux.intel.com>
2010-06-17 10:10 ` Sheng Yang [this message]
2010-06-17 10:21   ` [PATCH] intel-iommu: Fix reference by physical address in intel_iommu_attach_device() David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201006171810.45403.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=kvm@vger.kernel.org \
    --cc=pugs@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox