summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-23 21:01:01 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-23 21:01:01 +0100
commite429762faaac0c49353d35144a9d45d283e91213 (patch)
tree3174ad7d639082ff177484aedf9110afd2f17584 /src
parent8f00f8d6d731c665150def1592fa41ca84ae46ba (diff)
parentf6875b0a630cdcc6bb312f130ae92fc8becfb231 (diff)
Merge pull request #2003 from eworm-de/virt
virt: add comment about order in virtualization detection
Diffstat (limited to 'src')
-rw-r--r--src/basic/virt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index a271c87333..b82680a54b 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -269,6 +269,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;