Public bug reported:

[Impact]

 * 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[0], then introduce a more
generic way to detect whether a guest is running as a Hyper-V guest: check 
if /sys/class/dmi/id/product_version starts with "Hyper-V".

 * This bug has already been fixed upstream[1][2]

[Test Plan]

 * While changes have been made in the kernel for ARM64 on Hyper-V,
there is no way to start an ARM64 VM on Hyper-V at the moment. Thus we
just want to make sure no regression is introduced.

 * start an Hyper-V amd64 VM and make sure "systemd-detect-virt" still
return MSFT (should still rely on cpuid here)

[Where problems could occur]

 * The main risk is for the system to detect Hyper-V virt erroneously.
An issue was reported upstream after the first commit was merged[3]. For
this reason, systemd is now looking for "Hyper-V" (in
/sys/class/dmi/id/product_version) and not "Microsoft" (in
/sys/class/dmi/id/bios_vendor)

 * This change might also break virt detection on hyper-v AMD64. That's
why we need testing. However, AMD64 virt detection should still rely on
cpuid instead of DMI as cpuid takes priority over DMI.

[0] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7aff79e297ee1aa0126924921fd87a4ae59d2467
[1] https://github.com/systemd/systemd/pull/20998/files
[2] https://github.com/systemd/systemd/pull/21475/files
[3] https://github.com/systemd/systemd/issues/21468

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Bionic)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Focal)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Hirsute)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Impish)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Jammy)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1952599

Title:
  virt: Support detection for ARM64 Hyper-V guests (fixed upstream)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1952599/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to