Re: [PATCH 1/1] KVM: don't allow irq_fpu_usable when the VCPU's XCR0 is loaded

2016-03-19 Thread Paolo Bonzini
On 16/03/2016 04:55, Xiao Guangrong wrote: > > Probably not. AFAICT KVM does not rely on it being loaded outside that > region. xsetbv isn't insanely expensive, is it? Maybe to minimize the > time spent with interrupts disabled it was put outside. > > I do like that your s

Re: [PATCH 1/1] KVM: don't allow irq_fpu_usable when the VCPU's XCR0 is loaded

2016-03-15 Thread Xiao Guangrong
On 03/16/2016 03:32 AM, Paolo Bonzini wrote: On 15/03/2016 19:27, Andy Lutomirski wrote: On Mon, Mar 14, 2016 at 6:17 AM, Paolo Bonzini wrote: On 11/03/2016 22:33, David Matlack wrote: Is this better than just always keeping the host's XCR0 loaded outside if the KVM interrupts-disabled

Re: [PATCH 1/1] KVM: don't allow irq_fpu_usable when the VCPU's XCR0 is loaded

2016-03-15 Thread Paolo Bonzini
On 15/03/2016 19:27, Andy Lutomirski wrote: > On Mon, Mar 14, 2016 at 6:17 AM, Paolo Bonzini wrote: >> >> >> On 11/03/2016 22:33, David Matlack wrote: Is this better than just always keeping the host's XCR0 loaded outside if the KVM interrupts-disabled region? >>> >>> Probably not. AFA

Re: [PATCH 1/1] KVM: don't allow irq_fpu_usable when the VCPU's XCR0 is loaded

2016-03-15 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 6:17 AM, Paolo Bonzini wrote: > > > On 11/03/2016 22:33, David Matlack wrote: >> > Is this better than just always keeping the host's XCR0 loaded outside >> > if the KVM interrupts-disabled region? >> >> Probably not. AFAICT KVM does not rely on it being loaded outside that

Re: [PATCH 1/1] KVM: don't allow irq_fpu_usable when the VCPU's XCR0 is loaded

2016-03-14 Thread Paolo Bonzini
On 11/03/2016 22:33, David Matlack wrote: > > Is this better than just always keeping the host's XCR0 loaded outside > > if the KVM interrupts-disabled region? > > Probably not. AFAICT KVM does not rely on it being loaded outside that > region. xsetbv isn't insanely expensive, is it? Maybe to mi

Re: [PATCH 1/1] KVM: don't allow irq_fpu_usable when the VCPU's XCR0 is loaded

2016-03-11 Thread David Matlack
On Fri, Mar 11, 2016 at 1:14 PM, Andy Lutomirski wrote: > > On Fri, Mar 11, 2016 at 12:47 PM, David Matlack wrote: > > From: Eric Northup > > > > Add a percpu boolean, tracking whether a KVM vCPU is running on the > > host CPU. KVM will set and clear it as it loads/unloads guest XCR0. > > (Note

Re: [PATCH 1/1] KVM: don't allow irq_fpu_usable when the VCPU's XCR0 is loaded

2016-03-11 Thread Andy Lutomirski
On Fri, Mar 11, 2016 at 12:47 PM, David Matlack wrote: > From: Eric Northup > > Add a percpu boolean, tracking whether a KVM vCPU is running on the > host CPU. KVM will set and clear it as it loads/unloads guest XCR0. > (Note that the rest of the guest FPU load/restore is safe, because > kvm_loa