KVM: vmx: shadow more fields that are read/written on every vmexits
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Dec 2017 10:05:19 +0000 (11:05 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 16 Jan 2018 15:49:44 +0000 (16:49 +0100)
commitc5d167b27e00026711ad19a33a23d5d3d562148a
tree026242e43ca576be955da3837b31dcac35b24269
parent7cd918047a8bcb29501e6130e0e7eca98c78fe4d
KVM: vmx: shadow more fields that are read/written on every vmexits

Compared to when VMCS shadowing was added to KVM, we are reading/writing
a few more fields: the PML index, the interrupt status and the preemption
timer value.  The first two are because we are exposing more features
to nested guests, the preemption timer is simply because we have grown
a new optimization.  Adding them to the shadow VMCS field lists reduces
the cost of a vmexit by about 1000 clock cycles for each field that exists
on bare metal.

On the other hand, the guest BNDCFGS and TSC offset are not written on
fast paths, so remove them.

Suggested-by: Jim Mattson <jmattson@google.com>
Cc: Jim Mattson <jmattson@google.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c