On Tue, Sep 27, 2022 at 04:51:49PM +0200, Bengt Gördén wrote:
On 2022-09-27 15:35, Lubos Kocman wrote:
me and few others already shared a stack-overflow based scripted solution for Leap15/SLES 15 earlier in the tread 😄 https://unix.stackexchange.com/questions/631217/how-do-i-check-if-my-cpu-sup...
Wasn't that method dismissed as unreliable by Andrei Borzenkov?
Unreliable for v3, for v2 it should suffice. Thanks Michal
On 2022-09-06 10:33, Andrei Borzenkov wrote:
As I already explained in this thread on the user list, you cannot reliably detect v3 and above based on information in /proc/cpuinfo. Neither the OSXSAVE flag nor supported XSAVE bits are exposed. Testing for XSAVE is an optimistic approximation where you hope that if XSAVE is supported then everything else will be correctly set up.
libc actually queries processor for current OSXSAVE and supported XSAVE bits. Maybe it is possible to provide standalone binary replicating these tests.
-- /bengan