mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Juergen Gross" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/paravirt] x86/paravirt: Introduce new paravirt-base.h header
Date: Wed, 14 Jan 2026 10:40:09 -0000	[thread overview]
Message-ID: <176838720955.510.7093655202132540123.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260105110520.21356-14-jgross@suse.com>

The following commit has been merged into the x86/paravirt branch of tip:

Commit-ID:     f01b4f4a60191fa2a78931e2a3986983ec4f5334
Gitweb:        https://git.kernel.org/tip/f01b4f4a60191fa2a78931e2a3986983ec4f5334
Author:        Juergen Gross <jgross@suse.com>
AuthorDate:    Mon, 05 Jan 2026 12:05:12 +01:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Mon, 12 Jan 2026 18:58:28 +01:00

x86/paravirt: Introduce new paravirt-base.h header

Move the pv_info related definitions and the declarations of the global
paravirt function primitives into a new header file paravirt-base.h.

Use that header instead of paravirt_types.h in ptrace.h.

Additionally, this is a preparation to reduce the include hell with paravirt
enabled.

  [ bp: Massage commit message. ]

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260105110520.21356-14-jgross@suse.com
---
 arch/x86/include/asm/paravirt-base.h  | 29 ++++++++++++++++++++++++++-
 arch/x86/include/asm/paravirt.h       |  4 +++-
 arch/x86/include/asm/paravirt_types.h | 23 +---------------------
 arch/x86/include/asm/ptrace.h         |  2 +-
 4 files changed, 34 insertions(+), 24 deletions(-)
 create mode 100644 arch/x86/include/asm/paravirt-base.h

diff --git a/arch/x86/include/asm/paravirt-base.h b/arch/x86/include/asm/paravirt-base.h
new file mode 100644
index 0000000..3827ea2
--- /dev/null
+++ b/arch/x86/include/asm/paravirt-base.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef _ASM_X86_PARAVIRT_BASE_H
+#define _ASM_X86_PARAVIRT_BASE_H
+
+/*
+ * Wrapper type for pointers to code which uses the non-standard
+ * calling convention.  See PV_CALL_SAVE_REGS_THUNK below.
+ */
+struct paravirt_callee_save {
+	void *func;
+};
+
+struct pv_info {
+#ifdef CONFIG_PARAVIRT_XXL
+	u16 extra_user_64bit_cs;  /* __USER_CS if none */
+#endif
+	const char *name;
+};
+
+void default_banner(void);
+extern struct pv_info pv_info;
+unsigned long paravirt_ret0(void);
+#ifdef CONFIG_PARAVIRT_XXL
+u64 _paravirt_ident_64(u64);
+#endif
+#define paravirt_nop	((void *)nop_func)
+
+#endif /* _ASM_X86_PARAVIRT_BASE_H */
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index b69e75a..62399f5 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -4,6 +4,9 @@
 /* Various instructions on x86 need to be replaced for
  * para-virtualization: those hooks are defined here. */
 
+#ifndef __ASSEMBLER__
+#include <asm/paravirt-base.h>
+#endif
 #include <asm/paravirt_types.h>
 
 #ifdef CONFIG_PARAVIRT
@@ -601,7 +604,6 @@ static __always_inline unsigned long arch_local_irq_save(void)
 #undef PVOP_VCALL4
 #undef PVOP_CALL4
 
-extern void default_banner(void);
 void native_pv_lock_init(void) __init;
 
 #else  /* __ASSEMBLER__ */
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index 0b60eab..d7c38e5 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -7,6 +7,7 @@
 #ifndef __ASSEMBLER__
 #include <linux/types.h>
 
+#include <asm/paravirt-base.h>
 #include <asm/desc_defs.h>
 #include <asm/pgtable_types.h>
 #include <asm/nospec-branch.h>
@@ -18,23 +19,6 @@ struct cpumask;
 struct flush_tlb_info;
 struct vm_area_struct;
 
