diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2019-04-30 10:36:17 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-04-30 21:56:12 +0200 |
commit | de3cd117ed2f6cb3317212f242a87ffca56c27ac (patch) | |
tree | 975755b3eb28c6b2bf7f8ef6552ec0d6e39cca49 /ipc/util.h | |
parent | 0c55671f84fffe591e8435c93a8c83286fd6b8eb (diff) |
KVM: x86: Omit caching logic for always-available GPRs
Except for RSP and RIP, which are held in VMX's VMCS, GPRs are always
treated "available and dirtly" on both VMX and SVM, i.e. are
unconditionally loaded/saved immediately before/after VM-Enter/VM-Exit.
Eliminating the unnecessary caching code reduces the size of KVM by a
non-trivial amount, much of which comes from the most common code paths.
E.g. on x86_64, kvm_emulate_cpuid() is reduced from 342 to 182 bytes and
kvm_emulate_hypercall() from 1362 to 1143, with the total size of KVM
dropping by ~1000 bytes. With CONFIG_RETPOLINE=y, the numbers are even
more pronounced, e.g.: 353->182, 1418->1172 and well over 2000 bytes.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ipc/util.h')
0 files changed, 0 insertions, 0 deletions