aboutsummaryrefslogtreecommitdiff
path: root/xen-hvm.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-29 16:17:28 +0200
committerPeter Maydell <peter.maydell@linaro.org>2014-06-11 00:25:06 +0100
commitadf9d70b0dd754b4626fd0ae2b52014060cf7ba4 (patch)
tree5ae9764c9034abc5b16215b64cd8b7a9f9273dd6 /xen-hvm.c
parent6ad3f09bd457275f534810c2fce90fb03305a91a (diff)
downloadqemu-adf9d70b0dd754b4626fd0ae2b52014060cf7ba4.zip
qemu-adf9d70b0dd754b4626fd0ae2b52014060cf7ba4.tar.gz
qemu-adf9d70b0dd754b4626fd0ae2b52014060cf7ba4.tar.bz2
xen: replace ffsl with ctzl
ffsl is a GNU extension and not available in musl libc. See also commit fbeadf50 (bitops: unify bitops_ffsl with the one in host-utils.h, call it bitops_ctzl) on why ctzl should be used instead of ffsl. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> [PMM: rebased to accommodate file rename to xen-hvm.c] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'xen-hvm.c')
-rw-r--r--xen-hvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen-hvm.c b/xen-hvm.c
index a64486c..aac38ef 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -511,7 +511,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
for (i = 0; i < ARRAY_SIZE(bitmap); i++) {
unsigned long map = bitmap[i];
while (map != 0) {
- j = ffsl(map) - 1;
+ j = ctzl(map);
map &= ~(1ul << j);
memory_region_set_dirty(framebuffer,
(i * width + j) * TARGET_PAGE_SIZE,