kernel_optimize_test/arch/x86/kvm
Avi Kivity 18863bdd60 KVM: x86 shared msr infrastructure
The various syscall-related MSRs are fairly expensive to switch.  Currently
we switch them on every vcpu preemption, which is far too often:

- if we're switching to a kernel thread (idle task, threaded interrupt,
  kernel-mode virtio server (vhost-net), for example) and back, then
  there's no need to switch those MSRs since kernel threasd won't
  be exiting to userspace.

- if we're switching to another guest running an identical OS, most likely
  those MSRs will have the same value, so there's little point in reloading
  them.

- if we're running the same OS on the guest and host, the MSRs will have
  identical values and reloading is unnecessary.

This patch uses the new user return notifiers to implement last-minute
switching, and checks the msr values to avoid unnecessary reloading.

Signed-off-by: Avi Kivity <avi@redhat.com>
2009-12-03 09:32:21 +02:00
..
emulate.c KVM: x86 emulator: Add pusha and popa instructions 2009-12-03 09:32:09 +02:00
i8254.c KVM: Drop kvm->irq_lock lock from irq injection path 2009-12-03 09:32:08 +02:00
i8254.h KVM: PIT support for HPET legacy mode 2009-09-10 08:33:12 +03:00
i8259.c KVM: Move IO APIC to its own lock 2009-12-03 09:32:08 +02:00
irq.c KVM: Remove irq_pending bitmap 2009-06-10 11:48:57 +03:00
irq.h KVM: Move irq sharing information to irqchip level 2009-12-03 09:32:06 +02:00
Kconfig KVM: x86 shared msr infrastructure 2009-12-03 09:32:21 +02:00
kvm_cache_regs.h KVM: Cache pdptrs 2009-09-10 08:32:46 +03:00
kvm_timer.h KVM: Use pointer to vcpu instead of vcpu_id in timer code. 2009-09-10 08:32:52 +03:00
lapic.c KVM: remove duplicated #include 2009-12-03 09:32:10 +02:00
lapic.h KVM: x2apic interface to lapic 2009-09-10 08:33:08 +03:00
Makefile KVM: Move assigned device code to own file 2009-12-03 09:32:09 +02:00
mmu.c KVM: Don't pass kvm_run arguments 2009-12-03 09:32:06 +02:00
mmu.h KVM: MMU: add kvm_mmu_get_spte_hierarchy helper 2009-09-10 08:32:56 +03:00
mmutrace.h KVM: Trace shadow page lifecycle 2009-09-10 08:33:10 +03:00
paging_tmpl.h KVM: MMU: add SPTE_HOST_WRITEABLE flag to the shadow ptes 2009-10-04 17:04:50 +02:00
svm.c KVM: SVM: init_vmcb(): remove redundant save->cr0 initialization 2009-12-03 09:32:21 +02:00
timer.c KVM: Drop useless atomic test from timer function 2009-09-10 08:32:57 +03:00
trace.h KVM: SVM: Add tracepoint for skinit instruction 2009-12-03 09:32:16 +02:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: VMX: Move MSR_KERNEL_GS_BASE out of the vmx autoload msr area 2009-12-03 09:32:21 +02:00
x86.c KVM: x86 shared msr infrastructure 2009-12-03 09:32:21 +02:00
x86.h KVM: Add Directed EOI support to APIC emulation 2009-09-10 08:33:07 +03:00