Commit e0b8d65a972ee9af623635b00f9a2f9e470a890b
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
exec.c
| @@ -227,6 +227,10 @@ static void page_init(void) | @@ -227,6 +227,10 @@ static void page_init(void) | ||
| 227 | do { | 227 | do { |
| 228 | n = fscanf (f, "%llx-%llx %*[^\n]\n", &startaddr, &endaddr); | 228 | n = fscanf (f, "%llx-%llx %*[^\n]\n", &startaddr, &endaddr); |
| 229 | if (n == 2) { | 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 | page_set_flags(TARGET_PAGE_ALIGN(startaddr), | 234 | page_set_flags(TARGET_PAGE_ALIGN(startaddr), |
| 231 | TARGET_PAGE_ALIGN(endaddr), | 235 | TARGET_PAGE_ALIGN(endaddr), |
| 232 | PAGE_RESERVED); | 236 | PAGE_RESERVED); |