From e0b8d65a972ee9af623635b00f9a2f9e470a890b Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Sat, 3 May 2008 17:51:24 +0000 Subject: [PATCH] Do not attempt to set page flags for pages outside target address space git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4310 c046a42c-6fe2-441c-8c8c-71466251a162 --- exec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exec.c b/exec.c index d9e959d69d..eb3c8abf5d 100644 --- a/exec.c +++ b/exec.c @@ -227,6 +227,10 @@ static void page_init(void) do { n = fscanf (f, "%llx-%llx %*[^\n]\n", &startaddr, &endaddr); if (n == 2) { + startaddr = MIN(startaddr, + (1ULL << TARGET_PHYS_ADDR_SPACE_BITS) - 1); + endaddr = MIN(endaddr, + (1ULL << TARGET_PHYS_ADDR_SPACE_BITS) - 1); page_set_flags(TARGET_PAGE_ALIGN(startaddr), TARGET_PAGE_ALIGN(endaddr), PAGE_RESERVED);