Skip to content

Commit d73298f

Browse files
jgross1bp3tk0v
authored andcommitted
x86/paravirt: Remove PARAVIRT_DEBUG config option
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
1 parent e0b4904 commit d73298f

3 files changed

Lines changed: 0 additions & 16 deletions

File tree

arch/x86/Kconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -809,13 +809,6 @@ config PARAVIRT_XXL
809809
bool
810810
depends on X86_64
811811

812-
config PARAVIRT_DEBUG
813-
bool "paravirt-ops debugging"
814-
depends on PARAVIRT && DEBUG_KERNEL
815-
help
816-
Enable to debug paravirt_ops internals. Specifically, BUG if
817-
a paravirt_op is missing when it is called.
818-
819812
config PARAVIRT_SPINLOCKS
820813
bool "Paravirtualization layer for spinlocks"
821814
depends on PARAVIRT && SMP

arch/x86/include/asm/paravirt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <asm/nospec-branch.h>
1313

1414
#ifndef __ASSEMBLER__
15-
#include <linux/bug.h>
1615
#include <linux/types.h>
1716
#include <linux/cpumask.h>
1817
#include <linux/static_call_types.h>

arch/x86/include/asm/paravirt_types.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,6 @@ extern struct paravirt_patch_template pv_ops;
354354
#define VEXTRA_CLOBBERS , "rax", "r8", "r9", "r10", "r11"
355355
#endif /* CONFIG_X86_32 */
356356

357-
#ifdef CONFIG_PARAVIRT_DEBUG
358-
#define PVOP_TEST_NULL(op) BUG_ON(pv_ops.op == NULL)
359-
#else
360-
#define PVOP_TEST_NULL(op) ((void)pv_ops.op)
361-
#endif
362-
363357
#define PVOP_RETVAL(rettype) \
364358
({ unsigned long __mask = ~0UL; \
365359
BUILD_BUG_ON(sizeof(rettype) > sizeof(unsigned long)); \
@@ -388,7 +382,6 @@ extern struct paravirt_patch_template pv_ops;
388382
#define ____PVOP_CALL(ret, op, call_clbr, extra_clbr, ...) \
389383
({ \
390384
PVOP_CALL_ARGS; \
391-
PVOP_TEST_NULL(op); \
392385
asm volatile(ALTERNATIVE(PARAVIRT_CALL, ALT_CALL_INSTR, \
393386
ALT_CALL_ALWAYS) \
394387
: call_clbr, ASM_CALL_CONSTRAINT \
@@ -402,7 +395,6 @@ extern struct paravirt_patch_template pv_ops;
402395
extra_clbr, ...) \
403396
({ \
404397
PVOP_CALL_ARGS; \
405-
PVOP_TEST_NULL(op); \
406398
asm volatile(ALTERNATIVE_2(PARAVIRT_CALL, \
407399
ALT_CALL_INSTR, ALT_CALL_ALWAYS, \
408400
alt, cond) \

0 commit comments

Comments
 (0)