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

Re: [Xen-devel] [PATCH] x86/xsave: Expose xsave_cntxt_size to avoid reloading xcr0



On 04/06/14 13:32, Jan Beulich wrote:
>>>> On 04.06.14 at 13:56, <andrew.cooper3@xxxxxxxxxx> wrote:
>> xstate_ctxt_size(xfeature_mask) is runtime constant after boot.  There is no
>> need to reload xcr0 twice for this basic bounds check.
> Honestly I'm not in favor of exposing this variable for a not
> performance critical code path. If we really care about saving a few
> cycles here, how about having xstate_ctxt_size() check its argument
> against xfeature_mask and return xsave_cntxt_size if equal?
> Admittedly that'll need some extra care for the uses of the function
> in xstate_init(), but it's not horribly difficult to make the current
> function an internal one, and the global one be a wrapper with that
> check done first.
>
> Jan
>

Personally, I think that is less pleasant than exposing
xsave_cntxt_size, but I will see about doing it.

It turns out I also need this value for other correctness fixes
elsewhere in xsave domctl code.

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