mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 03:45:24 +00:00
parent
c732aef227
commit
1bea312ba2
@ -57,7 +57,8 @@ class Vmm::Vcpu_other_pd : public Vmm::Vcpu_thread
|
||||
public:
|
||||
|
||||
Vcpu_other_pd(Cpu_session * cpu_session,
|
||||
Genode::Affinity::Location location)
|
||||
Genode::Affinity::Location location,
|
||||
Genode::size_t = 0 /* stack_size */)
|
||||
:
|
||||
_pd_session("VM"), _location(location), _cpu_session(cpu_session),
|
||||
_exc_pt_sel(Genode::cap_map()->insert(Nova::NUM_INITIAL_VCPU_PT_LOG2))
|
||||
@ -112,8 +113,9 @@ class Vmm::Vcpu_same_pd : public Vmm::Vcpu_thread, Genode::Thread
|
||||
|
||||
public:
|
||||
|
||||
Vcpu_same_pd(Genode::size_t stack_size, Cpu_session * cpu_session,
|
||||
Genode::Affinity::Location location)
|
||||
Vcpu_same_pd(Cpu_session * cpu_session,
|
||||
Genode::Affinity::Location location,
|
||||
Genode::size_t stack_size)
|
||||
:
|
||||
Thread(WEIGHT, "vCPU", stack_size, Type::NORMAL, cpu_session, location)
|
||||
{
|
||||
|
@ -34,7 +34,9 @@ append qemu_args " -m 512 "
|
||||
append qemu_args " -cpu phenom "
|
||||
append qemu_args " -nographic "
|
||||
|
||||
run_genode_until {.*VMM: vcpu1 _svm_startup called.*\n} 30
|
||||
run_genode_until {.*VMM: vcpu2 _svm_startup called.*\n} 10 [output_spawn_id]
|
||||
run_genode_until {.*VMM: vcpu_s_1 _svm_startup called.*\n} 30
|
||||
run_genode_until {.*VMM: vcpu_s_2 _svm_startup called.*\n} 10 [output_spawn_id]
|
||||
run_genode_until {.*VMM: vcpu_o_1 _svm_startup called.*\n} 10 [output_spawn_id]
|
||||
run_genode_until {.*VMM: vcpu_o_2 _svm_startup called.*\n} 10 [output_spawn_id]
|
||||
|
||||
puts "Test succeeded"
|
||||
|
@ -949,7 +949,7 @@ class Machine : public StaticReceiver<Machine>
|
||||
|
||||
Vmm::Vcpu_thread * vcpu_thread;
|
||||
if (_colocate_vm_vmm)
|
||||
vcpu_thread = new Vmm::Vcpu_same_pd(Vcpu_dispatcher::STACK_SIZE, cpu_session, location);
|
||||
vcpu_thread = new Vmm::Vcpu_same_pd(cpu_session, location, Vcpu_dispatcher::STACK_SIZE);
|
||||
else
|
||||
vcpu_thread = new Vmm::Vcpu_other_pd(cpu_session, location);
|
||||
|
||||
|
@ -60,7 +60,7 @@ class Vcpu_dispatcher : public Vmm::Vcpu_dispatcher<Genode::Thread>
|
||||
Vmm::Vcpu_dispatcher<Genode::Thread>(env, STACK_SIZE, &env.cpu(),
|
||||
Genode::Affinity::Location(),
|
||||
name),
|
||||
_vcpu_thread(STACK_SIZE, &env.cpu(), Genode::Affinity::Location())
|
||||
_vcpu_thread(&env.cpu(), Genode::Affinity::Location(), STACK_SIZE)
|
||||
{
|
||||
using namespace Nova;
|
||||
|
||||
@ -85,8 +85,13 @@ class Vcpu_dispatcher : public Vmm::Vcpu_dispatcher<Genode::Thread>
|
||||
|
||||
void Component::construct(Genode::Env &env)
|
||||
{
|
||||
typedef Vcpu_dispatcher<Vmm::Vcpu_same_pd> Vcpu;
|
||||
typedef Vcpu_dispatcher<Vmm::Vcpu_same_pd> Vcpu_s;
|
||||
|
||||
static Vcpu vcpu(env, Vcpu::SVM, "vcpu1");
|
||||
static Vcpu vcpu2(env, Vcpu::SVM, "vcpu2");
|
||||
static Vcpu_s vcpu_s_1(env, Vcpu_s::SVM, "vcpu_s_1");
|
||||
static Vcpu_s vcpu_s_2(env, Vcpu_s::SVM, "vcpu_s_2");
|
||||
|
||||
typedef Vcpu_dispatcher<Vmm::Vcpu_other_pd> Vcpu_o;
|
||||
|
||||
static Vcpu_o vcpu_o_1(env, Vcpu_o::SVM, "vcpu_o_1");
|
||||
static Vcpu_o vcpu_o_2(env, Vcpu_o::SVM, "vcpu_o_2");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user