Re: [PATCH 0/1] KVM: x86: using the fpu in interrupt context with a guest's xcr0

2016-03-19 Thread David Matlack
On Tue, Mar 15, 2016 at 8:48 PM, Andy Lutomirski wrote: > > Why is it safe to rely on interrupted_kernel_fpu_idle? That function > is for interrupts, but is there any reason that KVM can't be preempted > (or explicitly schedule) with XCR0 having some funny value? KVM restores the host's xcr0 in

Re: [PATCH 0/1] KVM: x86: using the fpu in interrupt context with a guest's xcr0

2016-03-19 Thread David Matlack
On Tue, Mar 15, 2016 at 8:43 PM, Xiao Guangrong wrote: > > > On 03/16/2016 03:01 AM, David Matlack wrote: >> >> On Mon, Mar 14, 2016 at 12:46 AM, Xiao Guangrong >> wrote: >>> >>> On 03/12/2016 04:47 AM, David Matlack wrote: >>> I have not been able to trigger this bug on Linux 4.3, and suspe

Re: [PATCH 0/1] KVM: x86: using the fpu in interrupt context with a guest's xcr0

2016-03-15 Thread Andy Lutomirski
On Tue, Mar 15, 2016 at 8:43 PM, Xiao Guangrong wrote: > > > On 03/16/2016 03:01 AM, David Matlack wrote: >> >> On Mon, Mar 14, 2016 at 12:46 AM, Xiao Guangrong >> wrote: >>> >>> >>> >>> On 03/12/2016 04:47 AM, David Matlack wrote: >>> I have not been able to trigger this bug on Linux 4.3, a

Re: [PATCH 0/1] KVM: x86: using the fpu in interrupt context with a guest's xcr0

2016-03-15 Thread Xiao Guangrong
On 03/16/2016 03:01 AM, David Matlack wrote: On Mon, Mar 14, 2016 at 12:46 AM, Xiao Guangrong wrote: On 03/12/2016 04:47 AM, David Matlack wrote: I have not been able to trigger this bug on Linux 4.3, and suspect it is due to this commit from Linux 4.2: 653f52c kvm,x86: load guest FPU co

Re: [PATCH 0/1] KVM: x86: using the fpu in interrupt context with a guest's xcr0

2016-03-15 Thread David Matlack
On Mon, Mar 14, 2016 at 12:46 AM, Xiao Guangrong wrote: > > > On 03/12/2016 04:47 AM, David Matlack wrote: > >> I have not been able to trigger this bug on Linux 4.3, and suspect >> it is due to this commit from Linux 4.2: >> >> 653f52c kvm,x86: load guest FPU context more eagerly >> >> With this

Re: [PATCH 0/1] KVM: x86: using the fpu in interrupt context with a guest's xcr0

2016-03-14 Thread Xiao Guangrong
On 03/12/2016 04:47 AM, David Matlack wrote: I have not been able to trigger this bug on Linux 4.3, and suspect it is due to this commit from Linux 4.2: 653f52c kvm,x86: load guest FPU context more eagerly With this commit, as long as the host is using eagerfpu, the guest's fpu is always loa