From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv2 2/3] x86/fpu: Add a per-domain field to set the width of FIP/FDP Date: Tue, 23 Feb 2016 11:53:14 +0000 Message-ID: <56CC482A.4000204@citrix.com> References: <1456225539-9162-1-git-send-email-david.vrabel@citrix.com> <1456225539-9162-3-git-send-email-david.vrabel@citrix.com> <56CC3E20.9070105@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYBWs-0004X6-Cr for xen-devel@lists.xenproject.org; Tue, 23 Feb 2016 11:53:22 +0000 In-Reply-To: <56CC3E20.9070105@citrix.com> 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 , David Vrabel , xen-devel@lists.xenproject.org Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org On 23/02/16 11:10, Andrew Cooper wrote: > On 23/02/16 11:05, David Vrabel wrote: >> @@ -653,6 +657,12 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags, >> /* PV/PVH guests get an emulated PIT too for video BIOSes to use. */ >> pit_init(d, cpu_khz); >> >> + /* >> + * If the FPU not to save FCS/FDS then we can always save/restore > > "If the FPU does not" ? > >> @@ -284,7 +284,11 @@ void xsave(struct vcpu *v, uint64_t mask) >> return; >> } >> >> - if ( word_size > 0 && >> + /* >> + * If the FIP/FDP[63:32] are both zero, it is safe to use the >> + * 32-bit restore to also restore the selectors. >> + */ > > This comment is presumably applicable to the fxsave path? Yes. Do you want this comment added there? David