summary refs log tree commit diff stats
path: root/util/hbitmap.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-02-08 10:16:59 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-08 10:16:59 +0000
commitb256b89c63c12e902645dd55e7b5362f60574742 (patch)
treef81e2794e18359d956eed6072b2b9375b32fefd2 /util/hbitmap.c
parent1e5caa0e230081b49f8b8399ed30670aa94fdafb (diff)
parent3260cdfffbf00f33923f5f9f6bef45932d7ac28b (diff)
downloadfocaccia-qemu-b256b89c63c12e902645dd55e7b5362f60574742.tar.gz
focaccia-qemu-b256b89c63c12e902645dd55e7b5362f60574742.zip
Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging
# gpg: Signature made Wed 07 Feb 2018 17:00:12 GMT
# gpg:                using RSA key 7DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jnsnow/tags/bitmaps-pull-request:
  hbitmap: fix missing restore count when finish deserialization

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/hbitmap.c')
-rw-r--r--util/hbitmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/hbitmap.c b/util/hbitmap.c
index 289778a55c..58a2c93842 100644
--- a/util/hbitmap.c
+++ b/util/hbitmap.c
@@ -630,6 +630,7 @@ void hbitmap_deserialize_finish(HBitmap *bitmap)
     }
 
     bitmap->levels[0][0] |= 1UL << (BITS_PER_LONG - 1);
+    bitmap->count = hb_count_between(bitmap, 0, bitmap->size - 1);
 }
 
 void hbitmap_free(HBitmap *hb)