From 2950a95672599a9baf9007c18faf210ff9c3e392 Mon Sep 17 00:00:00 2001 From: Dylan Johnson Date: Tue, 2 Aug 2016 10:38:02 +0100 Subject: arm: Add AArch64 hypervisor call instruction 'hvc' This patch adds the AArch64 instruction hvc which raises an exception from EL1 into EL2. The host OS uses this instruction to world switch into the guest. Change-Id: I930ee43f4f0abd4b35a68eb2a72e44e3ea6570be --- src/arch/arm/faults.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch/arm/faults.cc') diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc index e7a461ef6..061e1299a 100644 --- a/src/arch/arm/faults.cc +++ b/src/arch/arm/faults.cc @@ -840,6 +840,12 @@ HypervisorCall::HypervisorCall(ExtMachInst _machInst, uint32_t _imm) : ArmFaultVals(_machInst, _imm) {} +ExceptionClass +HypervisorCall::ec(ThreadContext *tc) const +{ + return from64 ? EC_HVC_64 : vals.ec; +} + ExceptionClass HypervisorTrap::ec(ThreadContext *tc) const { -- cgit v1.2.3