KVM: x86 emulator: add get_cached_segment_base() callback to x86_emulate_ops
authorGleb Natapov <gleb@redhat.com>
Wed, 28 Apr 2010 16:15:29 +0000 (19:15 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:35:31 +0000 (10:35 +0300)
commit5951c4423724759906b10a26aa6a8817c4afa615
tree552b885e950cf61e841534cbefd0231f9ad0992d
parent3fb1b5dbd397d16a855c97c3fb80fe6e9196ce7c
KVM: x86 emulator: add get_cached_segment_base() callback to x86_emulate_ops

On VMX it is expensive to call get_cached_descriptor() just to get segment
base since multiple vmcs_reads are done instead of only one. Introduce
new call back get_cached_segment_base() for efficiency.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_emulate.h
arch/x86/kvm/emulate.c
arch/x86/kvm/x86.c