diff options
| author | Anthony Liguori <aliguori@amazon.com> | 2014-01-13 13:20:49 -0800 |
|---|---|---|
| committer | Anthony Liguori <aliguori@amazon.com> | 2014-01-13 13:20:49 -0800 |
| commit | b54f18ba3415c731f0b069f6df56f529997fb74e (patch) | |
| tree | eeb668ba9612f9734594b0b64c8c9ad7ca291371 /cputlb.c | |
| parent | dd089c0a1e928fb80ba8a37983c1b0e9232d1c8b (diff) | |
| parent | aa8dc044772ba156cbcf2174b5673cfa11f566a7 (diff) | |
| download | focaccia-qemu-b54f18ba3415c731f0b069f6df56f529997fb74e.tar.gz focaccia-qemu-b54f18ba3415c731f0b069f6df56f529997fb74e.zip | |
Merge remote-tracking branch 'quintela/tags/migration/20140113' into staging
migration.next for 20140113 # gpg: Signature made Mon 13 Jan 2014 09:38:27 AM PST using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * quintela/tags/migration/20140113: (49 commits) migration: synchronize memory bitmap 64bits at a time ram: split function that synchronizes a range memory: syncronize kvm bitmap using bitmaps operations memory: move bitmap synchronization to its own function kvm: refactor start address calculation kvm: use directly cpu_physical_memory_* api for tracking dirty pages memory: unfold memory_region_test_and_clear() memory: split cpu_physical_memory_* functions to its own include memory: cpu_physical_memory_set_dirty_tracking() should return void memory: make cpu_physical_memory_reset_dirty() take a length parameter memory: s/dirty/clean/ in cpu_physical_memory_is_dirty() memory: cpu_physical_memory_clear_dirty_range() now uses bitmap operations memory: cpu_physical_memory_set_dirty_range() now uses bitmap operations memory: use find_next_bit() to find dirty bits memory: s/mask/clear/ cpu_physical_memory_mask_dirty_range memory: cpu_physical_memory_get_dirty() is used as returning a bool memory: make cpu_physical_memory_get_dirty() the main function memory: unfold cpu_physical_memory_set_dirty_flag() memory: unfold cpu_physical_memory_set_dirty() in its only user memory: unfold cpu_physical_memory_clear_dirty_flag() in its only user ... Message-id: 1389634834-24181-1-git-send-email-quintela@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'cputlb.c')
| -rw-r--r-- | cputlb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cputlb.c b/cputlb.c index 9270055b83..b533f3f372 100644 --- a/cputlb.c +++ b/cputlb.c @@ -26,6 +26,7 @@ #include "exec/cputlb.h" #include "exec/memory-internal.h" +#include "exec/ram_addr.h" //#define DEBUG_TLB //#define DEBUG_TLB_CHECK @@ -112,9 +113,8 @@ void tlb_flush_page(CPUArchState *env, target_ulong addr) can be detected */ void tlb_protect_code(ram_addr_t ram_addr) { - cpu_physical_memory_reset_dirty(ram_addr, - ram_addr + TARGET_PAGE_SIZE, - CODE_DIRTY_FLAG); + cpu_physical_memory_reset_dirty(ram_addr, TARGET_PAGE_SIZE, + DIRTY_MEMORY_CODE); } /* update the TLB so that writes in physical page 'phys_addr' are no longer @@ -122,7 +122,7 @@ void tlb_protect_code(ram_addr_t ram_addr) void tlb_unprotect_code_phys(CPUArchState *env, ram_addr_t ram_addr, target_ulong vaddr) { - cpu_physical_memory_set_dirty_flags(ram_addr, CODE_DIRTY_FLAG); + cpu_physical_memory_set_dirty_flag(ram_addr, DIRTY_MEMORY_CODE); } static bool tlb_is_dirty_ram(CPUTLBEntry *tlbe) @@ -284,7 +284,8 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr, /* Write access calls the I/O callback. */ te->addr_write = address | TLB_MMIO; } else if (memory_region_is_ram(section->mr) - && !cpu_physical_memory_is_dirty(section->mr->ram_addr + xlat)) { + && cpu_physical_memory_is_clean(section->mr->ram_addr + + xlat)) { te->addr_write = address | TLB_NOTDIRTY; } else { te->addr_write = address; |