Browse Source

Make VMware detection inline-asm portable

A. Wilcox 4 years ago
parent
commit
27c1a632d4
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      vmware-detect.c

+ 1
- 1
vmware-detect.c View File

@@ -8,7 +8,7 @@
8 8
 #define VMWARE_MAX_DEVICES		50
9 9
 
10 10
 #define VMWARE_PORT(cmd, eax, ebx, ecx, edx)                            \
11
-        __asm__("inl (%%dx)" :                                          \
11
+        __asm__("inl %%dx, %%eax" :                                     \
12 12
                         "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :    \
13 13
                         "0"(VMWARE_HYPERVISOR_MAGIC),                   \
14 14
                         "1"(VMWARE_PORT_CMD_##cmd),                     \