X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_shadow_paging.c;h=65d19ee6fd49af042d66014bed43d2b66645b748;hb=cb991b28aeea489c74e7f2f024a1de88da4a9d1c;hp=434b34ed556b95ee36699015d357186fe344173b;hpb=6adf4a960b1a2999fa47f5e29e7583cfdf4d3b6f;p=palacios.git diff --git a/palacios/src/palacios/vmm_shadow_paging.c b/palacios/src/palacios/vmm_shadow_paging.c index 434b34e..65d19ee 100644 --- a/palacios/src/palacios/vmm_shadow_paging.c +++ b/palacios/src/palacios/vmm_shadow_paging.c @@ -47,6 +47,8 @@ #endif +static const char default_strategy[] = "VTLB"; + static struct hashtable * master_shdw_pg_table = NULL; @@ -146,10 +148,14 @@ int v3_init_shdw_impl(struct v3_vm_info * vm) { struct v3_shdw_pg_impl * impl = NULL; PrintDebug("Checking if shadow paging requested.\n"); - if (pg_mode && (strcasecmp(pg_mode, "nested") == 0)) { + if ((pg_mode != NULL) && (strcasecmp(pg_mode, "nested") == 0)) { PrintDebug("Nested paging specified - not initializing shadow paging.\n"); return 0; } + + if (pg_strat == NULL) { + pg_strat = (char *)default_strategy; + } V3_Print("Initialization of Shadow Paging implementation\n");