On Mon, May 13, 2019 at 4:49 PM Mike Gilbert <flop...@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
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to