From 082b141e663934a0b57a52da04efec21840beba0 Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Tue, 16 Jun 2015 10:26:53 +0200 Subject: [PATCH] hw_x86_64: Add _vt_vm_entry to x86_64 mode transition The entry enables interrupts and initiates a handover to the guest VM by invoking event number one. The sti instruction is placed at the start to allow exits to Muen before handing off to the VM if window exiting is requested. Issue #2016 --- repos/base-hw/src/core/spec/x86_64/mode_transition.s | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/repos/base-hw/src/core/spec/x86_64/mode_transition.s b/repos/base-hw/src/core/spec/x86_64/mode_transition.s index 52f1d1bc2..330322421 100644 --- a/repos/base-hw/src/core/spec/x86_64/mode_transition.s +++ b/repos/base-hw/src/core/spec/x86_64/mode_transition.s @@ -246,6 +246,14 @@ iretq + /* VM entry: Switch to guest VM */ + + .global _vt_vm_entry + _vt_vm_entry: + sti + mov $1, %rax + vmcall + /************************************************ ** Space for Interrupt Descriptor Table (IDT) ** ** See Intel SDM Vol. 3A, section 6.10 **