]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Add virtio-balloon device
authorSasha Levin <levinsasha928@gmail.com>
Sat, 2 Jul 2011 23:52:08 +0000 (02:52 +0300)
committerPekka Enberg <penberg@kernel.org>
Sat, 2 Jul 2011 10:07:44 +0000 (13:07 +0300)
commit9b3fd459bbdf183e3934d35dff1fe50881587677
tree9b1749cab86ca8ff564516c145aa8087175a6245
parentda243c4105fc0632fc0e861625d5748c702f91a8
kvm tools: Add virtio-balloon device

From the virtio spec:

The virtio memory balloon device is a primitive device for managing guest
memory: the device asks for a certain amount of memory, and the guest supplies
it (or withdraws it, if the device has more than it asks for). This allows the
guest to adapt to changes in allowance of underlying physical memory.

To activate the virtio-balloon device run kvm tools with the '--balloon'
command line parameter.

Current implementation listens for two signals:

 - SIGKVMADDMEM: Adds 1M to the balloon driver (inflate). This will decrease
available memory within the guest.
 - SIGKVMDELMEM: Remove 1M from the balloon driver (deflate). This will
increase available memory within the guest.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/Makefile
tools/kvm/include/kvm/kvm.h
tools/kvm/include/kvm/virtio-balloon.h [new file with mode: 0644]
tools/kvm/include/kvm/virtio-pci-dev.h
tools/kvm/kvm-run.c
tools/kvm/virtio/balloon.c [new file with mode: 0644]