>>> On 15.03.16 at 10:40, <shuai.r...@linux.intel.com> wrote:
>       xrstor() will look as follow:
>       if ( using_xsaves )
>       {
>               if ( unlikely(!(prt->xsave_hdr->xcom_bv &
>                             XSTATE_COMPACTION_ENABLED)) )
>                      ptr->xsave_hdr->xcomp_bv =
>                                   ptr->xsave_hdr->xstate_bv |
>                                   XSTATE_COMPACTION_ENABLED;
>               XRSTORS;
>       }
>       else
>               XRSTOR;

This makes me imply that "using_xsaves" is still a global variable,
set depending on CPU features. That's exactly what I've said
would presumably not be sufficient in code like xrstor(). What
point is there in using XSTORS if the guest never touched XSS?
I would much rather have expected for you to introduce a
flag paralleling v->arch.nonlazy_xstate_used indicating
whether for a particular vCPU XSAVES/XRSTORS really need to be
used (or maybe just looking at xcr0_accum would be sufficient,
and no new flag is needed; in fact I think that flag would also
better go away in favor of just inspecting xcr0_accum).

Jan


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

Reply via email to