diff options
author | Daniel Mack <github@zonque.org> | 2015-09-02 08:00:38 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-09-02 08:00:38 +0200 |
commit | f22572452b55f78ec9cddfdb0229c1d93dd9ce67 (patch) | |
tree | 81d5b75aa701f475ba189e2a1d9834a4f3b45d05 /src/basic/virt.c | |
parent | b92340af681764d931addebc10bd827f0be03c47 (diff) | |
parent | d84248ebec77d7d22c2035c786437d0c58641a6b (diff) |
Merge pull request #1117 from evverx/detect-parallels-virt
virt: detect parallels virtualization
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r-- | src/basic/virt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c index a8d26716a1..4a4bebd528 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -156,7 +156,8 @@ static int detect_vm_dmi(const char **_id) { "VMW\0" "vmware\0" "innotek GmbH\0" "oracle\0" "Xen\0" "xen\0" - "Bochs\0" "bochs\0"; + "Bochs\0" "bochs\0" + "Parallels\0" "parallels\0"; unsigned i; for (i = 0; i < ELEMENTSOF(dmi_vendors); i++) { @@ -244,8 +245,9 @@ int detect_vm(const char **id) { r = detect_vm_dmi(&_id); /* kvm with and without Virtualbox */ + /* Parallels exports KVMKVMKVM leaf */ if (streq_ptr(_id_cpuid, "kvm")) { - if (r > 0 && streq(_id, "oracle")) + if (r > 0 && (streq(_id, "oracle") || streq(_id, "parallels"))) goto finish; _id = _id_cpuid; |