[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [PATCH 2/2] Introduce xen_swiotlb variable that is set when Xen is running.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.