summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tsc_msr.c
diff options
context:
space:
mode:
authorRik van Riel2015-04-23 17:52:37 +0200
committerPaolo Bonzini2015-05-07 11:29:45 +0200
commit653f52c316a49c5ee2701bc13b15879f20790662 (patch)
tree2e939ee44f04a4bd39f009f0a91c9a536b116b71 /arch/x86/kernel/tsc_msr.c
parentkvm: x86: Deliver MSI IRQ to only lowest prio cpu if msi_redir_hint is true (diff)
downloadkernel-qcow2-linux-653f52c316a49c5ee2701bc13b15879f20790662.tar.gz
kernel-qcow2-linux-653f52c316a49c5ee2701bc13b15879f20790662.tar.xz
kernel-qcow2-linux-653f52c316a49c5ee2701bc13b15879f20790662.zip
kvm,x86: load guest FPU context more eagerly
Currently KVM will clear the FPU bits in CR0.TS in the VMCS, and trap to re-load them every time the guest accesses the FPU after a switch back into the guest from the host. This patch copies the x86 task switch semantics for FPU loading, with the FPU loaded eagerly after first use if the system uses eager fpu mode, or if the guest uses the FPU frequently. In the latter case, after loading the FPU for 255 times, the fpu_counter will roll over, and we will revert to loading the FPU on demand, until it has been established that the guest is still actively using the FPU. This mirrors the x86 task switch policy, which seems to work. Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kernel/tsc_msr.c')
0 files changed, 0 insertions, 0 deletions