From: Christian Hesse Date: Mon, 23 Nov 2015 12:55:04 +0000 (+0100) Subject: virt: detect dmi before cpuid X-Git-Tag: v229~287^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=050e65ada2e0023a1a4c953522f39846c6bdebf8;p=thirdparty%2Fsystemd.git virt: detect dmi before cpuid Virtualbox should be detected as 'oracle'. This used to work but broke with commit: commit 75f86906c52735c98dc0aa7e24b773edb42ee814 Author: Lennart Poettering Date: Mon Sep 7 13:42:47 2015 +0200 basic: rework virtualization detection API We swap detection for dmi and cpuid, this fixes Virtualbox with KVM. Hopefully it does not break anything else. --- diff --git a/src/basic/virt.c b/src/basic/virt.c index 1e5d6eea6e8..a271c87333e 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -269,13 +269,13 @@ int detect_vm(void) { if (cached_found >= 0) return cached_found; - r = detect_vm_cpuid(); + r = detect_vm_dmi(); if (r < 0) return r; if (r != VIRTUALIZATION_NONE) goto finish; - r = detect_vm_dmi(); + r = detect_vm_cpuid(); if (r < 0) return r; if (r != VIRTUALIZATION_NONE)