Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Juergen Gross and committed by
Borislav Petkov (AMD)
d73298f0 e0b4904a

-16
-7
arch/x86/Kconfig
··· 809 809 bool 810 810 depends on X86_64 811 811 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 - 819 812 config PARAVIRT_SPINLOCKS 820 813 bool "Paravirtualization layer for spinlocks" 821 814 depends on PARAVIRT && SMP
-1
arch/x86/include/asm/paravirt.h
··· 12 12 #include <asm/nospec-branch.h> 13 13 14 14 #ifndef __ASSEMBLER__ 15 - #include <linux/bug.h> 16 15 #include <linux/types.h> 17 16 #include <linux/cpumask.h> 18 17 #include <linux/static_call_types.h>
-8
arch/x86/include/asm/paravirt_types.h
··· 354 354 #define VEXTRA_CLOBBERS , "rax", "r8", "r9", "r10", "r11" 355 355 #endif /* CONFIG_X86_32 */ 356 356 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 - 363 357 #define PVOP_RETVAL(rettype) \ 364 358 ({ unsigned long __mask = ~0UL; \ 365 359 BUILD_BUG_ON(sizeof(rettype) > sizeof(unsigned long)); \ ··· 382 388 #define ____PVOP_CALL(ret, op, call_clbr, extra_clbr, ...) \ 383 389 ({ \ 384 390 PVOP_CALL_ARGS; \ 385 - PVOP_TEST_NULL(op); \ 386 391 asm volatile(ALTERNATIVE(PARAVIRT_CALL, ALT_CALL_INSTR, \ 387 392 ALT_CALL_ALWAYS) \ 388 393 : call_clbr, ASM_CALL_CONSTRAINT \ ··· 395 402 extra_clbr, ...) \ 396 403 ({ \ 397 404 PVOP_CALL_ARGS; \ 398 - PVOP_TEST_NULL(op); \ 399 405 asm volatile(ALTERNATIVE_2(PARAVIRT_CALL, \ 400 406 ALT_CALL_INSTR, ALT_CALL_ALWAYS, \ 401 407 alt, cond) \