Separation of thread operations from CPU session

This patch moves the thread operations from the 'Cpu_session'
to the 'Cpu_thread' interface.

A noteworthy semantic change is the meaning of the former
'exception_handler' function, which used to define both, the default
exception handler or a thread-specific signal handler. Now, the
'Cpu_session::exception_sigh' function defines the CPU-session-wide
default handler whereas the 'Cpu_thread::exception_sigh' function
defines the thread-specific one.

To retain the ability to create 'Child' objects without invoking a
capability, the child's initial thread must be created outside the
'Child::Process'. It is now represented by the 'Child::Initial_thread',
which is passed as argument to the 'Child' constructor.

Fixes #1939
This commit is contained in:
Norman Feske
2016-05-10 18:05:38 +02:00
committed by Christian Helmuth
parent 59aec6114b
commit a99989af40
66 changed files with 1261 additions and 1384 deletions

View File

@@ -23,6 +23,7 @@
#include <pd_session/connection.h>
#include <region_map/client.h>
#include <nova_native_cpu/client.h>
#include <cpu_thread/client.h>
/* NOVA includes */
#include <nova/native_thread.h>
@@ -76,7 +77,9 @@ class Vmm::Vcpu_other_pd : public Vmm::Vcpu_thread
state.sel_exc_base = Native_thread::INVALID_INDEX;
state.is_vcpu = true;
_cpu_session->state(vcpu_vm, state);
Cpu_thread_client cpu_thread(vcpu_vm);
cpu_thread.state(state);
/* obtain interface to NOVA-specific CPU session operations */
Nova_native_cpu_client native_cpu(_cpu_session->native_cpu());
@@ -91,7 +94,7 @@ class Vmm::Vcpu_other_pd : public Vmm::Vcpu_thread
delegate_vcpu_portals(pager_cap, exc_base());
/* start vCPU in separate PD */
_cpu_session->start(vcpu_vm, 0, 0);
cpu_thread.start(0, 0);
/*
* Request native EC thread cap and put it next to the