On 03.01.19 18:26, Ralf Ramsauer wrote:
Hi Jan,

On 1/3/19 5:45 PM, Jan Kiszka wrote:
On 03.01.19 00:12, Ralf Ramsauer wrote:
This is the second step to get rid of arch_handle_exit(). There's no
need to
call vmreturn() from arch_handle_exit(). Let's move this to assembly.

Signed-off-by: Ralf Ramsauer <[email protected]>
---
   hypervisor/arch/arm64/entry.S | 4 +++-
   hypervisor/arch/arm64/traps.c | 2 +-
   2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/arm64/entry.S
b/hypervisor/arch/arm64/entry.S
index 97033e91..464386d9 100644
--- a/hypervisor/arch/arm64/entry.S
+++ b/hypervisor/arch/arm64/entry.S
@@ -315,7 +315,8 @@ bootstrap_vectors:
       mov    x30, xzr
       mov    x0, sp
       bl    arch_handle_exit
-    b    .
+    /* take the fast exit path, sp is already in place */
+    b    __vmreturn
   .endm
         .align 11
@@ -413,6 +414,7 @@ shutdown_el2:
   vmreturn:
       /* x0: union registers* */
       mov    sp, x0
+__vmreturn:

You missed my comment:

The only remaining caller of vmreturn is arch_cpu_activate_vmm() which
is not really a hot-path.

Ack, understood.

I would suggest to make the common case jump
free and let vmreturn jump here instead.

I don't get this comment, could you clarify it a bit? What do you mean
with "common case jump free"?

If you mean the hyp_vectors with common case (fast path), then I can't
get them jump free, as the interrupt vectors don't have enough space for
the code.

Ah, the jump starting point is a macro! Ok, then my comment makes no sense 
anymore.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to