]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/arm32: entry: Rename save_guest_regs()
authorJulien Grall <julien.grall@arm.com>
Wed, 30 Oct 2019 11:24:59 +0000 (11:24 +0000)
committerJulien Grall <julien.grall@arm.com>
Fri, 1 Nov 2019 14:29:57 +0000 (14:29 +0000)
The function save_guest_regs() is doing more than saving guest
registers. It also restore the vectors table and consume any pending
SErrors generated by the guest. So rename the function to
prepare_context_from_guest().

Take the opportunity to use ENDPROC() for the benefits of static
analizer and the reader.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/arm/arm32/entry.S

index 5abff24e913ff4d5d803689c96cb125ec556aa66..59a296a4add0f4719c156f335f514689a3e4dd46 100644 (file)
 #define RESTORE_BANKED(mode) \
         RESTORE_ONE_BANKED(SP_##mode) ; RESTORE_ONE_BANKED(LR_##mode) ; RESTORE_ONE_BANKED(SPSR_##mode)
 
-save_guest_regs:
+/*
+ * Actions that needs to be done after entering the hypervisor from the
+ * guest and before the interrupts are unmasked.
+ */
+prepare_context_from_guest:
 #ifdef CONFIG_ARM32_HARDEN_BRANCH_PREDICTOR
         /*
          * Restore vectors table to the default as it may have been
@@ -115,6 +119,7 @@ abort_guest_exit_end:
 
 skip_check:
         mov pc, lr
+ENDPROC(prepare_context_from_guest)
 
         /*
          * Macro to define a trap entry.
@@ -173,7 +178,7 @@ skip_check:
 
 1:
         /* Trap from the guest */
-        bl      save_guest_regs
+        bl      prepare_context_from_guest
         .if     \guest_iflags != n
         cpsie   \guest_iflags
         .endif
@@ -363,7 +368,7 @@ return_to_hypervisor:
          * HVBAR very late.
          *
          * Default vectors table will be restored on exit (see
-         * save_guest_regs).
+         * prepare_context_from_guest).
          */
         mov r9, #0                      /* vector tables = NULL */
         /*