diff options
-rw-r--r-- | hw/virtio-balloon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 6d120247fe..f55f7eccb9 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -78,7 +78,8 @@ static void stat_put(QDict *dict, const char *label, uint64_t val) static QObject *get_stats_qobject(VirtIOBalloon *dev) { QDict *dict = qdict_new(); - uint32_t actual = ram_size - (dev->actual << VIRTIO_BALLOON_PFN_SHIFT); + uint64_t actual = ram_size - ((uint64_t) dev->actual << + VIRTIO_BALLOON_PFN_SHIFT); stat_put(dict, "actual", actual); stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]); |