summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorDaniel Berrange <berrange@redhat.com>2017-07-19 10:06:07 +0100
committerLennart Poettering <lennart@poettering.net>2017-07-19 11:06:07 +0200
commit5588612e9e8828691f13141e3fcebe08a59201fe (patch)
tree3e4b0eb4e58320a2c59f61bbc6a224a914ca0c0d /src/basic
parenta04efff8a7332c3a87478374410d7341b51795cc (diff)
downloadsystemd-5588612e9e8828691f13141e3fcebe08a59201fe.tar.gz
systemd-5588612e9e8828691f13141e3fcebe08a59201fe.tar.bz2
systemd-5588612e9e8828691f13141e3fcebe08a59201fe.zip
virt: enable detecting QEMU (TCG) via CPUID (#6399)
QEMU >= 2.10 will include a CPUID leaf with value "TCGTCGTCGTCG" on x86 when running with the TCG CPU emulator: https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg05231.html Existing methods of detecting QEMU are left unchanged for sake of backcompatibility. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/virt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 6011744523..5143ac6656 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -46,6 +46,7 @@ static int detect_vm_cpuid(void) {
} cpuid_vendor_table[] = {
{ "XenVMMXenVMM", VIRTUALIZATION_XEN },
{ "KVMKVMKVM", VIRTUALIZATION_KVM },
+ { "TCGTCGTCGTCG", VIRTUALIZATION_QEMU },
/* http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458 */
{ "VMwareVMware", VIRTUALIZATION_VMWARE },
/* https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs */