Commit e0b8d65a972ee9af623635b00f9a2f9e470a890b

Authored by blueswir1
1 parent d059c172

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
Showing 1 changed file with 4 additions and 0 deletions
... ... @@ -227,6 +227,10 @@ static void page_init(void)
227 227 do {
228 228 n = fscanf (f, "%llx-%llx %*[^\n]\n", &startaddr, &endaddr);
229 229 if (n == 2) {
  230 + startaddr = MIN(startaddr,
  231 + (1ULL << TARGET_PHYS_ADDR_SPACE_BITS) - 1);
  232 + endaddr = MIN(endaddr,
  233 + (1ULL << TARGET_PHYS_ADDR_SPACE_BITS) - 1);
230 234 page_set_flags(TARGET_PAGE_ALIGN(startaddr),
231 235 TARGET_PAGE_ALIGN(endaddr),
232 236 PAGE_RESERVED);
... ...