diff options
author | Christian Hesse <mail@eworm.de> | 2015-11-23 19:15:25 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-05-17 15:22:14 +0200 |
commit | f17b8f67b57510db49f88942135a31486a73e2bc (patch) | |
tree | 75709613002eb2a3560d26bf34ba943f5fa4ff3b /src/basic/virt.c | |
parent | 7f3a80e5c0dd402adf7e0a2cd58313ae1ddb86b2 (diff) |
virt: add comment about order in virtualization detection
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r-- | src/basic/virt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c index a38110542..bccde00f7 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -270,6 +270,13 @@ int detect_vm(void) { if (cached_found >= 0) return cached_found; + /* We have to use the correct order here: + * Some virtualization technologies do use KVM hypervisor but are + * expected to be detected as something else. So detect DMI first. + * + * An example is Virtualbox since version 5.0, which uses KVM backend. + * Detection via DMI works corretly, the CPU ID would find KVM + * only. */ r = detect_vm_dmi(); if (r < 0) return r; |