-/*
- * Wrapper type for pointers to code which uses the non-standard
- * calling convention.  See PV_CALL_SAVE_REGS_THUNK below.
- */
-struct paravirt_callee_save {
-	void *func;
-};
-
-/* general info */
-struct pv_info {
-#ifdef CONFIG_PARAVIRT_XXL
-	u16 extra_user_64bit_cs;  /* __USER_CS if none */
-#endif
-
-	const char *name;
-};
-
 #ifdef CONFIG_PARAVIRT_XXL
 struct pv_lazy_ops {
 	/* Set deferred update mode, used for batching operations. */
@@ -226,7 +210,6 @@ struct paravirt_patch_template {
 	struct pv_lock_ops	lock;
 } __no_randomize_layout;
 
-extern struct pv_info pv_info;
 extern struct paravirt_patch_template pv_ops;
 
 #define paravirt_ptr(op)	[paravirt_opptr] "m" (pv_ops.op)
@@ -497,17 +480,13 @@ extern struct paravirt_patch_template pv_ops;
 	__PVOP_VCALL(op, PVOP_CALL_ARG1(arg1), PVOP_CALL_ARG2(arg2),	\
 		     PVOP_CALL_ARG3(arg3), PVOP_CALL_ARG4(arg4))
 
-unsigned long paravirt_ret0(void);
 #ifdef CONFIG_PARAVIRT_XXL
-u64 _paravirt_ident_64(u64);
 unsigned long pv_native_save_fl(void);
 void pv_native_irq_disable(void);
 void pv_native_irq_enable(void);
 unsigned long pv_native_read_cr2(void);
 #endif
 
-#define paravirt_nop	((void *)nop_func)
-
 #endif	/* __ASSEMBLER__ */
 
 #define ALT_NOT_XEN	ALT_NOT(X86_FEATURE_XENPV)
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
index 35d062a..7bb7bd9 100644
--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
@@ -172,7 +172,7 @@ struct pt_regs {
 #endif /* !__i386__ */
 
 #ifdef CONFIG_PARAVIRT
-#include <asm/paravirt_types.h>
+#include <asm/paravirt-base.h>
 #endif
 
 #include <asm/proto.h>

  reply	other threads:[~2026-01-14 10:40 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 11:04 [PATCH v5 00/21] paravirt: cleanup and reorg Juergen Gross
2026-01-05 11:05 ` [PATCH v5 01/21] x86/paravirt: Remove not needed includes of paravirt.h Juergen Gross
2026-01-13  6:55   ` Wei Liu
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 02/21] x86/paravirt: Remove some unneeded struct declarations Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 03/21] x86/paravirt: Remove PARAVIRT_DEBUG config option Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 04/21] x86/paravirt: Move thunk macros to paravirt_types.h Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 05/21] paravirt: Remove asm/paravirt_api_clock.h Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 06/21] sched: Move clock related paravirt code to kernel/sched Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 07/21] arm/paravirt: Use common code for paravirt_steal_clock() Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 08/21] arm64/paravirt: " Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 09/21] loongarch/paravirt: " Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 10/21] riscv/paravirt: " Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 11/21] x86/paravirt: " Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 12/21] x86/paravirt: Move paravirt_sched_clock() related code into tsc.c Juergen Gross
2026-01-13  6:56   ` Wei Liu
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 13/21] x86/paravirt: Introduce new paravirt-base.h header Juergen Gross
2026-01-14 10:40   ` tip-bot2 for Juergen Gross [this message]
2026-01-05 11:05 ` [PATCH v5 14/21] x86/paravirt: Move pv_native_*() prototypes to paravirt.c Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 15/21] x86/xen: Drop xen_irq_ops Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 16/21] x86/xen: Drop xen_cpu_ops Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 17/21] x86/xen: Drop xen_mmu_ops Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 18/21] objtool: Allow multiple pv_ops arrays Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 19/21] x86/paravirt: Allow pv-calls outside paravirt.h Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 20/21] x86/paravirt: Specify pv_ops array in paravirt macros Juergen Gross
2026-01-14 10:40   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-01-05 11:05 ` [PATCH v5 21/21] x86/pvlocks: Move paravirt spinlock functions into own header Juergen Gross
2026-01-13  6:57   ` Wei Liu
2026-01-14 10:39   ` [tip: x86/paravirt] " tip-bot2 for Juergen Gross
2026-02-20  4:10 ` [PATCH v5 00/21] paravirt: cleanup and reorg patchwork-bot+linux-riscv

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=176838720955.510.7093655202132540123.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bp@alien8.de \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®