KVM: SVM: Selective cr0 intercept
authorAvi Kivity <avi@redhat.com>
Wed, 6 Jan 2010 08:55:27 +0000 (10:55 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:35:51 +0000 (12:35 -0300)
commitd225157bc6a442b1214882635fbf287d7d0e8133
treeedea55c1e777faa364c6c379fff136ded71b001f
parent888f9f3e0cfa32baf05b3840f0248f5502292a0f
KVM: SVM: Selective cr0 intercept

If two conditions apply:
 - no bits outside TS and EM differ between the host and guest cr0
 - the fpu is active

then we can activate the selective cr0 write intercept and drop the
unconditional cr0 read and write intercept, and allow the guest to run
with the host fpu state.  This reduces cr0 exits due to guest fpu management
while the guest fpu is loaded.

Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c