The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: "WEI-HONG, YE" <1234567weewee457@gmail.com>
Cc: pbonzini@redhat.com, vkuznets@redhat.com, tglx@kernel.org,
	 mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
	x86@kernel.org,  hpa@zytor.com, thuth@redhat.com,
	kvm@vger.kernel.org,  linux-kernel@vger.kernel.org,
	hank20010209@gmail.com
Subject: Re: [PATCH] x86/kvm: Include linux/types.h in asm/kvm_para.h
Date: Tue, 7 Jul 2026 11:20:39 -0700	[thread overview]
Message-ID: <ak1Dd5M6EtzOFlk_@google.com> (raw)
In-Reply-To: <20260505065849.81691-1-1234567weewee457@gmail.com>

On Tue, May 05, 2026, WEI-HONG, YE wrote:
> arch/x86/include/asm/kvm_para.h uses u32 in function declarations, but
> does not include linux/types.h itself. One user, mtrr.c, carried an
> explicit workaround for this dependency.
> 
> Include linux/types.h from asm/kvm_para.h and remove the workaround from
> mtrr.c.
> 
> Build-tested with x86_64 defconfig.
> 
> Signed-off-by: WEI-HONG, YE <1234567weewee457@gmail.com>
> ---
>  arch/x86/include/asm/kvm_para.h | 2 ++
>  arch/x86/kernel/cpu/mtrr/mtrr.c | 2 --
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h
> index 4a47c16e2df8..26e86db37b05 100644
> --- a/arch/x86/include/asm/kvm_para.h
> +++ b/arch/x86/include/asm/kvm_para.h
> @@ -2,6 +2,8 @@
>  #ifndef _ASM_X86_KVM_PARA_H
>  #define _ASM_X86_KVM_PARA_H
>  
> +#include <linux/types.h>
> +
>  #include <asm/processor.h>
>  #include <asm/alternative.h>
>  #include <linux/interrupt.h>
> diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c
> index 4b3d492afe17..cdba5bf4a51d 100644
> --- a/arch/x86/kernel/cpu/mtrr/mtrr.c
> +++ b/arch/x86/kernel/cpu/mtrr/mtrr.c
> @@ -18,8 +18,6 @@
>      System Programming Guide; Section 9.11. (1997 edition - PPro).
>  */
>  
> -#include <linux/types.h> /* FIXME: kvm_para.h needs this */
> -
>  #include <linux/stop_machine.h>
>  #include <linux/kvm_para.h>

Just drop the kvm_para.h include, it has been needed since commit bf3647c44bc7
("x86: tone down mtrr_trim_uncached_memory() warning") from 2009.  I.e.

diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c
index 4b3d492afe17..db5bf4adfd28 100644
--- a/arch/x86/kernel/cpu/mtrr/mtrr.c
+++ b/arch/x86/kernel/cpu/mtrr/mtrr.c
@@ -18,10 +18,7 @@
     System Programming Guide; Section 9.11. (1997 edition - PPro).
 */
 
-#include <linux/types.h> /* FIXME: kvm_para.h needs this */
-
 #include <linux/stop_machine.h>
-#include <linux/kvm_para.h>
 #include <linux/uaccess.h>
 #include <linux/export.h>
 #include <linux/mutex.h>

  parent reply	other threads:[~2026-07-07 18:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  6:58 [PATCH] x86/kvm: Include linux/types.h in asm/kvm_para.h WEI-HONG, YE
2026-05-05  8:02 ` Thomas Huth
2026-07-07 18:20 ` Sean Christopherson [this message]
     [not found] ` <ak1Dd5M6EtzOF1k_@google.com>
2026-07-08  7:42   ` WEI-HONG, YE
2026-07-08 13:09     ` Sean Christopherson

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=ak1Dd5M6EtzOFlk_@google.com \
    --to=seanjc@google.com \
    --cc=1234567weewee457@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hank20010209@gmail.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=tglx@kernel.org \
    --cc=thuth@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    /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