Skip to content

Commit 3d9683c

Browse files
masahir0ybonzini
authored andcommitted
KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported
I do not see any consistency about headers_install of <linux/kvm_para.h> and <asm/kvm_para.h>. According to my analysis of Linux 5.1-rc1, there are 3 groups: [1] Both <linux/kvm_para.h> and <asm/kvm_para.h> are exported alpha, arm, hexagon, mips, powerpc, s390, sparc, x86 [2] <asm/kvm_para.h> is exported, but <linux/kvm_para.h> is not arc, arm64, c6x, h8300, ia64, m68k, microblaze, nios2, openrisc, parisc, sh, unicore32, xtensa [3] Neither <linux/kvm_para.h> nor <asm/kvm_para.h> is exported csky, nds32, riscv This does not match to the actual KVM support. At least, [2] is half-baked. Nor do arch maintainers look like they care about this. For example, commit 0add537 ("microblaze: Add missing kvm_para.h to Kbuild") exported <asm/kvm_para.h> to user-space in order to fix an in-kernel build error. We have two ways to make this consistent: [A] export both <linux/kvm_para.h> and <asm/kvm_para.h> for all architectures, irrespective of the KVM support [B] Match the header export of <linux/kvm_para.h> and <asm/kvm_para.h> to the KVM support My first attempt was [A] because the code looks cleaner, but Paolo suggested [B]. So, this commit goes with [B]. For most architectures, <asm/kvm_para.h> was moved to the kernel-space. I changed include/uapi/linux/Kbuild so that it checks generated asm/kvm_para.h as well as check-in ones. After this commit, there will be two groups: [1] Both <linux/kvm_para.h> and <asm/kvm_para.h> are exported arm, arm64, mips, powerpc, s390, x86 [2] Neither <linux/kvm_para.h> nor <asm/kvm_para.h> is exported alpha, arc, c6x, csky, h8300, hexagon, ia64, m68k, microblaze, nds32, nios2, openrisc, parisc, riscv, sh, sparc, unicore32, xtensa Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 4d66623 commit 3d9683c

File tree

33 files changed

+18
-20
lines changed

33 files changed

+18
-20
lines changed

arch/alpha/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ generic-y += exec.h
66
generic-y += export.h
77
generic-y += fb.h
88
generic-y += irq_work.h
9+
generic-y += kvm_para.h
910
generic-y += mcs_spinlock.h
1011
generic-y += mm-arch-hooks.h
1112
generic-y += preempt.h

arch/alpha/include/uapi/asm/kvm_para.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

arch/arc/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ generic-y += hardirq.h
1111
generic-y += hw_irq.h
1212
generic-y += irq_regs.h
1313
generic-y += irq_work.h
14+
generic-y += kvm_para.h
1415
generic-y += local.h
1516
generic-y += local64.h
1617
generic-y += mcs_spinlock.h

arch/arc/include/uapi/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
generic-y += kvm_para.h
21
generic-y += ucontext.h

arch/arm/include/uapi/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
generated-y += unistd-common.h
44
generated-y += unistd-oabi.h
55
generated-y += unistd-eabi.h
6+
generic-y += kvm_para.h

arch/arm/include/uapi/asm/kvm_para.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

arch/c6x/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ generic-y += irq_work.h
1919
generic-y += kdebug.h
2020
generic-y += kmap_types.h
2121
generic-y += kprobes.h
22+
generic-y += kvm_para.h
2223
generic-y += local.h
2324
generic-y += mcs_spinlock.h
2425
generic-y += mm-arch-hooks.h

arch/c6x/include/uapi/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
generic-y += kvm_para.h
21
generic-y += ucontext.h

arch/h8300/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ generic-y += irq_work.h
2323
generic-y += kdebug.h
2424
generic-y += kmap_types.h
2525
generic-y += kprobes.h
26+
generic-y += kvm_para.h
2627
generic-y += linkage.h
2728
generic-y += local.h
2829
generic-y += local64.h

arch/h8300/include/uapi/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
generic-y += kvm_para.h
21
generic-y += ucontext.h

0 commit comments

Comments
 (0)