diff options
author | Christian Hesse <mail@eworm.de> | 2015-11-23 13:55:04 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-05-17 15:22:14 +0200 |
commit | 7f3a80e5c0dd402adf7e0a2cd58313ae1ddb86b2 (patch) | |
tree | 2dd8947cfd277fc9ff06db91b046173db3fff8f5 /src/basic/virt.c | |
parent | 9ac0cc095b2d17cd0029048d902ff7b5e353e23e (diff) |
virt: detect dmi before cpuid
Virtualbox should be detected as 'oracle'. This used to work but broke
with commit:
commit 75f86906c52735c98dc0aa7e24b773edb42ee814
Author: Lennart Poettering <lennart@poettering.net>
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.
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r-- | src/basic/virt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c index 4b6286567..a38110542 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -270,13 +270,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) |