Skip to content

Commit

Permalink
Fixed get_curr_vm() for real
Browse files Browse the repository at this point in the history
  • Loading branch information
didriklundberg committed Aug 6, 2015
1 parent f671c31 commit 4ef6bbb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/hypervisor/init_slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ virtual_machine vm_0;
virtual_machine vm_1;
virtual_machine vm_2;
virtual_machine vm_3;
virtual_machine vms[4];
virtual_machine* vms[4];
virtual_machine *curr_vm;

//Add what you need here in terms of external functions and imports to be able
Expand All @@ -41,10 +41,16 @@ void guests_init_multicore(){
vm_3.id = 3;

//The virtual machines are stored in some sort of linked list.
//TODO: As long as we have an hard-coded array this linked list seems
//pointless...
vm_0.next = &vm_1;
vm_1.next = &vm_2;
vm_2.next = &vm_3;
vm_3.next = &vm_0;
vms[0] = &vm_0;
vms[1] = &vm_1;
vms[2] = &vm_2;
vms[3] = &vm_3;

//printf("HV pagetable before guests initialization:\n"); //DEBUG
//dump_mmu(flpt_va); //DEBUG
Expand Down

0 comments on commit 4ef6bbb

Please sign in to comment.