[PATCH][unstable linux] UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI
Tim Gardner
tim.gardner at canonical.com
Tue Oct 18 17:47:30 UTC 2022
BugLink: http://bugs.launchpad.net/bugs/1193172
Even though this buglink is for an ancient kernel, the information
in the bug is still probably relevant.
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
It is not clear to me that the guest ID is even used. For example, the arm64
Hyperv backport did not specify a unique vendor ID, yet there have been no
complaints from MSFT. At any rate, this preserves the behavior of the
previous incarnation of this patch from Focal and Jammy.
include/asm-generic/hyperv-tlfs.h | 2 +-
include/asm-generic/mshyperv.h | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h
index fdce7a4cfc6f..199fb1fa58c0 100644
--- a/include/asm-generic/hyperv-tlfs.h
+++ b/include/asm-generic/hyperv-tlfs.h
@@ -126,7 +126,7 @@ struct ms_hyperv_tsc_page {
*
*/
-#define HV_LINUX_VENDOR_ID 0x8100
+#define HV_LINUX_VENDOR_ID 0x80 /* Canonical */
/*
* Crash notification flags.
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
index bfb9eb9d7215..4ab6a8c25467 100644
--- a/include/asm-generic/mshyperv.h
+++ b/include/asm-generic/mshyperv.h
@@ -104,6 +104,14 @@ static inline u64 hv_do_rep_hypercall(u16 code, u16 rep_count, u16 varhead_size,
return status;
}
+#ifndef PKG_ABI
+/*
+ * Preserve the ability to 'make deb-pkg' since PKG_ABI is provided
+ * by the Ubuntu build rules.
+ */
+#define PKG_ABI 0
+#endif
+
/* Generate the guest OS identifier as described in the Hyper-V TLFS */
static inline u64 hv_generate_guest_id(u64 kernel_version)
{
@@ -111,6 +119,7 @@ static inline u64 hv_generate_guest_id(u64 kernel_version)
guest_id = (((u64)HV_LINUX_VENDOR_ID) << 48);
guest_id |= (kernel_version << 16);
+ guest_id |= PKG_ABI;
return guest_id;
}
--
2.34.1
More information about the kernel-team
mailing list