summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-05-06 15:05:25 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-07-11 11:14:02 +0400
commit5cfc7e0f5e5e1adf998df94f8e36edaf5d30d38e (patch)
tree1eed7b31552a97a9c33b0e7a310e08009bfca227 /arch/x86/kvm/lapic.h
parent285ca9e948fa047e51fe47082528034de5369e8d (diff)
downloadlinux-5cfc7e0f5e5e1adf998df94f8e36edaf5d30d38e.tar.xz
KVM: emulate: avoid repeated calls to do_insn_fetch_bytes
do_insn_fetch_bytes will only be called once in a given insn_fetch and insn_fetch_arr, because in fact it will only be called at most twice for any instruction and the first call is explicit in x86_decode_insn. This observation lets us hoist the call out of the memory copying loop. It does not buy performance, because most fetches are one byte long anyway, but it prepares for the next patch. The overflow check is tricky, but correct. Because do_insn_fetch_bytes has already been called once, we know that fc->end is at least 15. So it is okay to subtract the number of bytes we want to read. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
0 files changed, 0 insertions, 0 deletions