+/* Known x86 hypervisor signatures. Note that if you add a new test
+ * to virt-what.in you may need to update this list. Note the
+ * signature is always 12 bytes long, plus we add \0 to the end to
+ * make it 13 bytes.
+ */
+static int
+known_signature (const char *sig)
+{
+ return
+ strcmp (sig, "bhyve bhyve ") == 0 ||
+ memcmp (sig, "KVMKVMKVM\0\0\0", 12) == 0 ||
+ strcmp (sig, "LKVMLKVMLKVM") == 0 ||
+ strcmp (sig, "Microsoft Hv") == 0 ||
+ strcmp (sig, "OpenBSDVMM58") == 0 ||
+ strcmp (sig, "TCGTCGTCGTCG") == 0 ||
+ strcmp (sig, "VMwareVMware") == 0 ||
+ strcmp (sig, "XenVMMXenVMM") == 0 ||
+ 0;
+}
+
+/* Copied from the Linux kernel definition in
+ * arch/x86/include/asm/processor.h
+ */
+static inline void
+cpuid (uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)