summaryrefslogtreecommitdiff
path: root/src/basic/virt.c
diff options
context:
space:
mode:
authorBoqun Feng <boqun.feng@gmail.com>2021-10-13 11:32:09 +0800
committerLennart Poettering <lennart@poettering.net>2021-10-13 22:22:24 +0200
commit506bbc8569014253ea8614b680ccbc4fc2513a87 (patch)
tree7464cc91dbc680c2814ad13549d6ac5771343e86 /src/basic/virt.c
parent0bc0726eadec8802c84e7162a93f2aa3b09bb931 (diff)
downloadsystemd-506bbc8569014253ea8614b680ccbc4fc2513a87.tar.gz
virt: Support detection for ARM64 Hyper-V guests
The detection of Microsoft Hyper-V VMs is done by cpuid currently, however there is no cpuid on ARM64. And since ARM64 is now a supported architecture for Microsoft Hyper-V guests[1], then use DMI tables to detect a Hyper-V guest, which is more generic and works for ARM64. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7aff79e297ee1aa0126924921fd87a4ae59d2467
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r--src/basic/virt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 745a855779..64581ad2e1 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -165,6 +165,7 @@ static int detect_vm_dmi_vendor(void) {
{ "Parallels", VIRTUALIZATION_PARALLELS },
/* https://wiki.freebsd.org/bhyve */
{ "BHYVE", VIRTUALIZATION_BHYVE },
+ { "Microsoft", VIRTUALIZATION_MICROSOFT },
};
int r;