]> git.ipfire.org Git - thirdparty/systemd.git/commit
virt: Properly detect nested UML inside another hypervisor
authorChristopher Obbard <chris.obbard@collabora.com>
Wed, 2 Dec 2020 14:20:39 +0000 (14:20 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Dec 2020 22:19:41 +0000 (07:19 +0900)
commitc8037dbf05da586b6a210ac04f145d99f424971f
tree08b8e54458264ac906d4346fa6d2d14b66b090a5
parent0b261ac5be4bc8b3153df8b06d0be245d46b1fbf
virt: Properly detect nested UML inside another hypervisor

UML runs as a user-process so it can quite easily be ran inside of
another hypervisor, for instance inside a KVM instance. UML passes
through the CPUID from the host machine so in this case detect_vm
incorrectly identifies as running under KVM. So check we are running
a UML kernel first, before we check any other hypervisors.

Resolves: #17754

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
src/basic/virt.c