diff options
author | 2014-03-27 11:29:28 +0100 | |
---|---|---|
committer | 2014-07-11 09:13:57 +0200 | |
commit | 6addfc42992be4b073c39137ecfdf4b2aa2d487f (patch) | |
tree | 2251d34fd0234b6195f8e164983a95a30ae031b2 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | KVM: x86: return all bits from get_interrupt_shadow (diff) | |
download | linux-dev-6addfc42992be4b073c39137ecfdf4b2aa2d487f.tar.xz linux-dev-6addfc42992be4b073c39137ecfdf4b2aa2d487f.zip |
KVM: x86: avoid useless set of KVM_REQ_EVENT after emulation
Despite the provisions to emulate up to 130 consecutive instructions, in
practice KVM will emulate just one before exiting handle_invalid_guest_state,
because x86_emulate_instruction always sets KVM_REQ_EVENT.
However, we only need to do this if an interrupt could be injected,
which happens a) if an interrupt shadow bit (STI or MOV SS) has gone
away; b) if the interrupt flag has just been set (other instructions
than STI can set it without enabling an interrupt shadow).
This cuts another 700-900 cycles from the cost of emulating an
instruction (measured on a Sandy Bridge Xeon: 1650-2600 cycles
before the patch on kvm-unit-tests, 925-1700 afterwards).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions