[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V3 5/6] x86/xsaves: support compact format for hvm save/restore



On 11/08/15 09:01, Shuai Ruan wrote:
>
>>> +
>>> +    /*
>>> +     * The FP xstates and SSE xstates are legacy states. They are always
>>> +     * in the fixed offsets in the xsave area in either compacted form
>>> +     * or standard form.
>>> +     */
>>> +    xstate_comp_offsets[0] = 0;
>>> +    xstate_comp_offsets[1] = XSAVE_SSE_OFFSET;
>>> +
>>> +    xstate_comp_offsets[2] = FXSAVE_SIZE + XSAVE_HDR_SIZE;
>>> +
>>> +    for (i = 2; i < xstate_features; i++)
>> This loop will run off the end of xstate_comp_sizes[] for any processor
>> supporting AVX512 or greater.
>>
> For the length of xsate_comp_sizes is 64, I think the case you mentioned
> above will not happen.

xstate_features is a bitmap.  The comparison "i < xstate_features" is
bogus, and loops many more times than you intend.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.