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

Re: [Xen-devel] [V5 2/4] x86/xsaves: enable xsaves/xrstors/xsavec in xen



On Fri, Oct 09, 2015 at 01:13:11AM -0600, Jan Beulich wrote:
> >>> On 09.10.15 at 07:49, <shuai.ruan@xxxxxxxxxxxxxxx> wrote:
> > On Mon, Sep 28, 2015 at 10:03:12AM -0600, Jan Beulich wrote:
> >> >>> On 21.09.15 at 13:33, <shuai.ruan@xxxxxxxxxxxxxxx> wrote:
> >> > @@ -954,8 +975,13 @@ long arch_do_domctl(
> >> >                  v->arch.xcr0_accum = _xcr0_accum;
> >> >                  if ( _xcr0_accum & XSTATE_NONLAZY )
> >> >                      v->arch.nonlazy_xstate_used = 1;
> >> > -                memcpy(v->arch.xsave_area, _xsave_area,
> >> > -                       evc->size - 2 * sizeof(uint64_t));
> >> > +                if ( (cpu_has_xsaves || cpu_has_xsavec) &&
> >> > +                     !xsave_area_compressed(_xsave_area) )
> >> 
> >> Is it intended to support compact input here? Where would such
> >> come from? And if so, don't you need to validate the input (e.g.
> >> being a certain size)?
> >> 
> > It is not intended to support compact input here.Just add some check here 
> > (According to Andrew suggestion).
> 
> I think your reply only refers to the cpu_has_xsavec conditional,
> but the question really was about the construct as a whole.
> 
> Jan
> 
There is no such case that input is compact.
"!xsave_area_compressed(_xsave_area)" here just add some check to ensure
_xsave_area is uncompact. It seem that it cause confusion. If so , I will 
deletesuch check. Is it Ok ?
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
> 

_______________________________________________
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®.