summaryrefslogtreecommitdiff
path: root/src/sim/pseudo_inst.cc
diff options
context:
space:
mode:
authorAlexandru Dutu <alexandru.dutu@amd.com>2014-11-23 18:01:08 -0800
committerAlexandru Dutu <alexandru.dutu@amd.com>2014-11-23 18:01:08 -0800
commitadbaa4dfde96d5aaf84adf0ae4989ef880aad726 (patch)
treed0f597266fc27c9b7bfa36312fee1de1fea6c450 /src/sim/pseudo_inst.cc
parent335514dfdc63c6f8e34cc172e2582ceca548a07c (diff)
downloadgem5-adbaa4dfde96d5aaf84adf0ae4989ef880aad726.tar.xz
kvm, x86: Adding support for SE mode execution
This patch adds methods in KvmCPU model to handle KVM exits caused by syscall instructions and page faults. These types of exits will be encountered if KvmCPU is run in SE mode.
Diffstat (limited to 'src/sim/pseudo_inst.cc')
-rw-r--r--src/sim/pseudo_inst.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index e85e3d19a..80737003c 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -52,6 +52,7 @@
#include "arch/kernel_stats.hh"
#include "arch/utility.hh"
#include "arch/vtophys.hh"
+#include "arch/pseudo_inst.hh"
#include "base/debug.hh"
#include "base/output.hh"
#include "config/the_isa.hh"
@@ -64,6 +65,7 @@
#include "debug/WorkItems.hh"
#include "params/BaseCPU.hh"
#include "sim/full_system.hh"
+#include "sim/process.hh"
#include "sim/pseudo_inst.hh"
#include "sim/serialize.hh"
#include "sim/sim_events.hh"
@@ -198,6 +200,15 @@ pseudoInst(ThreadContext *tc, uint8_t func, uint8_t subfunc)
warn("Unimplemented m5 op (0x%x)\n", func);
break;
+ /* SE mode functions */
+ case 0x60: // syscall_func
+ m5Syscall(tc);
+ break;
+
+ case 0x61: // pagefault_func
+ m5PageFault(tc);
+ break;
+
default:
warn("Unhandled m5 op: 0x%x\n", func);
break;