commit | 2f94ec1226604bfcd72e956635ad7b9503248d31 | [log] [tgz] |
---|---|---|
author | Wedson Almeida Filho <wedsonaf@google.com> | Thu Jul 26 16:00:48 2018 +0100 |
committer | Wedson Almeida Filho <wedsonaf@google.com> | Thu Jul 26 16:04:14 2018 +0100 |
tree | 697355f41b453025a0a6e090c3cb529722c6ff09 | |
parent | f8fbf956a330137ff8dd9df57971351e9c016411 [diff] [blame] |
Add api for communication betwen primary and secondary VMs.
diff --git a/src/vm.c b/src/vm.c index b1d26c9..cadda86 100644 --- a/src/vm.c +++ b/src/vm.c
@@ -1,12 +1,16 @@ #include "vm.h" #include "cpu.h" +#include "std.h" bool vm_init(struct vm *vm, uint32_t id, uint32_t vcpu_count) { uint32_t i; + memset(vm, 0, sizeof(*vm)); + vm->vcpu_count = vcpu_count; + vm->rpc.state = rpc_state_idle; /* Do basic initialization of vcpus. */ for (i = 0; i < vcpu_count; i++) {