X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_ctrl_regs.c;fp=palacios%2Fsrc%2Fpalacios%2Fvmm_ctrl_regs.c;h=6473e4ae42d7085091cd53226371d3a6bf675a06;hb=9b78fe7d41b07fd135eae2282cc18ccb964e7de3;hp=44393550e83c8595f6d91d84fa27e540c48b9bce;hpb=af355c370ac80f8e19d6375cb3070213c29a92eb;p=palacios-OLD.git diff --git a/palacios/src/palacios/vmm_ctrl_regs.c b/palacios/src/palacios/vmm_ctrl_regs.c index 4439355..6473e4a 100644 --- a/palacios/src/palacios/vmm_ctrl_regs.c +++ b/palacios/src/palacios/vmm_ctrl_regs.c @@ -20,6 +20,13 @@ #endif +// Set to 1 if CR3 reload with same value shall not +// force a shadow page table flush +// It makes windows loading MUCH faster. +// Note that this optimization appears to fail with a 2.6 linux kernel +#define CR3_RELOAD_OPTIMIZATION 0 + + @@ -238,7 +245,7 @@ int handle_cr3_write(struct guest_info * info) { PrintDebug("Old Shadow CR3=%x; Old Guest CR3=%x\n", *(uint_t*)shadow_cr3, *(uint_t*)guest_cr3); - if (1 || !CR3_32_SAME_BASE(new_cr3, guest_cr3)) { + if (!CR3_RELOAD_OPTIMIZATION || !CR3_32_SAME_BASE(new_cr3, guest_cr3)) { addr_t shadow_pt;