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

[Xen-devel] Re: [PATCH 5/9] xen: enable swiotlb for xen domain 0.



On Thu,  7 May 2009 17:17:18 -0700
Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:

> From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> 
> Impact: Xen DMA support
> 
> Enable swiotlb when running as a Xen dom0 domain.
> 
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> Cc: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
> ---
>  arch/x86/kernel/pci-swiotlb.c |    5 +++++
>  arch/x86/xen/Kconfig          |    1 +
>  drivers/pci/xen-iommu.c       |    5 +++++
>  include/xen/swiotlb.h         |    9 +++++++++
>  4 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
> index 861c869..2d8dd35 100644
> --- a/arch/x86/kernel/pci-swiotlb.c
> +++ b/arch/x86/kernel/pci-swiotlb.c
> @@ -11,6 +11,8 @@
>  #include <asm/swiotlb.h>
>  #include <asm/dma.h>
>  
> +#include <xen/swiotlb.h>
> +
>  int swiotlb __read_mostly;
>  
>  static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
> @@ -49,6 +51,9 @@ void __init pci_swiotlb_init(void)
>       if (!iommu_detected && !no_iommu && max_pfn > MAX_DMA32_PFN)
>              swiotlb = 1;
>  #endif
> +     if (xen_wants_swiotlb())
> +             swiotlb = 1;
> +
>       if (swiotlb_force)
>               swiotlb = 1;
>       if (swiotlb) {

Acked-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>

I don't like the patch much though.

The x86 dma startup code is complicated and adding another hook makes
it more complicated.

_______________________________________________
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®.