aboutsummaryrefslogtreecommitdiff
path: root/target-i386/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index d10de26934..7b3819b7f2 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -670,8 +670,9 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
is_dirty = is_write && !(pde & PG_DIRTY_MASK);
if (!(pde & PG_ACCESSED_MASK) || is_dirty) {
pde |= PG_ACCESSED_MASK;
- if (is_dirty)
+ if (is_dirty) {
pde |= PG_DIRTY_MASK;
+ }
stl_phys_notdirty(cs->as, pde_addr, pde);
}
/* align to page_size */
@@ -731,8 +732,9 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
is_dirty = is_write && !(pte & PG_DIRTY_MASK);
if (!(pte & PG_ACCESSED_MASK) || is_dirty) {
pte |= PG_ACCESSED_MASK;
- if (is_dirty)
+ if (is_dirty) {
pte |= PG_DIRTY_MASK;
+ }
stl_phys_notdirty(cs->as, pte_addr, pte);
}
page_size = 4096;
@@ -785,12 +787,13 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
is_dirty = is_write && !(pde & PG_DIRTY_MASK);
if (!(pde & PG_ACCESSED_MASK) || is_dirty) {
pde |= PG_ACCESSED_MASK;
- if (is_dirty)
+ if (is_dirty) {
pde |= PG_DIRTY_MASK;
+ }
stl_phys_notdirty(cs->as, pde_addr, pde);
}
- pte = pde & ~( (page_size - 1) & ~0xfff); /* align to page_size */
+ pte = pde & ~((page_size - 1) & ~0xfff); /* align to page_size */
ptep = pte;
virt_addr = addr & ~(page_size - 1);
} else {
@@ -841,8 +844,9 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
is_dirty = is_write && !(pte & PG_DIRTY_MASK);
if (!(pte & PG_ACCESSED_MASK) || is_dirty) {
pte |= PG_ACCESSED_MASK;
- if (is_dirty)
+ if (is_dirty) {
pte |= PG_DIRTY_MASK;
+ }
stl_phys_notdirty(cs->as, pte_addr, pte);
}
page_size = 4096;