]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
[LINUX] Only destroy a machine-contiguous memory region if
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 15 Jun 2006 10:36:57 +0000 (11:36 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 15 Jun 2006 10:36:57 +0000 (11:36 +0100)
it really is contiguous (e.g., create_contiguous did not fail).
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   10353:bd1a0b2bb2d4596227951ad6d36cb4fcc2d00a8e
xen-unstable date:        Thu Jun 15 11:35:23 2006 +0100

linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c

index afae6dbc9c56afe9574d6f7d6298885d043a7c79..353566e7ac5a381155ef10e3332118c5e0021f22 100644 (file)
@@ -365,7 +365,8 @@ void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
                .domid        = DOMID_SELF
        };
 
-       if (xen_feature(XENFEAT_auto_translated_physmap))
+       if (xen_feature(XENFEAT_auto_translated_physmap) ||
+           !test_bit(__pa(vstart) >> PAGE_SHIFT, contiguous_bitmap))
                return;
 
        scrub_pages(vstart, 1 << order);