Re: [PATCH v3 1/7] x86/hyper-v: move hyperv.h out of uapi

From: Vitaly Kuznetsov
Date: Wed Mar 14 2018 - 05:36:02 EST


"Michael Kelley (EOSG)" <Michael.H.Kelley@xxxxxxxxxxxxx> writes:

>> -----Original Message-----
>> From: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
>> Sent: Friday, March 9, 2018 6:03 AM
>> To: kvm@xxxxxxxxxxxxxxx
>> Cc: x86@xxxxxxxxxx; Paolo Bonzini <pbonzini@xxxxxxxxxx>; Radim KrÄmÃÅ
>> <rkrcmar@xxxxxxxxxx>; KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang
>> <haiyangz@xxxxxxxxxxxxx>; Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>; Michael
>> Kelley (EOSG) <Michael.H.Kelley@xxxxxxxxxxxxx>; Mohammed Gamal
>> <mmorsy@xxxxxxxxxx>; Cathy Avery <cavery@xxxxxxxxxx>; Bandan Das <bsd@xxxxxxxxxx>;
>> linux-kernel@xxxxxxxxxxxxxxx
>> Subject: [PATCH v3 1/7] x86/hyper-v: move hyperv.h out of uapi
>>
>> hyperv.h is not part of uapi, there are no (known) users outside of kernel.
>> We are making changes to this file to match current Hyper-V TLFS and we
>> don't want to maintain backwards compatibility.
>>
>> Move the file renaming to hyperv-tlfs.h to avoid confusing it with
>> mshyperv.h. In future, all definitions from TLFS should go to it and
>> all kernel objects should go to mshyperv.h or include/linux/hyperv.h.
>>
>> Signed-off-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
>> ---
>
> [snip]
>
>> diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
>> index 447371f4de56..72855182b191 100644
>> --- a/drivers/hv/connection.c
>> +++ b/drivers/hv/connection.c
>> @@ -31,7 +31,6 @@
>> #include <linux/vmalloc.h>
>> #include <linux/hyperv.h>
>> #include <linux/export.h>
>> -#include <asm/hyperv.h>
>
> This #include should remain and be changed to asm/hyperv-tlfs.h. This
> file uses the hypercall status values HV_STATUS_*.
>
>> #include <asm/mshyperv.h>

My idea was that <asm/mshyperv.h> already includes <asm/hyperv-tlfs.h> so
there's no need to include them both.

>>
>> #include "hyperv_vmbus.h"
>> diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
>> index fe96aab9e794..45f3694bbb76 100644
>> --- a/drivers/hv/hv.c
>> +++ b/drivers/hv/hv.c
>> @@ -29,7 +29,6 @@
>> #include <linux/version.h>
>> #include <linux/interrupt.h>
>> #include <linux/clockchips.h>
>> -#include <asm/hyperv.h>
>
> This #include should remain and be changed to asm/hyperv-tlfs.h. This
> file uses HV_MESSAGE_* values.
>

Ditto.

>> #include <asm/mshyperv.h>
>> #include "hyperv_vmbus.h"
>>
>> diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
>> index 22300ec7b556..500f805a6ef2 100644
>> --- a/drivers/hv/hyperv_vmbus.h
>> +++ b/drivers/hv/hyperv_vmbus.h
>> @@ -27,6 +27,7 @@
>>
>> #include <linux/list.h>
>> #include <asm/sync_bitops.h>
>> +#include <asm/hyperv-tlfs.h>
>> #include <linux/atomic.h>
>> #include <linux/hyperv.h>
>> #include <linux/interrupt.h>
>> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
>> index bc65c4d79c1f..b10fe26c4891 100644
>> --- a/drivers/hv/vmbus_drv.c
>> +++ b/drivers/hv/vmbus_drv.c
>> @@ -36,7 +36,6 @@
>> #include <linux/cpu.h>
>> #include <linux/sched/task_stack.h>
>>
>> -#include <asm/hyperv.h>
>
> This #include should remain and be changed to asm/hyperv-tlfs.h. This
> file uses HVMSG_* values.
>

Ditto.

>> #include <asm/mshyperv.h>
>> #include <linux/notifier.h>
>> #include <linux/ptrace.h>

Thanks for the review!

--
Vitaly