[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/6] x86/AMD: Fix handling of FPU pointer on Zen hardware
On Fri, Dec 28, 2018 at 12:39:35PM +0000, Andrew Cooper wrote: > AMD hardware before Zen doesn't safe/restore the FPU error pointers > unless an unmasked FPU exception is pending. Zen processors have a > feature bit indicating that this (mis)behaviour no longer exists. > > Express the common logic in terms of cpu_bug_fpu_err_ptr as Hygon > processors (being Zen derivatives) won't inherit this behaviour. > > While at it, fix a performance issue with the workaround, which I should > have noticed by now. Looking at the FPU state slows the context switch > path down, as it is a moderately complicated unpredictable condition > which will evaluate to true for all 64bit OSes and most 32bit ones. > > Leave the sole condition being the easily-predictable > cpu_bug_fpu_err_ptr as the asm sequence is needed in ~100% of cases > these days on affected hardware. I'm not that familiar with the FPU registers, but I assume current code checks whether there's an exception pending before decoding whether the error pointers should be cleared? > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Apart from the question above, LGTM: Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Thanks. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |