]> rtime.felk.cvut.cz Git - jailhouse.git/commit
x86: Make use of VMCB clean bits
authorValentine Sinitsyn <valentine.sinitsyn@gmail.com>
Tue, 5 Aug 2014 18:51:01 +0000 (00:51 +0600)
committerJan Kiszka <jan.kiszka@siemens.com>
Sat, 1 Nov 2014 19:10:09 +0000 (20:10 +0100)
commitff2601aca749b068c2634ffc9c34909d094d8226
tree910ce56ff9f9d195ff889657061d90147c4202b2
parent23fbc1c217f3525d35f74de8ad1903a87868ae44
x86: Make use of VMCB clean bits

After a cell is created, Jailhouse doesn't change its VMCB much.
This means VMCB Clean Bits (APMv2, Sect. 15.15.1) have a good
potential to reduce a world switch time.

This commit introduces VMCB Clean Bits support in Jailhouse. On each
VM exit, VMCB is marked as clean (unmodified), and each function that
changes guest state in VMCB is responsible for clearing the bit.

This is an optional feature, however it is cheap and harmless even
on CPUs that don't support it. So we use it unconditionally: CPUs
that do not support VMCB State Caching will simply ignore this.

Signed-off-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/include/asm/svm.h
hypervisor/arch/x86/svm.c