From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH RFC 2/3] xen/hvm: introduce a fpu_initialised filed to the CPU save record Date: Wed, 14 Oct 2015 17:51:20 +0100 Message-ID: <561E8808.7060009@citrix.com> References: <1444839880-15260-1-git-send-email-roger.pau@citrix.com> <1444839880-15260-3-git-send-email-roger.pau@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 1ZmPGv-0005SL-77 for xen-devel@lists.xenproject.org; Wed, 14 Oct 2015 16:51:25 +0000 In-Reply-To: <1444839880-15260-3-git-send-email-roger.pau@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: Roger Pau Monne , xen-devel@lists.xenproject.org Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org On 14/10/15 17:24, Roger Pau Monne wrote: > Introduce a new filed to signal if the FPU has been initialised or not. Xen "field", I am guessing? > diff --git a/xen/include/public/arch-x86/hvm/save.h b/xen/include/public/arch-x86/hvm/save.h > index c7560f2..c4863be 100644 > --- a/xen/include/public/arch-x86/hvm/save.h > +++ b/xen/include/public/arch-x86/hvm/save.h > @@ -47,7 +47,8 @@ DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header); > /* > * Processor > * > - * Compat: Pre-3.4 didn't have msr_tsc_aux > + * Compat2: Pre-4.7 didn't have fpu_initialised > + * Compat1: Pre-3.4 didn't have msr_tsc_aux I would suggest reversing the Compat1 and 2 lines, to match chronology. > */ > > struct hvm_hw_cpu { > @@ -157,9 +158,121 @@ struct hvm_hw_cpu { > }; > /* error code for pending event */ > uint32_t error_code; > + /* is fpu initialised? */ > + uint8_t fpu_initialised:1; Bitfields can't be used in the public ABI, and please don't leave trailing implicit padding. I would recommend uint32_t flags and specify that bit 0 indicates that fpu context is initialised. ~Andrew