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]
Message-Id: <1242922528-5982-4-git-send-email-ian.campbell@citrix.com>
Date:	Thu, 21 May 2009 17:15:24 +0100
From:	Ian Campbell <ian.campbell@...rix.com>
To:	ian.campbell@...rix.com
Cc:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Becky Bruce <beckyb@...nel.crashing.org>,
	Olaf Kirch <okir@...e.de>, Ingo Molnar <mingo@...e.hu>,
	Greg KH <gregkh@...e.de>,
	xen-devel <xendevel@...ts.xensource.com>,
	x86 maintainers <x86@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] swiotlb/xen: update xen for swiotlb_arch_force_mapping changes

This function is now implemented via a hook in
arch/x86/include/asm/dma-mapping.h rather than as a weak hook in
swiotlb.c

Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
Cc: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Becky Bruce <beckyb@...nel.crashing.org>
Cc: Olaf Kirch <okir@...e.de>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Greg KH <gregkh@...e.de>
Cc: xen-devel <xendevel@...ts.xensource.com>
Cc: x86 maintainers <x86@...nel.org>
Cc: lkml <linux-kernel@...r.kernel.org>
---
 arch/x86/xen/pci-swiotlb.c |    8 --------
 drivers/pci/xen-iommu.c    |    4 +++-
 include/xen/swiotlb.h      |    1 -
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/x86/xen/pci-swiotlb.c b/arch/x86/xen/pci-swiotlb.c
index 5a46418..e23b00b 100644
--- a/arch/x86/xen/pci-swiotlb.c
+++ b/arch/x86/xen/pci-swiotlb.c
@@ -43,11 +43,3 @@ phys_addr_t swiotlb_bus_to_phys(struct device *hwdev, dma_addr_t baddr)
 
 	return baddr;
 }
-
-int swiotlb_arch_range_needs_mapping(phys_addr_t paddr, size_t size)
-{
-	if (xen_pv_domain())
-		return xen_range_needs_mapping(paddr, size);
-
-	return 0;
-}
diff --git a/drivers/pci/xen-iommu.c b/drivers/pci/xen-iommu.c
index 41c276f..f65660a 100644
--- a/drivers/pci/xen-iommu.c
+++ b/drivers/pci/xen-iommu.c
@@ -130,7 +130,7 @@ static int range_straddles_page_boundary(phys_addr_t p, size_t size)
 	return 1;
 }
 
-int xen_range_needs_mapping(phys_addr_t paddr, size_t size)
+static int xen_swiotlb_force_mapping(phys_addr_t paddr, size_t size)
 {
 	return range_straddles_page_boundary(paddr, size);
 }
@@ -324,6 +324,8 @@ void __init xen_iommu_init(void)
 	force_iommu = 0;
 	dma_ops = &xen_dma_ops;
 
+	x86_swiotlb_force_mapping = &xen_swiotlb_force_mapping;
+
 	if (swiotlb) {
 		printk(KERN_INFO "Xen: Enabling DMA fallback to swiotlb\n");
 		dma_ops = &xen_swiotlb_dma_ops;
diff --git a/include/xen/swiotlb.h b/include/xen/swiotlb.h
index 75d1da1..64137fa 100644
--- a/include/xen/swiotlb.h
+++ b/include/xen/swiotlb.h
@@ -4,7 +4,6 @@
 extern void xen_swiotlb_fixup(void *buf, size_t size, unsigned long nslabs);
 extern phys_addr_t xen_bus_to_phys(dma_addr_t daddr);
 extern dma_addr_t xen_phys_to_bus(phys_addr_t paddr);
-extern int xen_range_needs_mapping(phys_addr_t phys, size_t size);
 
 #ifdef CONFIG_PCI_XEN
 extern int xen_wants_swiotlb(void);
-- 
1.5.6.5

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