xen: check for zero sized area when invalidating memory
authorJuergen Gross <jgross@suse.com>
Mon, 12 Jan 2015 05:05:10 +0000 (06:05 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 12 Jan 2015 10:09:55 +0000 (10:09 +0000)
With the introduction of the linear mapped p2m list setting memory
areas to "invalid" had to be delayed. When doing the invalidation
make sure no zero sized areas are processed.

Signed-off-by: Juegren Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
arch/x86/xen/setup.c

index 410210f279bf02eac1344d197f473389f934ca7c..865e56cea7a0abe4d9b6feb2e1d0da27957d47e8 100644 (file)
@@ -160,6 +160,8 @@ void __init xen_inv_extra_mem(void)
        int i;
 
        for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
+               if (!xen_extra_mem[i].size)
+                       continue;
                pfn_s = PFN_DOWN(xen_extra_mem[i].start);
                pfn_e = PFN_UP(xen_extra_mem[i].start + xen_extra_mem[i].size);
                for (pfn = pfn_s; pfn < pfn_e; pfn++)