diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-04-04 08:19:55 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-05 16:10:34 +0200 |
commit | 843408b3cf0a8891b2cbe9e775cc7c6a376fd6c4 (patch) | |
tree | b10fb1477ca53c76951d192aa997afaa438b6d76 /target-i386 | |
parent | f57584dc874f0ba92403b4ade631c232564fb027 (diff) | |
download | qemu-843408b3cf0a8891b2cbe9e775cc7c6a376fd6c4.tar.gz qemu-843408b3cf0a8891b2cbe9e775cc7c6a376fd6c4.tar.bz2 qemu-843408b3cf0a8891b2cbe9e775cc7c6a376fd6c4.zip |
target-i386: fix coding standards in x86_cpu_handle_mmu_fault
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/helper.c | 14 |
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; |