Skip to content
Snippets Groups Projects
Commit 88c73d16 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Peter Maydell
Browse files

memory: fix usage of find_next_bit and find_next_zero_bit


The last two arguments to these functions are the last and first bit to
check relative to the base.  The code was using incorrectly the first
bit and the number of bits.  Fix this in cpu_physical_memory_get_dirty
and cpu_physical_memory_all_dirty.  This requires a few changes in the
iteration; change the code in cpu_physical_memory_set_dirty_range to
match.

Fixes: 5b82b703
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Tested-by: default avatarLeon Alrae <leon.alrae@imgtec.com>
Tested-by: default avatarThomas Huth <thuth@redhat.com>
Message-id: 1455113505-11237-1-git-send-email-pbonzini@redhat.com
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent c9f19dff
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment