X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmx.c;h=e733eb5500aa331f45168e174761a4ac0d2e763b;hb=94429f4b9268cf4d5f86dee5c3d929110811ac80;hp=aa821daee83534a9be6022d2ff7cc9711821d9ce;hpb=6ee36e0a7e4585bd0e4235eeb60644fffe230af3;p=palacios.git diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index aa821da..e733eb5 100644 --- a/palacios/src/palacios/vmx.c +++ b/palacios/src/palacios/vmx.c @@ -594,7 +594,12 @@ int v3_vmx_load_core(struct guest_info * core, void * ctx){ /* Get the CPU mode to set the guest_ia32e entry ctrl */ if (core->shdw_pg_mode == SHADOW_PAGING) { - if (shadow_cr0->pg){ + if (v3_get_vm_mem_mode(core) == VIRTUAL_MEM) { + if (v3_activate_shadow_pt(core) == -1) { + PrintError("Failed to activate shadow page tables\n"); + return -1; + } + } else { if (v3_activate_passthrough_pt(core) == -1) { PrintError("Failed to activate passthrough page tables\n"); return -1; @@ -950,6 +955,9 @@ int v3_start_vmx_guest(struct guest_info * info) { } PrintDebug("VMX core %u initialized\n", info->vcpu_id); + + // We'll be paranoid about race conditions here + v3_wait_at_barrier(info); }