summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-03-27 11:58:02 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-07-11 09:13:58 +0200
commitd40a6898e50c2589ca3d345ef5ca6671e2b35b1a (patch)
tree774afe302d8a79ce59bdc17f8d213e5d4564b9ed /arch/x86/include/asm/kvm_emulate.h
parente24186e097b80c5995ff75e1bbcd541d09c9e42b (diff)
KVM: emulate: protect checks on ctxt->d by a common "if (unlikely())"
There are several checks for "peculiar" aspects of instructions in both x86_decode_insn and x86_emulate_insn. Group them together, and guard them with a single "if" that lets the processor quickly skip them all. Make this more effective by adding two more flag bits that say whether the .intercept and .check_perm fields are valid. We will reuse these flags later to avoid initializing fields of the emulate_ctxt struct. This skims about 30 cycles for each emulated instructions, which is approximately a 3% improvement. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
0 files changed, 0 insertions, 0 deletions