Add new qemu detection based on CPU brand string

This commit is contained in:
Alberto Ortega 2015-08-29 00:29:41 +02:00
parent 94dca540db
commit c65cfb5adc
2 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include "qemu.h"
#include "types.h"
#include "utils.h"
#include "cpu.h"
int qemu_reg_key1() {
return pafish_exists_regkey_value_str(HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\Scsi\\Scsi Port 0\\Scsi Bus 0\\Target Id 0\\Logical Unit Id 0", "Identifier", "QEMU");
@ -14,3 +15,9 @@ int qemu_reg_key2() {
return pafish_exists_regkey_value_str(HKEY_LOCAL_MACHINE, "HARDWARE\\Description\\System", "SystemBiosVersion", "QEMU");
}
int qemu_cpu_name() {
char cpu_brand[49];
cpu_write_brand(cpu_brand);
return !memcmp(cpu_brand, "QEMU Virtual CPU", 16) ? TRUE : FALSE;
}

View File

@ -6,4 +6,6 @@ int qemu_reg_key1();
int qemu_reg_key2();
int qemu_cpu_name();
#endif