Messages in this thread | | | Date | Thu, 20 Sep 2012 12:50:00 +0300 | From | Avi Kivity <> | Subject | Re: [PATCH 3/6] x86, kvm: use kernel_fpu_begin/end() in kvm_load/put_guest_fpu() |
| |
On 09/20/2012 03:10 AM, Suresh Siddha wrote: > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index b06737d..8ff328b 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -1493,7 +1493,8 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx) > #ifdef CONFIG_X86_64 > wrmsrl(MSR_KERNEL_GS_BASE, vmx->msr_host_kernel_gs_base); > #endif > - if (user_has_fpu()) > + /* Did the host task or the guest vcpu has FPU restored lazily? */ > + if (!use_eager_fpu() && (user_has_fpu() || vmx->vcpu.guest_fpu_loaded)) > clts();
Why do the clts() if guest_fpu_loaded()?
An interrupt might arrive after this, look at TS (interrupted_kernel_fpu_idle()), and stomp on the the guest's fpu.
-- error compiling committee.c: too many arguments to function
| |