diff mbox

[04/39] exec: use accessor function to know if memory is dirty

Message ID 1383743088-8139-5-git-send-email-quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Nov. 6, 2013, 1:04 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Orit Wasserman Nov. 7, 2013, 10 a.m. UTC | #1
On 11/06/2013 03:04 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>   exec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/exec.c b/exec.c
> index 79610ce..7cf5634 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1397,7 +1397,7 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
>       cpu_physical_memory_set_dirty_flags(ram_addr, dirty_flags);
>       /* we remove the notdirty callback only if the code has been
>          flushed */
> -    if (dirty_flags == 0xff) {
> +    if (cpu_physical_memory_is_dirty(ram_addr)) {
>           CPUArchState *env = current_cpu->env_ptr;
>           tlb_set_dirty(env, env->mem_io_vaddr);
>       }
>

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
diff mbox

Patch

diff --git a/exec.c b/exec.c
index 79610ce..7cf5634 100644
--- a/exec.c
+++ b/exec.c
@@ -1397,7 +1397,7 @@  static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
     cpu_physical_memory_set_dirty_flags(ram_addr, dirty_flags);
     /* we remove the notdirty callback only if the code has been
        flushed */
-    if (dirty_flags == 0xff) {
+    if (cpu_physical_memory_is_dirty(ram_addr)) {
         CPUArchState *env = current_cpu->env_ptr;
         tlb_set_dirty(env, env->mem_io_vaddr);
     }