All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/xsave: Expose xsave_cntxt_size to avoid reloading xcr0
Date: Wed, 4 Jun 2014 13:39:41 +0100	[thread overview]
Message-ID: <538F138D.4050001@citrix.com> (raw)
In-Reply-To: <538F2DFC0200007800017C1A@mail.emea.novell.com>

On 04/06/14 13:32, Jan Beulich wrote:
>>>> On 04.06.14 at 13:56, <andrew.cooper3@citrix.com> 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

  reply	other threads:[~2014-06-04 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 11:56 [PATCH] x86/xsave: Expose xsave_cntxt_size to avoid reloading xcr0 Andrew Cooper
2014-06-04 12:32 ` Jan Beulich
2014-06-04 12:39   ` Andrew Cooper [this message]
2014-06-04 12:48     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=538F138D.4050001@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.