linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Radim Kr___m______ <rkrcmar@redhat.com>,
	kvm@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Joerg Roedel <joro@8bytes.org>,
	Christoffer Dall <christoffer.dall@arm.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	James Hogan <jhogan@kernel.org>,
	linux-mips@vger.kernel.org, Paul Mackerras <paulus@ozlabs.org>,
	kvm-ppc@vger.kernel.org,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	linux-kernel@vger.kernel.org,
	linux-arch <linux-arch@vger.kernel.org>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH] KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported
Date: Wed, 6 Feb 2019 11:58:42 +0100	[thread overview]
Message-ID: <20190206115842.2cd86269.cohuck@redhat.com> (raw)
In-Reply-To: <1549432390-11457-1-git-send-email-yamada.masahiro@socionext.com>

On Wed,  6 Feb 2019 14:53:10 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> 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.0-rc5, 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
> 
>  [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 0add53713b1c ("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 better, but Paolo
> showed preference in [B].
> 
>   https://patchwork.kernel.org/patch/10794919/
> 
> So, this commit is the implementation of [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>
> ---
> 
> The alternative solution [A] is available at:
> https://patchwork.kernel.org/patch/10794919/
> 
> Comparing the code diff, I personally prefer [A]...

I think both are much better than the status quo. This approach makes
the diff a bit uglier, but the end result looks cleaner to me.

Acked-by: Cornelia Huck <cohuck@redhat.com>

> 
> 
>  arch/alpha/include/asm/Kbuild            | 1 +
>  arch/alpha/include/uapi/asm/kvm_para.h   | 2 --
>  arch/arc/include/asm/Kbuild              | 1 +
>  arch/arc/include/uapi/asm/Kbuild         | 1 -
>  arch/arm/include/uapi/asm/Kbuild         | 1 +
>  arch/arm/include/uapi/asm/kvm_para.h     | 2 --
>  arch/c6x/include/asm/Kbuild              | 1 +
>  arch/c6x/include/uapi/asm/Kbuild         | 1 -
>  arch/h8300/include/asm/Kbuild            | 1 +
>  arch/h8300/include/uapi/asm/Kbuild       | 1 -
>  arch/hexagon/include/asm/Kbuild          | 1 +
>  arch/hexagon/include/uapi/asm/kvm_para.h | 2 --
>  arch/ia64/include/asm/Kbuild             | 1 +
>  arch/ia64/include/uapi/asm/Kbuild        | 1 -
>  arch/m68k/include/asm/Kbuild             | 1 +
>  arch/m68k/include/uapi/asm/Kbuild        | 1 -
>  arch/microblaze/include/asm/Kbuild       | 1 +
>  arch/microblaze/include/uapi/asm/Kbuild  | 1 -
>  arch/mips/include/uapi/asm/Kbuild        | 1 +
>  arch/mips/include/uapi/asm/kvm_para.h    | 5 -----
>  arch/nios2/include/asm/Kbuild            | 1 +
>  arch/nios2/include/uapi/asm/Kbuild       | 1 -
>  arch/openrisc/include/asm/Kbuild         | 1 +
>  arch/openrisc/include/uapi/asm/Kbuild    | 1 -
>  arch/parisc/include/asm/Kbuild           | 1 +
>  arch/parisc/include/uapi/asm/Kbuild      | 1 -
>  arch/s390/include/uapi/asm/Kbuild        | 1 +
>  arch/s390/include/uapi/asm/kvm_para.h    | 8 --------
>  arch/sh/include/asm/Kbuild               | 1 +
>  arch/sh/include/uapi/asm/Kbuild          | 1 -
>  arch/sparc/include/asm/Kbuild            | 1 +
>  arch/sparc/include/uapi/asm/kvm_para.h   | 2 --
>  arch/unicore32/include/asm/Kbuild        | 1 +
>  arch/unicore32/include/uapi/asm/Kbuild   | 1 -
>  arch/xtensa/include/asm/Kbuild           | 1 +
>  arch/xtensa/include/uapi/asm/Kbuild      | 1 -
>  include/uapi/linux/Kbuild                | 2 ++
>  37 files changed, 20 insertions(+), 33 deletions(-)
>  delete mode 100644 arch/alpha/include/uapi/asm/kvm_para.h
>  delete mode 100644 arch/arm/include/uapi/asm/kvm_para.h
>  delete mode 100644 arch/hexagon/include/uapi/asm/kvm_para.h
>  delete mode 100644 arch/mips/include/uapi/asm/kvm_para.h
>  delete mode 100644 arch/s390/include/uapi/asm/kvm_para.h
>  delete mode 100644 arch/sparc/include/uapi/asm/kvm_para.h

  reply	other threads:[~2019-02-06 10:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06  5:53 [PATCH] KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported Masahiro Yamada
2019-02-06 10:58 ` Cornelia Huck [this message]
2019-03-15 17:42 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190206115842.2cd86269.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=christoffer.dall@arm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=jhogan@kernel.org \
    --cc=joro@8bytes.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=paulus@ozlabs.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).