|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv3 2/3] x86/fpu: Add a per-domain field to set the width of FIP/FDP
>>> On 25.02.16 at 12:38, <david.vrabel@xxxxxxxxxx> wrote:
> On 25/02/16 11:24, Jan Beulich wrote:
>>>>> On 25.02.16 at 11:58, <david.vrabel@xxxxxxxxxx> wrote:
>>> @@ -261,7 +261,15 @@ void xsave(struct vcpu *v, uint64_t mask)
>>> "=m" (*ptr), \
>>> "a" (lmask), "d" (hmask), "D" (ptr))
>>>
>>> - if ( word_size <= 0 || !is_pv_32bit_vcpu(v) )
>>> + if ( fip_width == 8 )
>>> + {
>>> + XSAVE("0x48,");
>>> + }
>>> + else if ( fip_width == 4 )
>>> + {
>>> + XSAVE("");
>>> + }
>>> + else
>>
>> Both conditions would now better also check mask & XSTATE_FP,
>> since going these routes (and namely bypassing the FIP check, as
>> was done before) is fine when FP state is not being saved.
>
> Is this what you mean?
>
> --- a/xen/arch/x86/xstate.c
> +++ b/xen/arch/x86/xstate.c
> @@ -261,7 +261,7 @@ void xsave(struct vcpu *v, uint64_t mask)
> "=m" (*ptr), \
> "a" (lmask), "d" (hmask), "D" (ptr))
>
> - if ( fip_width == 8 )
> + if ( fip_width == 8 || !(mask & XSTATE_FP) )
> {
> XSAVE("0x48,");
> }
Oh, you're right, it's just one of the two that needs it.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |