git.annexia.org
/
virt-what.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add lkvm detection
[virt-what.git]
/
virt-what-cpuid-helper.c
diff --git
a/virt-what-cpuid-helper.c
b/virt-what-cpuid-helper.c
index
8b81be3
..
7812545
100644
(file)
--- a/
virt-what-cpuid-helper.c
+++ b/
virt-what-cpuid-helper.c
@@
-31,8
+31,8
@@
cpuid (unsigned int eax, char *sig)
unsigned int *sig32 = (unsigned int *) sig;
asm volatile (
unsigned int *sig32 = (unsigned int *) sig;
asm volatile (
- "x
or %%ebx, %%ebx; cpuid
"
- : "=a" (eax), "
=b
" (sig32[0]), "=c" (sig32[1]), "=d" (sig32[2])
+ "x
chgl %%ebx,%1; xor %%ebx,%%ebx; cpuid; xchgl %%ebx,%1
"
+ : "=a" (eax), "
+r
" (sig32[0]), "=c" (sig32[1]), "=d" (sig32[2])
: "0" (eax));
sig[12] = 0;
: "0" (eax));
sig[12] = 0;