Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Paolo Bonzini
Il 08/09/2013 13:40, Gleb Natapov ha scritto: On Thu, Sep 05, 2013 at 03:06:21PM +0200, Paolo Bonzini wrote: On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv, and not restore anything. XRSTOR restores FP/SSE state to reset state if no bits are set in xstate_bv. This is what

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: Il 08/09/2013 13:40, Gleb Natapov ha scritto: On Thu, Sep 05, 2013 at 03:06:21PM +0200, Paolo Bonzini wrote: On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv, and not restore anything. XRSTOR restores FP/SSE

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Paolo Bonzini
Il 09/09/2013 11:03, Gleb Natapov ha scritto: On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: Il 08/09/2013 13:40, Gleb Natapov ha scritto: On Thu, Sep 05, 2013 at 03:06:21PM +0200, Paolo Bonzini wrote: On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv, and not

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 11:53:45AM +0200, Paolo Bonzini wrote: Il 09/09/2013 11:03, Gleb Natapov ha scritto: On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: Il 08/09/2013 13:40, Gleb Natapov ha scritto: On Thu, Sep 05, 2013 at 03:06:21PM +0200, Paolo Bonzini wrote: On KVM,

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 01:54:50PM +0300, Gleb Natapov wrote: On Mon, Sep 09, 2013 at 11:53:45AM +0200, Paolo Bonzini wrote: Il 09/09/2013 11:03, Gleb Natapov ha scritto: On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: Il 08/09/2013 13:40, Gleb Natapov ha scritto: On

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Paolo Bonzini
Il 09/09/2013 12:54, Gleb Natapov ha scritto: On Mon, Sep 09, 2013 at 11:53:45AM +0200, Paolo Bonzini wrote: Il 09/09/2013 11:03, Gleb Natapov ha scritto: On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: Il 08/09/2013 13:40, Gleb Natapov ha scritto: On Thu, Sep 05, 2013 at

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 01:07:37PM +0200, Paolo Bonzini wrote: In fact, another bug is that kvm_vcpu_ioctl_x86_set_xsave ignores xstate_bv when XSAVE is not available. Instead, it should reset the FXSAVE data to processor-reset values (except for MXCSR which always comes from XRSTOR

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Paolo Bonzini
Il 09/09/2013 13:28, Gleb Natapov ha scritto: On an XSAVE host, when the guest FPU state is loaded KVM will do an XRSTOR. The XRSTOR will restore the FPU state to default values. On a non-XSAVE host, when the guest FPU state is loaded KVM will do an FXRSTR. The FXRSTR will load the FPU

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 01:46:49PM +0200, Paolo Bonzini wrote: Yes. QEMU unmarshals information from the XSAVE region and back, so it cannot support MPX or AVX-512 yet (even if KVM were). Separate bug, though. IMO this is the main issue here, not separate bug. If we gonna let guest

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-08 Thread Gleb Natapov
On Thu, Sep 05, 2013 at 03:06:21PM +0200, Paolo Bonzini wrote: On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv, and not restore anything. XRSTOR restores FP/SSE state to reset state if no bits are set in xstate_bv. This is what should happen on reset, no? Since FP and SSE data