[systemd-devel] rdrand generated with march=winchip-c6 in systemd-241

tedheadster tedheadster at gmail.com
Sat May 18 18:22:01 UTC 2019


On Mon, May 13, 2019 at 4:49 PM Mike Gilbert <floppym at gentoo.org> wrote:
>
> Just a guess: I wonder if that 'auls' value is left over from the
> previous CPUID result. If that's the case, a simple solution might be
> to zero-out ebx, ecx, and edx in __cpuid().

Mike,
  I tried your suggestion and added this patch to gcc 7.3.0:

--- cpuid.h.orig 2019-05-18 13:20:49.000000000 -0400
+++ cpuid.h 2019-05-14 05:52:11.000000000 -0400
@@ -251,8 +251,6 @@
   if (__maxlevel == 0 || __maxlevel < __leaf)
     return 0;

+  *__ebx = *__ecx = *__edx = 0;
+
   __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx);
   return 1;
 }

That didn't work, but perhaps I am putting it in the wrong function?
Any suggestions?

- Matthew


More information about the systemd-devel mailing list