[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] x86/traps: use only one stub function for l/cstar



commit a34eb9ff15a3938c0210bc3f728e57d7ea449330
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri Nov 9 10:46:36 2018 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Nov 9 11:33:32 2018 +0000

    x86/traps: use only one stub function for l/cstar
    
    And place it into .text.cold.
    
    Requested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/x86_64/traps.c | 11 ++++-------
 xen/include/xen/init.h      |  1 +
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index 4d506e2c18..bf7870ef6d 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -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)
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index db06c76fdf..c6b453adfe 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -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")
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.