Re: [Xen-devel] [V4] x86/xsaves: calculate the xstate_comp_offsets base on xstate_bv

2016-03-22 Thread Shuai Ruan
On Wed, Mar 23, 2016 at 09:28:03AM +0800, Shuai Ruan wrote: > On Tue, Mar 22, 2016 at 04:53:02AM -0600, Jan Beulich wrote: > > >>> On 16.03.16 at 13:12, wrote: > > > > Don't you need to use xcomp_bv here? That's what "Extended > > Region of an XSAVE Area" in SDM Vol 1 suggests to me. > > > "OPER

Re: [Xen-devel] [V4] x86/xsaves: calculate the xstate_comp_offsets base on xstate_bv

2016-03-22 Thread Shuai Ruan
On Tue, Mar 22, 2016 at 04:53:02AM -0600, Jan Beulich wrote: > >>> On 16.03.16 at 13:12, wrote: > > Don't you need to use xcomp_bv here? That's what "Extended > Region of an XSAVE Area" in SDM Vol 1 suggests to me. > "OPERATION OF XRSTORS" and "OPERATION OF XSAVES" in SDM Vol1. For xsaves: "Exe

Re: [Xen-devel] [V4] x86/xsaves: calculate the xstate_comp_offsets base on xstate_bv

2016-03-22 Thread Jan Beulich
>>> On 16.03.16 at 13:12, wrote: Please have patch subjects have [PATCH at their beginning. > @@ -111,57 +111,70 @@ static int setup_xstate_features(bool_t bsp) > for ( leaf = 2; leaf < xstate_features; leaf++ ) > { > if ( bsp ) > +{ > cpuid_count(XSTATE_C

[Xen-devel] [V4] x86/xsaves: calculate the xstate_comp_offsets base on xstate_bv

2016-03-19 Thread Shuai Ruan
Previous patch using all available features calculate xstate_comp_offsets. This is wrong.This patch fix this bug by calculating the xstate_comp_offset based on xstate_bv of current guest. Also, the xstate_comp_offset should take alignment into consideration. Signed-off-by: Shuai Ruan Reported-by: