diff mbox series

[focal,linux] UBUNTU: SAUCE: (no-up) hv: Fix supply vendor ID

Message ID 20230919135951.198552-2-tim.gardner@canonical.com
State New
Headers show
Series [focal,linux] UBUNTU: SAUCE: (no-up) hv: Fix supply vendor ID | expand

Commit Message

Tim Gardner Sept. 19, 2023, 1:59 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2036600

There is a mistake in the commit (https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-azure/+git/jammy/commit/?id=5dd24f2df3280d4354641f4687dbb36e418e7de8) :

Before the commit, the good guest_id is 0x8180000602100000.

With the commit, the generated guest_id is incorrect: 0x0080000602100000, i.e. the 0x81 from bit 56~63 are dropped.

See "include/asm-generic/hyperv-tlfs.h" for the definition of the bits:
* Bit(s)
* 63 - Indicates if the OS is Open Source or not; 1 is Open Source

* 62:56 - Os Type; Linux is 0x100 !!!!! Dexuan: this should be 0x1. I'll post a patch to LKML to fix this typo.

* 55:48 - Distro specific identification
* 47:16 - Linux kernel version number
* 15:0 - Distro specific identification

See https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/tlfs ("February, 2020: Released Version 6.0b", page 15)

As a result, the host thinks that the VM is not an open-source OS, and it's not Linux. Consequently, the "VM Availability" fron Azure portal is 0 (unhealthy): some users rely on the info to manage their VMs, e.g. if the VM is erroneously reported "unhealthy", the VM may be killed and re-created, and the new VM is still "unhealthy", and the VM may be killed and re-created again...

Fixes ('UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI')
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/x86/include/asm/hyperv-tlfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h
index 333e61e6dbe7..5bb7d77392fd 100644
--- a/arch/x86/include/asm/hyperv-tlfs.h
+++ b/arch/x86/include/asm/hyperv-tlfs.h
@@ -325,7 +325,7 @@  struct ms_hyperv_tsc_page {
  *
  */
 
-#define HV_LINUX_VENDOR_ID              0x8100
+#define HV_LINUX_VENDOR_ID              0x8180
 
 struct hv_reenlightenment_control {
 	__u64 vector:8;