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.
This commit is contained in:
Alexandru Dutu
2014-11-23 18:01:08 -08:00
parent adbaa4dfde
commit f743bdcb69
7 changed files with 504 additions and 94 deletions

View File

@@ -40,6 +40,7 @@ class Process(SimObject):
system = Param.System(Parent.any, "system process will run on")
useArchPT = Param.Bool('false', 'maintain an in-memory version of the page\
table in an architecture-specific format')
kvmInSE = Param.Bool('false', 'initialize the process for KvmCPU in SE')
max_stack_size = Param.MemorySize('64MB', 'maximum size of the stack')
@classmethod