mirror of
https://github.com/mii443/qemu.git
synced 2025-09-01 14:49:23 +00:00
Add virtio-balloon support
This adds a VirtIO based balloon driver. It uses madvise() to actually balloon the memory when possible. Until 2.6.27, KVM forced memory pinning so we must disable ballooning unless the kernel actually supports it when using KVM. It's always safe when using TCG. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5874 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
@ -1402,7 +1402,9 @@ static void do_info_balloon(void)
|
||||
ram_addr_t actual;
|
||||
|
||||
actual = qemu_balloon_status();
|
||||
if (actual == 0)
|
||||
if (kvm_enabled() && !kvm_has_sync_mmu())
|
||||
term_printf("Using KVM without synchronous MMU, ballooning disabled\n");
|
||||
else if (actual == 0)
|
||||
term_printf("Ballooning not activated in VM\n");
|
||||
else
|
||||
term_printf("balloon: actual=%d\n", (int)(actual >> 20));
|
||||
|
Reference in New Issue
Block a user