Patchwork Avoid page_set_flags() assert in qemu-user host page protection code

login
register
mail settings
Submitter Juergen Lock
Date March 25, 2010, 9:14 p.m.
Message ID <20100325211421.GA52572@triton8.kn-bremen.de>
Download mbox | patch
Permalink /patch/48603/
State New
Headers show

Comments

Juergen Lock - March 25, 2010, 9:14 p.m.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>

Patch

--- a/exec.c
+++ b/exec.c
@@ -293,10 +293,13 @@  static void page_init(void)
 
                     if (h2g_valid(endaddr)) {
                         endaddr = h2g(endaddr);
+                        page_set_flags(startaddr, endaddr, PAGE_RESERVED);
                     } else {
+#if TARGET_ABI_BITS <= L1_MAP_ADDR_SPACE_BITS
                         endaddr = ~0ul;
+                        page_set_flags(startaddr, endaddr, PAGE_RESERVED);
+#endif
                     }
-                    page_set_flags(startaddr, endaddr, PAGE_RESERVED);
                 }
             } while (!feof(f));