From: "Jan Beulich" Subject: Re: Getting the XSAVE size from userspace Date: Thu, 05 Nov 2015 03:51:42 -0700 Message-ID: <563B42CE02000078000B2145@prv-mh.provo.novell.com> References: <563B26E2.3070208@bitdefender.com> <563B40A202000078000B211F@prv-mh.provo.novell.com> <563B343D.4090707@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <563B343D.4090707@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Razvan Cojocaru , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 05.11.15 at 11:49, wrote: > On 05/11/15 10:42, Jan Beulich wrote: >>>>> On 05.11.15 at 10:52, 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. Why would the maximum size not be sufficient for most (all?) user mode purposes? Jan