WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH 2/2] Introduce xen_swiotlb variable that is s

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 2/2] Introduce xen_swiotlb variable that is set when Xen is running.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 24 Sep 2009 19:53:15 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 24 Sep 2009 17:02:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4ABC04D8.6000409@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1253832221-26920-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1253832221-26920-2-git-send-email-konrad.wilk@xxxxxxxxxx> <1253832221-26920-3-git-send-email-konrad.wilk@xxxxxxxxxx> <4ABC02C3.70808@xxxxxxxx> <4ABC04D8.6000409@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
> > 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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel