Skip to content

Commit 574b3eb

Browse files
jgross1bp3tk0v
authored andcommitted
x86/paravirt: Move pv_native_*() prototypes to paravirt.c
The only reason the pv_native_*() prototypes are needed is the complete definition of those functions via an asm() statement, which makes it impossible to have those functions as static ones. Move the prototypes from paravirt_types.h into paravirt.c, which is the only source referencing the functions. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260105110520.21356-15-jgross@suse.com
1 parent f01b4f4 commit 574b3eb

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

arch/x86/include/asm/paravirt_types.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,6 @@ extern struct paravirt_patch_template pv_ops;
480480
__PVOP_VCALL(op, PVOP_CALL_ARG1(arg1), PVOP_CALL_ARG2(arg2), \
481481
PVOP_CALL_ARG3(arg3), PVOP_CALL_ARG4(arg4))
482482

483-
#ifdef CONFIG_PARAVIRT_XXL
484-
unsigned long pv_native_save_fl(void);
485-
void pv_native_irq_disable(void);
486-
void pv_native_irq_enable(void);
487-
unsigned long pv_native_read_cr2(void);
488-
#endif
489-
490483
#endif /* __ASSEMBLER__ */
491484

492485
#define ALT_NOT_XEN ALT_NOT(X86_FEATURE_XENPV)

arch/x86/kernel/paravirt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ void __init default_banner(void)
4545
}
4646

4747
#ifdef CONFIG_PARAVIRT_XXL
48+
unsigned long pv_native_save_fl(void);
49+
void pv_native_irq_disable(void);
50+
void pv_native_irq_enable(void);
51+
unsigned long pv_native_read_cr2(void);
52+
4853
DEFINE_ASM_FUNC(_paravirt_ident_64, "mov %rdi, %rax", .text);
4954
DEFINE_ASM_FUNC(pv_native_save_fl, "pushf; pop %rax", .noinstr.text);
5055
DEFINE_ASM_FUNC(pv_native_irq_disable, "cli", .noinstr.text);

0 commit comments

Comments
 (0)