Commit 777aca2fd3f7edd6329e343f94401afe99919085
1 parent
69e5bc90
fixed dirty bit support for 4M pages (L4 Pistachio fix)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@549 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
target-i386/helper2.c
| ... | ... | @@ -304,7 +304,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr, |
| 304 | 304 | /* if PSE bit is set, then we use a 4MB page */ |
| 305 | 305 | if ((pde & PG_PSE_MASK) && (env->cr[4] & CR4_PSE_MASK)) { |
| 306 | 306 | is_dirty = is_write && !(pde & PG_DIRTY_MASK); |
| 307 | - if (!(pde & PG_ACCESSED_MASK)) { | |
| 307 | + if (!(pde & PG_ACCESSED_MASK) || is_dirty) { | |
| 308 | 308 | pde |= PG_ACCESSED_MASK; |
| 309 | 309 | if (is_dirty) |
| 310 | 310 | pde |= PG_DIRTY_MASK; |
| ... | ... | @@ -363,7 +363,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr, |
| 363 | 363 | prot |= PROT_WRITE; |
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | - | |
| 366 | + | |
| 367 | 367 | do_mapping: |
| 368 | 368 | pte = pte & a20_mask; |
| 369 | 369 | ... | ... |