Message ID | 20230920115243.236834-2-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show |
Series | UBUNTU: SAUCE: (no-up) hv: Fix supply vendor ID | expand |
On 20.09.23 13:52, Tim Gardner wrote: > 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) : I share the confusion because the argument is still referring to a linux-azure tree. The patch somehow landed in Lunar during development but with a different SHA1 than at least Lunar which has 5dd24f2df328 UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI instead. I think this would be much clearer if the reference above was into a Lunar tree and the fixes line used the form: Fixes: 5dd24f2df328 "UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI" (Lunar) -Stefan > > 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 commit df072c70a5aecc5f3beac8b8ceb16e6633fcb6c2 ('UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI') > Signed-off-by: Tim Gardner <tim.gardner@canonical.com> > --- > include/asm-generic/hyperv-tlfs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h > index d44e0860c9f9..5b72376e4a88 100644 > --- a/include/asm-generic/hyperv-tlfs.h > +++ b/include/asm-generic/hyperv-tlfs.h > @@ -135,7 +135,7 @@ union hv_reference_tsc_msr { > * > */ > > -#define HV_LINUX_VENDOR_ID 0x80 /* Canonical */ > +#define HV_LINUX_VENDOR_ID 0x8180 /* Canonical */ > > /* > * Crash notification flags.
On 9/27/23 2:31 AM, Stefan Bader wrote: > On 20.09.23 13:52, Tim Gardner wrote: >> 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) : > > I share the confusion because the argument is still referring to a > linux-azure tree. The patch somehow landed in Lunar during development > but with a different SHA1 than at least Lunar which has > > 5dd24f2df328 UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI > > instead. I think this would be much clearer if the reference above was > into a Lunar tree and the fixes line used the form: > > Fixes: 5dd24f2df328 "UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and > package ABI" > (Lunar) > > -Stefan > >> >> 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 commit df072c70a5aecc5f3beac8b8ceb16e6633fcb6c2 ('UBUNTU: SAUCE: >> (no-up) hv: Supply vendor ID and package ABI') >> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> >> --- >> include/asm-generic/hyperv-tlfs.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/asm-generic/hyperv-tlfs.h >> b/include/asm-generic/hyperv-tlfs.h >> index d44e0860c9f9..5b72376e4a88 100644 >> --- a/include/asm-generic/hyperv-tlfs.h >> +++ b/include/asm-generic/hyperv-tlfs.h >> @@ -135,7 +135,7 @@ union hv_reference_tsc_msr { >> * >> */ >> -#define HV_LINUX_VENDOR_ID 0x80 /* Canonical */ >> +#define HV_LINUX_VENDOR_ID 0x8180 /* Canonical */ >> /* >> * Crash notification flags. > v4 on the way
diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h index d44e0860c9f9..5b72376e4a88 100644 --- a/include/asm-generic/hyperv-tlfs.h +++ b/include/asm-generic/hyperv-tlfs.h @@ -135,7 +135,7 @@ union hv_reference_tsc_msr { * */ -#define HV_LINUX_VENDOR_ID 0x80 /* Canonical */ +#define HV_LINUX_VENDOR_ID 0x8180 /* Canonical */ /* * Crash notification flags.
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 commit df072c70a5aecc5f3beac8b8ceb16e6633fcb6c2 ('UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI') Signed-off-by: Tim Gardner <tim.gardner@canonical.com> --- include/asm-generic/hyperv-tlfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)