Skip to contentSkip to conversation

linux: force proper address translation in USB monitor

PATCH New Jan Beulich 1 participant 1 message Sep 18, 2009 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: force proper address translation in USB monitor

drivers/usb/mon/mon_dma.c +4 -0
@@ -19,7 +19,11 @@
 #if defined(__i386__) || defined(__x86_64__) /* CONFIG_ARCH_I386 doesn't exit */
 #define MON_HAS_UNMAP 1
 
+#ifndef CONFIG_XEN
 #define phys_to_page(phys)	pfn_to_page((phys) >> PAGE_SHIFT)
+#else
+#define phys_to_page(phys)	pfn_to_page(mfn_to_local_pfn((phys) >> PAGE_SHIFT))
+#endif
 
 char mon_dmapeek(unsigned char *dst, dma_addr_t dma_addr, int len)
 {