All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: Re: [PATCH 2/2] Introduce xen_swiotlb variable that is set when Xen is running.
Date: Thu, 24 Sep 2009 19:53:15 -0400	[thread overview]
Message-ID: <20090924235315.GA22772@phenom.dumpdata.com> (raw)
In-Reply-To: <4ABC04D8.6000409@goop.org>

> > This doesn't apply to the xen/dom0/swiotlb-new branch.
> >   
> 
> OK, its against xen/master.

Do you want me to send patches against the swiotlb-new branch instead in the future?

> 
> >>  	       swiotlb = 1;
> >>  #endif
> >> -	if (swiotlb_force)
> >> +	if (swiotlb_force || !xen_swiotlb)
> >>   
> >>     
> > Are you sure this is right?  This will always enable swiotlb if
> > !xen_swiotlb.

That is wrong. Thanks for spotting that.
> >   
> 
> I went with this instead:
> 
> diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
> index 9640e17..e2d739e 100644
> --- a/arch/x86/kernel/pci-swiotlb.c
> +++ b/arch/x86/kernel/pci-swiotlb.c
> @@ -45,6 +45,9 @@ static struct dma_map_ops swiotlb_dma_ops = {
>  void __init pci_swiotlb_init(void)
>  {
>  	/* don't initialize swiotlb if iommu=off (no_iommu=1) */
> +	if (xen_swiotlb)
> +		return;
> +
>  #ifdef CONFIG_X86_64
>  	if (!iommu_detected && !no_iommu && max_pfn > MAX_DMA32_PFN)
>  	       swiotlb = 1;
> 
> Does that work?

Yes. That will do it.

  reply	other threads:[~2009-09-24 23:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 22:43 [PATCH PV_OPS] IOMMU interaction fixes Konrad Rzeszutek Wilk
2009-09-24 22:43 ` [PATCH 1/2] Revert "xen/swiotlb: make sure GART iommu doesn't initialize if we want Xen swiotlb" Konrad Rzeszutek Wilk
2009-09-24 22:43   ` [PATCH 2/2] Introduce xen_swiotlb variable that is set when Xen is running Konrad Rzeszutek Wilk
2009-09-24 23:37     ` Jeremy Fitzhardinge
2009-09-24 23:46       ` Jeremy Fitzhardinge
2009-09-24 23:53         ` Konrad Rzeszutek Wilk [this message]
2009-09-25  0:11           ` Jeremy Fitzhardinge

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=20090924235315.GA22772@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.