Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 453dc659 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Linus Torvalds
Browse files

VMware Balloon driver



This is a standalone version of VMware Balloon driver.  Ballooning is a
technique that allows hypervisor dynamically limit the amount of memory
available to the guest (with guest cooperation).  In the overcommit
scenario, when hypervisor set detects that it needs to shuffle some
memory, it instructs the driver to allocate certain number of pages, and
the underlying memory gets returned to the hypervisor.  Later hypervisor
may return memory to the guest by reattaching memory to the pageframes and
instructing the driver to "deflate" balloon.

We are submitting a standalone driver because KVM maintainer (Avi Kivity)
expressed opinion (rightly) that our transport does not fit well into
virtqueue paradigm and thus it does not make much sense to integrate with
virtio.

There were also some concerns whether current ballooning technique is the
right thing.  If there appears a better framework to achieve this we are
prepared to evaluate and switch to using it, but in the meantime we'd like
to get this driver upstream.

We want to get the driver accepted in distributions so that users do not
have to deal with an out-of-tree module and many distributions have
"upstream first" requirement.

The driver has been shipping for a number of years and users running on
VMware platform will have it installed as part of VMware Tools even if it
will not come from a distribution, thus there should not be additional
risk in pulling the driver into mainline.  The driver will only activate
if host is VMware so everyone else should not be affected at all.

Signed-off-by: default avatarDmitry Torokhov <dtor@vmware.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b8af67e2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
 */

#include <linux/dmi.h>
#include <linux/module.h>
#include <asm/div64.h>
#include <asm/vmware.h>
#include <asm/x86_init.h>
@@ -101,6 +102,7 @@ int vmware_platform(void)

	return 0;
}
EXPORT_SYMBOL(vmware_platform);

/*
 * VMware hypervisor takes care of exporting a reliable TSC to the guest.
+16 −0
Original line number Diff line number Diff line
@@ -311,6 +311,22 @@ config TI_DAC7512
	  This driver can also be built as a module. If so, the module
	  will be calles ti_dac7512.

config VMWARE_BALLOON
	tristate "VMware Balloon Driver"
	depends on X86
	help
	  This is VMware physical memory management driver which acts
	  like a "balloon" that can be inflated to reclaim physical pages
	  by reserving them in the guest and invalidating them in the
	  monitor, freeing up the underlying machine pages so they can
	  be allocated to other guests. The balloon can also be deflated
	  to allow the guest to use more physical memory.

	  If unsure, say N.

	  To compile this driver as a module, choose M here: the
	  module will be called vmware_balloon.

source "drivers/misc/c2port/Kconfig"
source "drivers/misc/eeprom/Kconfig"
source "drivers/misc/cb710/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -29,3 +29,4 @@ obj-$(CONFIG_C2PORT) += c2port/
obj-$(CONFIG_IWMC3200TOP)      += iwmc3200top/
obj-y				+= eeprom/
obj-y				+= cb710/
obj-$(CONFIG_VMWARE_BALLOON)	+= vmware_balloon.o
+832 −0

File added.

Preview size limit exceeded, changes collapsed.