From f743bdcb6994a4e0e413e1a3499f7424b5ec2efa Mon Sep 17 00:00:00 2001 From: Alexandru Dutu Date: Sun, 23 Nov 2014 18:01:08 -0800 Subject: x86: Segment initialization to support KvmCPU in SE This patch sets up low and high privilege code and data segments and places them in the following order: cs low, ds low, ds, cs, in the GDT. Additionally, a syscall and page fault handler for KvmCPU in SE mode are defined. The order of the segment selectors in GDT is required in this manner for interrupt handling to work properly. Segment initialization is done for all the thread contexts. --- src/sim/process.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sim/process.cc') diff --git a/src/sim/process.cc b/src/sim/process.cc index d1fb22029..f53c6b850 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -107,6 +107,7 @@ Process::Process(ProcessParams * params) max_stack_size(params->max_stack_size), M5_pid(system->allocatePID()), useArchPT(params->useArchPT), + kvmInSE(params->kvmInSE), pTable(useArchPT ? static_cast(new ArchPageTable(name(), M5_pid, system)) : static_cast(new FuncPageTable(name(), M5_pid)) ), -- cgit v1.2.3