Skip to content

Commit

Permalink
x86/hyper-v: move hyperv.h out of uapi
Browse files Browse the repository at this point in the history
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 Hypervisor
Top-Level Functional Specification (TLFS, see:
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/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 <[email protected]>
Acked-by: Thomas Gleixner <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
  • Loading branch information
vittyvk authored and rkrcmar committed Mar 28, 2018
1 parent 21e94ac commit 5a48580
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6531,7 +6531,7 @@ S: Maintained
F: Documentation/networking/netvsc.txt
F: arch/x86/include/asm/mshyperv.h
F: arch/x86/include/asm/trace/hyperv.h
F: arch/x86/include/uapi/asm/hyperv.h
F: arch/x86/include/asm/hyperv-tlfs.h
F: arch/x86/kernel/cpu/mshyperv.c
F: arch/x86/hyperv
F: drivers/hid/hid-hyperv.c
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/hyperv/hv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <asm/apic.h>
#include <asm/desc.h>
#include <asm/hypervisor.h>
#include <asm/hyperv.h>
#include <asm/hyperv-tlfs.h>
#include <asm/mshyperv.h>
#include <linux/version.h>
#include <linux/vmalloc.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_X86_HYPERV_H
#define _ASM_X86_HYPERV_H

/*
* This file contains definitions from Hyper-V Hypervisor Top-Level Functional
* Specification (TLFS):
* https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
*/

#ifndef _ASM_X86_HYPERV_TLFS_H
#define _ASM_X86_HYPERV_TLFS_H

#include <linux/types.h>

Expand Down
1 change: 1 addition & 0 deletions arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <asm/msr-index.h>
#include <asm/asm.h>
#include <asm/kvm_page_track.h>
#include <asm/hyperv-tlfs.h>

#define KVM_MAX_VCPUS 288
#define KVM_SOFT_MAX_VCPUS 240
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/mshyperv.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <linux/atomic.h>
#include <linux/nmi.h>
#include <asm/io.h>
#include <asm/hyperv.h>
#include <asm/hyperv-tlfs.h>
#include <asm/nospec-branch.h>

/*
Expand Down
1 change: 0 additions & 1 deletion arch/x86/include/uapi/asm/kvm_para.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#define _UAPI_ASM_X86_KVM_PARA_H

#include <linux/types.h>
#include <asm/hyperv.h>

/* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It
* should be used to determine that a VM is running under KVM.
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/mshyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/kexec.h>
#include <asm/processor.h>
#include <asm/hypervisor.h>
#include <asm/hyperv.h>
#include <asm/hyperv-tlfs.h>
#include <asm/mshyperv.h>
#include <asm/desc.h>
#include <asm/irq_regs.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <linux/vmalloc.h>
#include <linux/hyperv.h>
#include <linux/export.h>
#include <asm/hyperv.h>
#include <asm/mshyperv.h>

#include "hyperv_vmbus.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <linux/version.h>
#include <linux/interrupt.h>
#include <linux/clockchips.h>
#include <asm/hyperv.h>
#include <asm/mshyperv.h>
#include "hyperv_vmbus.h"

Expand Down
1 change: 1 addition & 0 deletions drivers/hv/hyperv_vmbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <linux/cpu.h>
#include <linux/sched/task_stack.h>

#include <asm/hyperv.h>
#include <asm/mshyperv.h>
#include <linux/notifier.h>
#include <linux/ptrace.h>
Expand Down
1 change: 0 additions & 1 deletion include/linux/hyperv.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#define _HYPERV_H

#include <uapi/linux/hyperv.h>
#include <uapi/asm/hyperv.h>

#include <linux/types.h>
#include <linux/scatterlist.h>
Expand Down

0 comments on commit 5a48580

Please sign in to comment.