NAK/cmnt: [PATCH][unstable linux] UBUNTU: SAUCE: (no-up) hv: Supply vendor ID and package ABI

Tim Gardner tim.gardner at canonical.com
Wed Oct 19 14:24:45 UTC 2022


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 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;
>>   }
> 
> 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
-- 
-----------
Tim Gardner
Canonical, Inc




More information about the kernel-team mailing list