From: Jack Lange Date: Fri, 6 Nov 2009 20:31:51 +0000 (-0600) Subject: macro'd out cr3 rewrite optimization X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=be31ae90ff05da4b33a8389b6814f094a7385cd9 macro'd out cr3 rewrite optimization --- diff --git a/palacios/src/palacios/vmm_ctrl_regs.c b/palacios/src/palacios/vmm_ctrl_regs.c index 838ce98..bbeaf4c 100644 --- a/palacios/src/palacios/vmm_ctrl_regs.c +++ b/palacios/src/palacios/vmm_ctrl_regs.c @@ -324,7 +324,7 @@ int v3_handle_cr3_write(struct guest_info * info) { } - +#ifdef CONFIG_CRAY_XT // If Paging is enabled in the guest then we need to change the shadow page tables if (info->mem_mode == VIRTUAL_MEM) { @@ -337,6 +337,18 @@ int v3_handle_cr3_write(struct guest_info * info) { } info->shdw_pg_state.prev_guest_cr3 = info->shdw_pg_state.guest_cr3; +#else + + // If Paging is enabled in the guest then we need to change the shadow page tables + if (info->mem_mode == VIRTUAL_MEM) { + if (v3_activate_shadow_pt(info) == -1) { + PrintError("Failed to activate 32 bit shadow page table\n"); + return -1; + } + } + +#endif + PrintDebug("New Shadow CR3=%p; New Guest CR3=%p\n", (void *)(addr_t)(info->ctrl_regs.cr3),