chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f3a80e
)
virt: add comment about order in virtualization detection
author
Christian Hesse
<mail@eworm.de>
Mon, 23 Nov 2015 18:15:25 +0000
(19:15 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Wed, 17 May 2017 13:22:14 +0000
(15:22 +0200)
src/basic/virt.c
patch
|
blob
|
history
diff --git
a/src/basic/virt.c
b/src/basic/virt.c
index a3811054284e242e4d06d675f9c5258e39b0ea02..bccde00f77a50eaff80f348774c3307a151f16bc 100644
(file)
--- 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;