Package: systemd
Version: 247.3-7
Severity: important
Hi
Please backport support for detecting Microsoft Hyper-V on arm64 to
stable.
Commits are:
- 506bbc8569014253ea8614b680ccbc4fc2513a87
- 76eec0649936d9ae2f9087769f463feaf0cf5cb4
This adds new hardware support, which makes it suitable for a stable
update, thus reported with severity "important".
Patches I used are attached.
For me, systemd failed to build on stable, due to missmatch between
/usr/include/linux/if_arp.h and ./src/basic/linux/if_arp.h. This needs
to be fixed as well.
Regards,
Bastian
--
Vulcans worship peace above all.
-- McCoy, "Return to Tomorrow", stardate 4768.3
>From 506bbc8569014253ea8614b680ccbc4fc2513a87 Mon Sep 17 00:00:00 2001
From: Boqun Feng <[email protected]>
Date: Wed, 13 Oct 2021 11:32:09 +0800
Subject: [PATCH] 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
---
src/basic/virt.c | 1 +
1 file changed, 1 insertion(+)
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,4 +165,5 @@ static int detect_vm_dmi_vendor(void) {
/* https://wiki.freebsd.org/bhyve */
{ "BHYVE", VIRTUALIZATION_BHYVE },
+ { "Microsoft", VIRTUALIZATION_MICROSOFT },
};
unsigned i;
--
2.30.2
>From 76eec0649936d9ae2f9087769f463feaf0cf5cb4 Mon Sep 17 00:00:00 2001
From: Boqun Feng <[email protected]>
Date: Tue, 23 Nov 2021 15:09:26 +0800
Subject: [PATCH] virt: Fix the detection for Hyper-V VMs
Use product_version instead of product_name in DMI table and the string
"Hyper-V" to avoid misdetection.
Fixes: #21468
Signed-off-by: Boqun Feng <[email protected]>
---
src/basic/virt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 4e1cbf5b66..9b7dbdc205 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -146,7 +146,8 @@ static int detect_vm_dmi_vendor(void) {
"/sys/class/dmi/id/product_name", /* Test this before sys_vendor to detect KVM over QEMU */
"/sys/class/dmi/id/sys_vendor",
"/sys/class/dmi/id/board_vendor",
- "/sys/class/dmi/id/bios_vendor"
+ "/sys/class/dmi/id/bios_vendor",
+ "/sys/class/dmi/id/product_version" /* For Hyper-V VMs test */
};
static const struct {
@@ -165,5 +166,5 @@ static int detect_vm_dmi_vendor(void) {
/* https://wiki.freebsd.org/bhyve */
{ "BHYVE", VIRTUALIZATION_BHYVE },
- { "Microsoft", VIRTUALIZATION_MICROSOFT },
+ { "Hyper-V", VIRTUALIZATION_MICROSOFT },
};
unsigned i;
--
2.30.2