|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 5/9] xen: enable swiotlb for xen domain 0.
To: |
jeremy@xxxxxxxx |
Subject: |
[Xen-devel] Re: [PATCH 5/9] xen: enable swiotlb for xen domain 0. |
From: |
FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> |
Date: |
Mon, 11 May 2009 12:40:39 +0900 |
Cc: |
xen-devel@xxxxxxxxxxxxxxxxxxx, ian.campbell@xxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, fujita.tomonori@xxxxxxxxxxxxx, jeremy.fitzhardinge@xxxxxxxxxx, mingo@xxxxxxx |
Delivery-date: |
Mon, 11 May 2009 06:49:42 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<1241741842-7966-6-git-send-email-jeremy@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: |
<1241741842-7966-1-git-send-email-jeremy@xxxxxxxx> <1241741842-7966-6-git-send-email-jeremy@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
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
|
|
|
|
|