Detect CPUID instruction before using it.
[seabios.git] / src / paravirt.h
index 83166f498a75c61027497104d76af2338589d3b3..96740893b8ba790d07e76fa05f94a2d97a867a4f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __PV_H
 #define __PV_H
 
+#include "config.h" // CONFIG_COREBOOT
 #include "util.h"
 
 /* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx.  It
@@ -10,6 +11,8 @@
 
 static inline int kvm_para_available(void)
 {
+    if (CONFIG_COREBOOT)
+        return 0;
     unsigned int eax, ebx, ecx, edx;
     char signature[13];