x86/vmware: Add steal time clock support for VMware guests
authorAlexey Makhalov <amakhalov@vmware.com>
Mon, 23 Mar 2020 19:57:05 +0000 (19:57 +0000)
committerBorislav Petkov <bp@suse.de>
Tue, 24 Mar 2020 09:04:51 +0000 (10:04 +0100)
commitab02bb3f55f58e7608a88188000c3353398ebe3b
tree803c1a4d98d2aa7bed53aeb53386510e44dd4c53
parentdd735f4707e603ac5b541b5f30de87c3c7bd60dd
x86/vmware: Add steal time clock support for VMware guests

Steal time is the amount of CPU time needed by a guest virtual machine
that is not provided by the host. Steal time occurs when the host
allocates this CPU time elsewhere, for example, to another guest.

Steal time can be enabled by adding the VM configuration option
stealclock.enable = "TRUE". It is supported by VMs that run hardware
version 13 or newer.

Introduce the VMware steal time infrastructure. The high level code
(such as enabling, disabling and hot-plug routines) was derived from KVM.

 [ Tomer: use READ_ONCE macros and 32bit guests support. ]
 [ bp: Massage. ]

Co-developed-by: Tomer Zeltzer <tomerr90@gmail.com>
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
Signed-off-by: Tomer Zeltzer <tomerr90@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200323195707.31242-4-amakhalov@vmware.com
arch/x86/kernel/cpu/vmware.c