xref: /linux/arch/x86/include/asm/paravirt-base.h (revision 53597deca0e38c30e6cd4ba2114fa42d2bcd85bb)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _ASM_X86_PARAVIRT_BASE_H
4 #define _ASM_X86_PARAVIRT_BASE_H
5 
6 /*
7  * Wrapper type for pointers to code which uses the non-standard
8  * calling convention.  See PV_CALL_SAVE_REGS_THUNK below.
9  */
10 struct paravirt_callee_save {
11 	void *func;
12 };
13 
14 struct pv_info {
15 #ifdef CONFIG_PARAVIRT_XXL
16 	u16 extra_user_64bit_cs;  /* __USER_CS if none */
17 #endif
18 	bool io_delay;
19 
20 	const char *name;
21 };
22 
23 void default_banner(void);
24 extern struct pv_info pv_info;
25 unsigned long paravirt_ret0(void);
26 #ifdef CONFIG_PARAVIRT_XXL
27 u64 _paravirt_ident_64(u64);
28 #endif
29 #define paravirt_nop	((void *)nop_func)
30 
31 #ifdef CONFIG_PARAVIRT
32 #define call_io_delay() pv_info.io_delay
33 #endif
34 
35 #ifdef CONFIG_PARAVIRT_SPINLOCKS
36 void paravirt_set_cap(void);
37 #else
38 static inline void paravirt_set_cap(void) { }
39 #endif
40 
41 #endif /* _ASM_X86_PARAVIRT_BASE_H */
42