[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxc: create an initial FPU state for HVM guests



El 13/10/15 a les 16.43, Jan Beulich ha escrit:
>>>> On 13.10.15 at 15:32, <roger.pau@xxxxxxxxxx> 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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.