lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 May 2009 12:40:39 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	jeremy@...p.org
Cc:	mingo@...e.hu, fujita.tomonori@....ntt.co.jp, x86@...nel.org,
	linux-kernel@...r.kernel.org, xen-devel@...ts.xensource.com,
	ian.campbell@...rix.com, jeremy.fitzhardinge@...rix.com
Subject: Re: [PATCH 5/9] xen: enable swiotlb for xen domain 0.

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

> From: Ian Campbell <ian.campbell@...rix.com>
> 
> Impact: Xen DMA support
> 
> Enable swiotlb when running as a Xen dom0 domain.
> 
> Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
> Cc: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
> ---
>  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@....ntt.co.jp>

I don't like the patch much though.

The x86 dma startup code is complicated and adding another hook makes
it more complicated.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