[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250911063433.13783-4-jgross@suse.com>
Date: Thu, 11 Sep 2025 08:34:22 +0200
From: Juergen Gross <jgross@...e.com>
To: linux-kernel@...r.kernel.org,
x86@...nel.org,
virtualization@...ts.linux.dev
Cc: Juergen Gross <jgross@...e.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Ajay Kaher <ajay.kaher@...adcom.com>,
Alexey Makhalov <alexey.makhalov@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
Subject: [PATCH 03/14] 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@...e.com>
---
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 58d890fe2100..07bf67b849b7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -794,13 +794,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 b5e59a7ba0d0..99291f3123a9 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -16,7 +16,6 @@ struct mm_struct;
#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
Powered by blists - more mailing lists