x86/traps: use only one stub function for l/cstar
PATCH v2 1/1 x86/traps: use only one stub function for l/cstar
And place it into .text.cold.
Requested-by Jan Beulich <[email protected]>
Signed-off-by Wei Liu <[email protected]>
---
v2: use #define
--- xen/arch/x86/x86_64/traps.c | 11 ++++------- xen/include/xen/init.h | 1 + 2 files changed, 5 insertions(+), 7 deletions(-)
xen/arch/x86/x86_64/traps.c +4 -7
@@ -303,15 +303,12 @@ DEFINE_PER_CPU(struct stubs, stubs);void lstar_enter (void );void cstar_enter (void );#else -static inline void lstar_enter (void ) +static void __cold star_enter (void ) { -panic ("%s called\n" , __func__); -} - -static inline void cstar_enter (void ) -{ -panic ("%s called\n" , __func__); +panic ("lstar/cstar\n" ); } +#define lstar_enter star_enter +#define cstar_enter star_enter#endif /* CONFIG_PV */ void subarch_percpu_traps_init (void )
xen/include/xen/init.h +1 -0
@@ -9,6 +9,7 @@*/ #define __init __text_section(".init.text")#define __exit __text_section(".exit.text") +#define __cold __text_section(".text.cold")#define __initdata __section(".init.data")#define __initconst __section(".init.rodata")#define __initconstrel __section(".init.rodata.rel")
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 09.11.18 at 11:46, <[email protected]> wrote:
And place it into .text.cold.
Requested-by Jan Beulich <[email protected]>Signed-off-by Wei Liu <[email protected]>
Reviewed-by Jan Beulich <[email protected]>
Thanks for doing this.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel