* [PATCH] x86/xstate: undo bogus adjustment to xsave()
@ 2016-03-10 7:39 Jan Beulich
2016-03-10 12:04 ` Andrew Cooper
2016-03-10 12:27 ` David Vrabel
0 siblings, 2 replies; 4+ messages in thread
From: Jan Beulich @ 2016-03-10 7:39 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Keir Fraser
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
This reverts an unintended change in commit 879b44b041 ("x86/fpu: add
a per-domain field to set the width of FIP/FDP"), which I had done
intermediately while fixing the build issue: After having reverted that
adjustment I must have forgotten to "git add" the adjustment.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/xstate.c
+++ b/xen/arch/x86/xstate.c
@@ -292,7 +292,7 @@ void xsave(struct vcpu *v, uint64_t mask)
XSAVE("0x48,");
- if ( !(ptr->xsave_hdr.xstate_bv & XSTATE_FP) ||
+ if ( !(mask & ptr->xsave_hdr.xstate_bv & XSTATE_FP) ||
/*
* AMD CPUs don't save/restore FDP/FIP/FOP unless an exception
* is pending.
[-- Attachment #2: x86-XSAVE-FIP-FDP-consider-mask.patch --]
[-- Type: text/plain, Size: 777 bytes --]
x86/xstate: undo bogus adjustment to xsave()
This reverts an unintended change in commit 879b44b041 ("x86/fpu: add
a per-domain field to set the width of FIP/FDP"), which I had done
intermediately while fixing the build issue: After having reverted that
adjustment I must have forgotten to "git add" the adjustment.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/xstate.c
+++ b/xen/arch/x86/xstate.c
@@ -292,7 +292,7 @@ void xsave(struct vcpu *v, uint64_t mask)
XSAVE("0x48,");
- if ( !(ptr->xsave_hdr.xstate_bv & XSTATE_FP) ||
+ if ( !(mask & ptr->xsave_hdr.xstate_bv & XSTATE_FP) ||
/*
* AMD CPUs don't save/restore FDP/FIP/FOP unless an exception
* is pending.
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/xstate: undo bogus adjustment to xsave()
2016-03-10 7:39 [PATCH] x86/xstate: undo bogus adjustment to xsave() Jan Beulich
@ 2016-03-10 12:04 ` Andrew Cooper
2016-03-10 12:27 ` David Vrabel
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2016-03-10 12:04 UTC (permalink / raw)
To: Jan Beulich, xen-devel; +Cc: Keir Fraser
On 10/03/16 07:39, Jan Beulich wrote:
> This reverts an unintended change in commit 879b44b041 ("x86/fpu: add
> a per-domain field to set the width of FIP/FDP"), which I had done
> intermediately while fixing the build issue: After having reverted that
> adjustment I must have forgotten to "git add" the adjustment.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/xstate: undo bogus adjustment to xsave()
2016-03-10 7:39 [PATCH] x86/xstate: undo bogus adjustment to xsave() Jan Beulich
2016-03-10 12:04 ` Andrew Cooper
@ 2016-03-10 12:27 ` David Vrabel
2016-03-10 13:16 ` Jan Beulich
1 sibling, 1 reply; 4+ messages in thread
From: David Vrabel @ 2016-03-10 12:27 UTC (permalink / raw)
To: Jan Beulich, xen-devel; +Cc: Andrew Cooper, Keir Fraser
On 10/03/16 07:39, Jan Beulich wrote:
> This reverts an unintended change in commit 879b44b041 ("x86/fpu: add
> a per-domain field to set the width of FIP/FDP"), which I had done
> intermediately while fixing the build issue: After having reverted that
> adjustment I must have forgotten to "git add" the adjustment.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
It think you also need to only clobber fip/fdp in memory if mask &
XSTATE_FP.
But, quite frankly, this logic too complicated and clearly too fragile
and you should just take the simplification I posted.
David
>
> --- a/xen/arch/x86/xstate.c
> +++ b/xen/arch/x86/xstate.c
> @@ -292,7 +292,7 @@ void xsave(struct vcpu *v, uint64_t mask)
>
> XSAVE("0x48,");
>
> - if ( !(ptr->xsave_hdr.xstate_bv & XSTATE_FP) ||
> + if ( !(mask & ptr->xsave_hdr.xstate_bv & XSTATE_FP) ||
> /*
> * AMD CPUs don't save/restore FDP/FIP/FOP unless an exception
> * is pending.
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/xstate: undo bogus adjustment to xsave()
2016-03-10 12:27 ` David Vrabel
@ 2016-03-10 13:16 ` Jan Beulich
0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2016-03-10 13:16 UTC (permalink / raw)
To: David Vrabel; +Cc: Andrew Cooper, Keir Fraser, xen-devel
>>> On 10.03.16 at 13:27, <david.vrabel@citrix.com> wrote:
> On 10/03/16 07:39, Jan Beulich wrote:
>> This reverts an unintended change in commit 879b44b041 ("x86/fpu: add
>> a per-domain field to set the width of FIP/FDP"), which I had done
>> intermediately while fixing the build issue: After having reverted that
>> adjustment I must have forgotten to "git add" the adjustment.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> It think you also need to only clobber fip/fdp in memory if mask &
> XSTATE_FP.
>
> But, quite frankly, this logic too complicated and clearly too fragile
> and you should just take the simplification I posted.
By all means I intend to once we've got confirmation from Intel.
I even did the re-basing already in preparation for that to happen.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-10 13:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-10 7:39 [PATCH] x86/xstate: undo bogus adjustment to xsave() Jan Beulich
2016-03-10 12:04 ` Andrew Cooper
2016-03-10 12:27 ` David Vrabel
2016-03-10 13:16 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).