]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Lazify fpu activation and deactivation
authorAvi Kivity <avi@redhat.com>
Wed, 30 Dec 2009 10:40:26 +0000 (12:40 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:35:50 +0000 (12:35 -0300)
commit6b1bfe65fa7ea66189f6ecf78890718c57931353
treee7caff282dd9019e1b19cd549609c6b991f29152
parent0d260b008f8bf97e17808e34631fcc541a0191fd
KVM: Lazify fpu activation and deactivation

Defer fpu deactivation as much as possible - if the guest fpu is loaded, keep
it loaded until the next heavyweight exit (where we are forced to unload it).
This reduces unnecessary exits.

We also defer fpu activation on clts; while clts signals the intent to use the
fpu, we can't be sure the guest will actually use it.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h