RE: [RFC PATCH v2 1/2] x86/fpu: detect AVX task

From: David Laight
Date: Tue Nov 13 2018 - 05:25:55 EST


From: Li, Aubrey
> Sent: 12 November 2018 01:41
...
> VZEROUPPER instruction resets the init state. If context switch happens
> to occur exactly after VZEROUPPER instruction, XINUSE bitmap is empty(all
> zeros), which indicates the task is not using AVX. That's why the state
> decay count is used here.

Isn't there an obvious optimisation to execute VZEROALL during system call
entry?
If that is done does any of this actually work?

David


-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)