All, Attached is a simple patch to slightly rework the logic in range_straddles_page_boundary(). The reason for this is to avoid a crash we are seeing on 32-bit dom0. Basically, the contiguous_bitmap is allocated based on max_low_pfn. However, the swiotlb code can be passed a request (in swiotlb_map_sg) that is > 1 page (I've seen 2 pages), and is also a page (sg->page) > max_low_pfn. If this combination happens, then you get a fatal page fault when doing the test_bit(pfn, contiguous_bitmap). For that reason, rework the logic in range_straddles_page_boundary so that if it gets a request > 1 page, and it's above max_low_pfn, then we force the splitting of the request. In our testing, this seems to fix the issue. Note that the patch is against the RHEL-5 2.6.18 code, but the patch should apply with a little fuzz to the linux-2.6.18-xen.hg tree. Signed-off-by: Chris Lalancette