[PATCH 2/4] configure: remove check for CPUID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This check is not required because all i386 and x86_64 cpus have the
cpuid instruction.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 configure.ac      | 19 -------------------
 src/cpu/cpu_x86.c |  4 ++--
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6f04bdc1f6..3b129e0207 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,25 +265,6 @@ LIBVIRT_CHECK_NSS
 LIBVIRT_CHECK_YAJL
 LIBVIRT_CHECK_GNUTLS
 
-AC_MSG_CHECKING([for CPUID instruction])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-  [[
-    #include <stdint.h>
-  ]],
-  [[
-    uint32_t eax, ebx, ecx, edx;
-    asm volatile (
-        "cpuid"
-        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
-        : "a" (eax));
-  ]])],
-  [have_cpuid=yes],
-  [have_cpuid=no])
-if test "x$have_cpuid" = xyes; then
-  AC_DEFINE_UNQUOTED([HAVE_CPUID], 1, [whether CPUID instruction is supported])
-fi
-AC_MSG_RESULT([$have_cpuid])
-
 AC_CHECK_SIZEOF([long])
 
 dnl Availability of various common functions (non-fatal if missing),
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index c79308a715..23a519ec00 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -2058,7 +2058,7 @@ x86Encode(virArch arch,
 }
 
 
-#if HAVE_CPUID
+#if defined(__i386__) || defined(__x86_64__)
 static inline void
 cpuidCall(virCPUx86CPUID *cpuid)
 {
@@ -2740,7 +2740,7 @@ struct cpuArchDriver cpuDriverX86 = {
     .decode     = x86DecodeCPUData,
     .encode     = x86Encode,
     .free       = x86FreeCPUData,
-#if HAVE_CPUID
+#if defined(__i386__) || defined(__x86_64__)
     .nodeData   = x86NodeData,
 #else
     .nodeData   = NULL,
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux