public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org,
	virtualization@lists.linux.dev
Cc: Juergen Gross <jgross@suse.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Ajay Kaher <ajay.kaher@broadcom.com>,
	Alexey Makhalov <alexey.makhalov@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>
Subject: [PATCH v3 03/21] x86/paravirt: Remove PARAVIRT_DEBUG config option
Date: Mon,  6 Oct 2025 09:45:48 +0200	[thread overview]
Message-ID: <20251006074606.1266-4-jgross@suse.com> (raw)
In-Reply-To: <20251006074606.1266-1-jgross@suse.com>

The only effect of CONFIG_PARAVIRT_DEBUG set is that instead of doing
a call using a NULL pointer a BUG() is being raised.

While the BUG() will be a little bit easier to analyse, the call of
NULL isn't really that difficult to find the reason for.

Remove the config option to make paravirt coding a little bit less
annoying.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/Kconfig                      | 7 -------
 arch/x86/include/asm/paravirt.h       | 1 -
 arch/x86/include/asm/paravirt_types.h | 8 --------
 3 files changed, 16 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 9d034a987c6e..451c3adffacb 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -809,13 +809,6 @@ config PARAVIRT_XXL
 	bool
 	depends on X86_64
 
-config PARAVIRT_DEBUG
-	bool "paravirt-ops debugging"
-	depends on PARAVIRT && DEBUG_KERNEL
-	help
-	  Enable to debug paravirt_ops internals.  Specifically, BUG if
-	  a paravirt_op is missing when it is called.
-
 config PARAVIRT_SPINLOCKS
 	bool "Paravirtualization layer for spinlocks"
 	depends on PARAVIRT && SMP
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 612b3df65b1b..fd9826397419 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -12,7 +12,6 @@
 #include <asm/nospec-branch.h>
 
 #ifndef __ASSEMBLER__
-#include <linux/bug.h>
 #include <linux/types.h>
 #include <linux/cpumask.h>
 #include <linux/static_call_types.h>
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index 84cc8c95713b..085095f94f97 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -354,12 +354,6 @@ extern struct paravirt_patch_template pv_ops;
 #define VEXTRA_CLOBBERS	 , "rax", "r8", "r9", "r10", "r11"
 #endif	/* CONFIG_X86_32 */
 
-#ifdef CONFIG_PARAVIRT_DEBUG
-#define PVOP_TEST_NULL(op)	BUG_ON(pv_ops.op == NULL)
-#else
-#define PVOP_TEST_NULL(op)	((void)pv_ops.op)
-#endif
-
 #define PVOP_RETVAL(rettype)						\
 	({	unsigned long __mask = ~0UL;				\
 		BUILD_BUG_ON(sizeof(rettype) > sizeof(unsigned long));	\
@@ -388,7 +382,6 @@ extern struct paravirt_patch_template pv_ops;
 #define ____PVOP_CALL(ret, op, call_clbr, extra_clbr, ...)	\
 	({								\
 		PVOP_CALL_ARGS;						\
-		PVOP_TEST_NULL(op);					\
 		asm volatile(ALTERNATIVE(PARAVIRT_CALL, ALT_CALL_INSTR,	\
 				ALT_CALL_ALWAYS)			\
 			     : call_clbr, ASM_CALL_CONSTRAINT		\
@@ -402,7 +395,6 @@ extern struct paravirt_patch_template pv_ops;
 			  extra_clbr, ...)				\
 	({								\
 		PVOP_CALL_ARGS;						\
-		PVOP_TEST_NULL(op);					\
 		asm volatile(ALTERNATIVE_2(PARAVIRT_CALL,		\
 				 ALT_CALL_INSTR, ALT_CALL_ALWAYS,	\
 				 alt, cond)				\
-- 
2.51.0


  parent reply	other threads:[~2025-10-06  7:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06  7:45 [PATCH v3 00/21] paravirt: cleanup and reorg Juergen Gross
2025-10-06  7:45 ` [PATCH v3 02/21] x86/paravirt: Remove some unneeded struct declarations Juergen Gross
2025-10-23 12:14   ` Borislav Petkov
2025-10-06  7:45 ` Juergen Gross [this message]
2025-10-06  7:45 ` [PATCH v3 04/21] x86/paravirt: Move thunk macros to paravirt_types.h Juergen Gross
2025-10-06  7:45 ` [PATCH v3 05/21] paravirt: Remove asm/paravirt_api_clock.h Juergen Gross
2025-10-15 16:02   ` Shrikanth Hegde
2025-10-06  7:45 ` [PATCH v3 06/21] sched: Move clock related paravirt code to kernel/sched Juergen Gross
2026-01-07 22:48   ` Alexey Makhalov
2025-10-06  7:45 ` [PATCH v3 07/21] arm/paravirt: Use common code for paravirt_steal_clock() Juergen Gross
2025-10-06  7:45 ` [PATCH v3 08/21] arm64/paravirt: " Juergen Gross
2025-10-06  7:45 ` [PATCH v3 09/21] loongarch/paravirt: " Juergen Gross
2025-11-24  9:52   ` Bibo Mao
2025-10-06  7:45 ` [PATCH v3 10/21] riscv/paravirt: " Juergen Gross
2025-10-06  7:45 ` [PATCH v3 11/21] x86/paravirt: " Juergen Gross
2025-10-06  7:45 ` [PATCH v3 12/21] x86/paravirt: Move paravirt_sched_clock() related code into tsc.c Juergen Gross
2025-10-06  7:45 ` [PATCH v3 13/21] x86/paravirt: Introduce new paravirt-base.h header Juergen Gross
2025-10-06  7:45 ` [PATCH v3 14/21] x86/paravirt: Move pv_native_*() prototypes to paravirt.c Juergen Gross
2025-10-06  7:46 ` [PATCH v3 19/21] x86/paravirt: Allow pv-calls outside paravirt.h Juergen Gross
2025-10-06  7:46 ` [PATCH v3 20/21] x86/paravirt: Specify pv_ops array in paravirt macros Juergen Gross
2025-10-06  7:46 ` [PATCH v3 21/21] x86/pvlocks: Move paravirt spinlock functions into own header Juergen Gross
2025-10-15  8:53   ` kernel test robot
2025-11-24  9:42 ` [PATCH v3 00/21] paravirt: cleanup and reorg Juergen Gross
2026-02-20  4:10 ` 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=20251006074606.1266-4-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=ajay.kaher@broadcom.com \
    --cc=alexey.makhalov@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux.dev \
    --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