aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/helper2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-i386/helper2.c b/target-i386/helper2.c
index 2feccc3459..d5c7727cb1 100644
--- a/target-i386/helper2.c
+++ b/target-i386/helper2.c
@@ -304,7 +304,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr,
/* if PSE bit is set, then we use a 4MB page */
if ((pde & PG_PSE_MASK) && (env->cr[4] & CR4_PSE_MASK)) {
is_dirty = is_write && !(pde & PG_DIRTY_MASK);
- if (!(pde & PG_ACCESSED_MASK)) {
+ if (!(pde & PG_ACCESSED_MASK) || is_dirty) {
pde |= PG_ACCESSED_MASK;
if (is_dirty)
pde |= PG_DIRTY_MASK;
@@ -363,7 +363,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr,
prot |= PROT_WRITE;
}
}
-
+
do_mapping:
pte = pte & a20_mask;