From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk 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 Message-ID: <20090924235315.GA22772@phenom.dumpdata.com> References: <1253832221-26920-1-git-send-email-konrad.wilk@oracle.com> <1253832221-26920-2-git-send-email-konrad.wilk@oracle.com> <1253832221-26920-3-git-send-email-konrad.wilk@oracle.com> <4ABC02C3.70808@goop.org> <4ABC04D8.6000409@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4ABC04D8.6000409@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.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.