All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: Jan Beulich <JBeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Getting the XSAVE size from userspace
Date: Thu, 5 Nov 2015 10:49:33 +0000	[thread overview]
Message-ID: <563B343D.4090707@citrix.com> (raw)
In-Reply-To: <563B40A202000078000B211F@prv-mh.provo.novell.com>

On 05/11/15 10:42, Jan Beulich wrote:
>>>> On 05.11.15 at 10:52, <rcojocaru@bitdefender.com> wrote:
>> I need to get the XSAVE size from userspace. The easiest way seems to be
>> to use the XEN_DOMCTL_getvcpuextstate hypercall, but that hypercall is
>> not public / there's no xenctrl.h wrapper for it.
> Before going into any detail of the rest of your mail - any reason you
> can't just consult CPUID output?

It depends on precisely what you want.

CPUID.0xD[0].ecx gives you the maximum xsave area on this processor
CPUID.0xD[0].ebx gives you the current size for the value in xcr0, but
that is not very useful from userspace.

~Andrew

  parent reply	other threads:[~2015-11-05 10:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05  9:52 Getting the XSAVE size from userspace Razvan Cojocaru
2015-11-05 10:42 ` Jan Beulich
2015-11-05 10:47   ` Razvan Cojocaru
2015-11-05 10:52     ` Jan Beulich
2015-11-05 10:53     ` Andrew Cooper
2015-11-05 10:49   ` Andrew Cooper [this message]
2015-11-05 10:51     ` Jan Beulich
2015-11-05 11:35       ` Andrei LUTAS
2015-11-05 11:44         ` Andrew Cooper
2015-11-05 12:26           ` Razvan Cojocaru
2015-11-05 14:05             ` Andrew Cooper
2015-11-05 14:13               ` Razvan Cojocaru

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=563B343D.4090707@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=rcojocaru@bitdefender.com \
    --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.