X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm.c;h=b7f45cdd1e239cf95b759ff40b6f84c8d059a2da;hb=b58fe2254858e3ecc94be5d86f2a93f2cfe0a0d5;hp=b291adad6538e6da7b2cf1710d096a995ecdcc75;hpb=8e4b89f4bc2e252e0c1bc7cbc52bf1f4ae2e538c;p=palacios.git diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index b291ada..b7f45cd 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -154,6 +154,10 @@ void Init_V3(struct v3_os_hooks * hooks, char * cpu_mask, int num_cpus, char *op // Parse host-os defined options into an easily-accessed format. v3_parse_options(options); +#ifdef V3_CONFIG_HVM + v3_init_hvm(); +#endif + // Memory manager initialization v3_init_mem(); @@ -255,6 +259,10 @@ void Shutdown_V3() { v3_deinit_mem(); +#ifdef V3_CONFIG_HVM + v3_deinit_hvm(); +#endif + v3_deinit_options(); @@ -377,6 +385,12 @@ int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask) { return -1; } +#if V3_CONFIG_HVM + if (v3_setup_hvm_vm_for_boot(vm)) { + PrintError(vm, VCORE_NONE, "HVM setup for boot failed\n"); + return -1; + } +#endif /// CHECK IF WE ARE MULTICORE ENABLED.... @@ -602,7 +616,7 @@ int v3_move_vm_mem(struct v3_vm_info * vm, void *gpa, int target_cpu) { new_hpa = V3_AllocPagesExtended(num_pages, PAGE_SIZE_4KB, new_node, - 0); // no constraints given new shadow pager impl + 0, 0); // no constraints given new shadow pager impl if (!new_hpa) { PrintError(vm, VCORE_NONE, "Cannot allocate memory for new base region...\n"); @@ -909,7 +923,7 @@ int v3_get_state_vm(struct v3_vm_info *vm, core->num_vcores=numcores; - for (i=0;imem_map.num_base_regions;i++) { + for (i=0;iregion[i].host_paddr = (void*)(vm->mem_map.base_regions[i].host_addr); mem->region[i].size = v3_mem_block_size; #ifdef V3_CONFIG_SWAPPING