linux-stable/arch/x86/kvm
Takuya Yoshikawa b5c9ff731f KVM: x86 emulator: Avoid clearing the whole decode_cache
During tracing the emulator, we noticed that init_emulate_ctxt()
sometimes took a bit longer time than we expected.

This patch is for mitigating the problem by some degree.

By looking into the function, we soon notice that it clears the whole
decode_cache whose size is about 2.5K bytes now.  Furthermore, most of
the bytes are taken for the two read_cache arrays, which are used only
by a few instructions.

Considering the fact that we are not assuming the cache arrays have
been cleared when we store actual data, we do not need to clear the
arrays: 2K bytes elimination.  In addition, we can avoid clearing the
fetch_cache and regs arrays.

This patch changes the initialization not to clear the arrays.

On our 64-bit host, init_emulate_ctxt() becomes 0.3 to 0.5us faster with
this patch applied.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-07-12 11:45:09 +03:00
..
emulate.c KVM: fix uninitialized warning 2011-07-12 11:45:06 +03:00
i8254.c KVM: fix typo in copyright notice 2010-10-24 10:53:14 +02:00
i8254.h KVM: remove useless function declaration kvm_inject_pit_timer_irqs() 2011-05-11 07:57:09 -04:00
i8259.c KVM: remove isr_ack logic from PIC 2011-03-17 13:08:30 -03:00
irq.c KVM: fix typo in copyright notice 2010-10-24 10:53:14 +02:00
irq.h KVM: remove useless function declarations from file arch/x86/kvm/irq.h 2011-05-11 07:57:09 -04:00
Kconfig KVM: Halt vcpu if page it tries to access is swapped out 2011-01-12 11:21:39 +02:00
kvm_cache_regs.h KVM: Fetch guest cr3 from hardware on demand 2011-01-12 11:31:16 +02:00
kvm_timer.h KVM: arch/x86/kvm/kvm_timer.h checkpatch cleanup 2010-05-17 12:14:42 +03:00
lapic.c KVM: x86: Remove useless regs_page pointer from kvm_lapic 2011-03-17 13:08:33 -03:00
lapic.h KVM: x86: Remove useless regs_page pointer from kvm_lapic 2011-03-17 13:08:33 -03:00
Makefile KVM: x86: Makefile clean up 2011-01-12 11:29:08 +02:00
mmu.c KVM: MMU: cleanup for dropping parent pte 2011-07-12 11:45:07 +03:00
mmu.h KVM: MMU: Don't track nested fault info in error-code 2010-10-24 10:52:55 +02:00
mmu_audit.c KVM: MMU: audit: allow audit more guests at the same time 2011-01-12 11:31:17 +02:00
mmutrace.h KVM: MMU: support disable/enable mmu audit dynamicly 2010-10-24 10:51:56 +02:00
paging_tmpl.h KVM: MMU: Fix build warnings in walk_addr_generic() 2011-06-19 19:23:13 +03:00
svm.c KVM: SVM: Make dump_vmcb static, reduce text 2011-05-22 08:40:00 -04:00
timer.c x86: Fix common misspellings 2011-03-18 10:39:30 +01:00
trace.h tracing: Fix event alignment: kvm:kvm_hv_hypercall 2011-03-10 10:34:24 -05:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: VMX: Keep list of loaded VMCSs, instead of vcpus 2011-07-12 11:45:08 +03:00
x86.c KVM: x86 emulator: Avoid clearing the whole decode_cache 2011-07-12 11:45:09 +03:00
x86.h KVM: fix push of wrong eip when doing softint 2011-05-11 07:57:09 -04:00