]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/paravirt: Remove PARAVIRT_DEBUG config option
authorJuergen Gross <jgross@suse.com>
Mon, 5 Jan 2026 11:05:02 +0000 (12:05 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 12 Jan 2026 14:20:06 +0000 (15:20 +0100)
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>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260105110520.21356-4-jgross@suse.com
arch/x86/Kconfig
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h

index 80527299f859aaab7e357f59a410ac436daafd1f..1f30358dfecd6408cdf4a6f8102ea1b4530ceb6a 100644 (file)
@@ -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
index 612b3df65b1b43885cc67cdba0fbb70a2eabd621..fd9826397419c09295a8344318b03a147f713bec 100644 (file)
@@ -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>
index 09ec8dc574a9686c727d80df3566404d0be644a0..bd83528835e9cf2d12891cebab0f78f963549eee 100644 (file)
@@ -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)                             \