From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH] libxc: create an initial FPU state for HVM guests Date: Tue, 13 Oct 2015 18:18:57 +0200 Message-ID: <561D2EF1.4090501@citrix.com> References: <1444743155-3469-1-git-send-email-roger.pau@citrix.com> <561D34C602000078000AAA71@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zm2I2-0005W5-SF for xen-devel@lists.xenproject.org; Tue, 13 Oct 2015 16:19:02 +0000 In-Reply-To: <561D34C602000078000AAA71@prv-mh.provo.novell.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: Jan Beulich Cc: Wei Liu , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org El 13/10/15 a les 16.43, Jan Beulich ha escrit: >>>> On 13.10.15 at 15:32, wrote: >> --- a/tools/libxc/xc_dom_x86.c >> +++ b/tools/libxc/xc_dom_x86.c >> @@ -841,6 +841,23 @@ static int vcpu_hvm(struct xc_dom_image *dom) >> struct hvm_save_descriptor end_d; >> HVM_SAVE_TYPE(END) end; >> } bsp_ctx; >> + struct { >> + uint16_t fcw; >> + uint16_t fsw; >> + uint8_t ftw; >> + uint8_t rsvd1; >> + uint16_t fop; >> + union { >> + uint64_t addr; >> + struct { >> + uint32_t offs; >> + uint16_t sel; >> + uint16_t rsvd; >> + }; >> + } fip, fdp; >> + uint32_t mxcsr; >> + uint32_t mxcsr_mask; >> + } *fpu_ctxt; > > I think a comment should be added here that this layout is the 64-bit > one, no matter what bitness the tool stack. Or perhaps leave out all > pieces that you don't need; the ones you care about live at the same > offsets in both 32- and 64-bit variants. The layout of this structure is exactly the same for 32 and 64bits, I'm going to add a comment stating this. Roger.