diff mbox series

[unstable,linux] UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI

Message ID 20221018174730.171940-1-tim.gardner@canonical.com
State New
Headers show
Series [unstable,linux] UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI | expand

Commit Message

Tim Gardner Oct. 18, 2022, 5:47 p.m. UTC
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@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(-)

Comments

Andrea Righi Oct. 18, 2022, 9:04 p.m. UTC | #1
On Tue, Oct 18, 2022 at 11:47:30AM -0600, Tim Gardner wrote:
> 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@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.

Despite not knowing exactly if the guest ID is used, it makes sense to
me to restore the previous behavior, therefore: applied to
kinetic/linux-unstable.

Thanks!
-Andrea

> 
>  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
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Cory Todd Oct. 19, 2022, 2:21 p.m. UTC | #2
On Tue, Oct 18, 2022 at 11:47:30AM -0600, Tim Gardner wrote:
> 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@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;
>  }

I think this requires [SRU] in the subject? I'm also not sure if there
is a common shorthand for unstable.

- corytodd
Tim Gardner Oct. 19, 2022, 2:24 p.m. UTC | #3
On 10/19/22 8:21 AM, Cory Todd wrote:
> On Tue, Oct 18, 2022 at 11:47:30AM -0600, Tim Gardner wrote:
>> 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@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;
>>   }
> 
> I think this requires [SRU] in the subject? I'm also not sure if there
> is a common shorthand for unstable.
> 
> - corytodd

Development kernels, of which unstable is one, are a bit more wild west. 
Patches do not necessarily require an LP bug.

rtg
Cory Todd Oct. 19, 2022, 2:35 p.m. UTC | #4
On Wed, Oct 19, 2022 at 08:24:45AM -0600, Tim Gardner wrote:
> Development kernels, of which unstable is one, are a bit more wild west.
> Patches do not necessarily require an LP bug.
> 
Ah, okay. I get that BugLink is as "if available" thing. But for the
subject line, if the target is development=true in the kernel series db
we don't really care about the SRU formatting?  Only the sanity and
provenance of the patch itself? 

I'll re-send an ACK shortly.

- corytodd
Cory Todd Oct. 19, 2022, 2:38 p.m. UTC | #5
On Tue, Oct 18, 2022 at 11:47:30AM -0600, Tim Gardner wrote:
> 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@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;
>  }


Acked-by: Cory Todd <cory.todd@canonical.com>

Changing my NAK to an ACK (even though this was already applied) for
posterity. See RE on my NAK for reasoning.

- corytodd
diff mbox series

Patch

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;
 }