X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmx.c;h=c7c66c5ca1bec506cc954dcff8be8edc83fae887;hp=aa821daee83534a9be6022d2ff7cc9711821d9ce;hb=ffd7f29879c462eed95a44b5c6570644280ce388;hpb=7b65dde682be91eaf30932302dcd998e9681c2c3 diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index aa821da..c7c66c5 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;