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

[Xen-devel] [PATCH 2/7] arm: make processor-specific functions from traps.c globaly visible



From: Volodymyr Babchuk <vlad.babchuk@xxxxxxxxx>

The following list of functions:

 - advance_pc()
 - check_conditional_instr()
 - inject_undef_exception()
 - inject_iabt_exception()
 - inject_dabt_exception()
 - inject_vabt_exception()

are now globaly visible. This change is needed becase we plan to handle SMCs
in different file and handler code needs to alter state of a guest.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@xxxxxxxxx>
---
 xen/arch/arm/traps.c            | 16 ++++++----------
 xen/include/asm-arm/processor.h | 11 +++++++++++
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index ed78b36..0171c1c 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -616,8 +616,7 @@ static void inject_iabt64_exception(struct cpu_user_regs 
*regs,
 
 #endif
 
-static void inject_undef_exception(struct cpu_user_regs *regs,
-                                   const union hsr hsr)
+void inject_undef_exception(struct cpu_user_regs *regs, const union hsr hsr)
 {
         if ( is_32bit_domain(current->domain) )
             inject_undef32_exception(regs);
@@ -627,8 +626,7 @@ static void inject_undef_exception(struct cpu_user_regs 
*regs,
 #endif
 }
 
-static void inject_iabt_exception(struct cpu_user_regs *regs,
-                                  register_t addr,
+void inject_iabt_exception(struct cpu_user_regs *regs, register_t addr,
                                   int instr_len)
 {
         if ( is_32bit_domain(current->domain) )
@@ -639,8 +637,7 @@ static void inject_iabt_exception(struct cpu_user_regs 
*regs,
 #endif
 }
 
-static void inject_dabt_exception(struct cpu_user_regs *regs,
-                                  register_t addr,
+void inject_dabt_exception(struct cpu_user_regs *regs, register_t addr,
                                   int instr_len)
 {
         if ( is_32bit_domain(current->domain) )
@@ -652,7 +649,7 @@ static void inject_dabt_exception(struct cpu_user_regs 
*regs,
 }
 
 /* Inject a virtual Abort/SError into the guest. */
-static void inject_vabt_exception(struct cpu_user_regs *regs)
+void inject_vabt_exception(struct cpu_user_regs *regs)
 {
     const union hsr hsr = { .bits = regs->hsr };
 
@@ -1706,8 +1703,7 @@ static const unsigned short cc_map[16] = {
         0                       /* NV                     */
 };
 
-static int check_conditional_instr(struct cpu_user_regs *regs,
-                                   const union hsr hsr)
+int check_conditional_instr(struct cpu_user_regs *regs, const union hsr hsr)
 {
     unsigned long cpsr, cpsr_cond;
     int cond;
@@ -1752,7 +1748,7 @@ static int check_conditional_instr(struct cpu_user_regs 
*regs,
     return 1;
 }
 
-static void advance_pc(struct cpu_user_regs *regs, const union hsr hsr)
+void advance_pc(struct cpu_user_regs *regs, const union hsr hsr)
 {
     unsigned long itbits, cond, cpsr = regs->cpsr;
 
diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index 855ded1..6347048 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -686,6 +686,17 @@ void init_traps(void);
 
 void panic_PAR(uint64_t par);
 
+void advance_pc(struct cpu_user_regs *regs, const union hsr hsr);
+
+int check_conditional_instr(struct cpu_user_regs *regs, const union hsr hsr);
+
+void inject_undef_exception(struct cpu_user_regs *regs, const union hsr hsr);
+void inject_iabt_exception(struct cpu_user_regs *regs, register_t addr,
+                           int instr_len);
+void inject_dabt_exception(struct cpu_user_regs *regs, register_t addr,
+                           int instr_len);
+void inject_vabt_exception(struct cpu_user_regs *regs);
+
 void show_execution_state(struct cpu_user_regs *regs);
 void show_registers(struct cpu_user_regs *regs);
 //#define dump_execution_state() run_in_exception_handler(show_execution_state)
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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