diff options
author | Adam Litke | 2010-03-25 14:58:17 +0100 |
---|---|---|
committer | Aurelien Jarno | 2010-03-27 13:53:34 +0100 |
commit | bd12ff9df78b0d04059a35c4a9d0a9337eb4999e (patch) | |
tree | 299225978d6c3bdf0ed6ce20580693e8d85deefd /vnc.h | |
parent | json-parser: Output the content of invalid keyword (diff) | |
download | qemu-bd12ff9df78b0d04059a35c4a9d0a9337eb4999e.tar.gz qemu-bd12ff9df78b0d04059a35c4a9d0a9337eb4999e.tar.xz qemu-bd12ff9df78b0d04059a35c4a9d0a9337eb4999e.zip |
balloon: Fix overflow when reporting actual memory size
Beginning with its introduction, the virtio balloon has had an overflow error
that causes 'info balloon' to misreport the actual memory size when the balloon
itself becomes larger than 4G. Use a cast when converting dev->actual from
pages to kB to prevent overflows.
Before:
(qemu) info balloon
balloon: actual=5120
(qemu) balloon 1025
(qemu) info balloon
balloon: actual=1025
(qemu) balloon 1024
(qemu) info balloon
balloon: actual=5120
After:
(qemu) info balloon
balloon: actual=5120
(qemu) balloon 1025
(qemu) info balloon
balloon: actual=1025
(qemu) balloon 1024
(qemu) info balloon
balloon: actual=1024
Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'vnc.h')
0 files changed, 0 insertions, 0 deletions