From: Chunxiao Diao, Daniel Zuo, Yuanbo Fan Date: Mon, 26 May 2014 21:11:44 +0000 (-0500) Subject: Convert shadow paging to use 32 PAE (SVM) X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=755eccfbd8dff71bfbd6be828ef3725ecdcd4d4d Convert shadow paging to use 32 PAE (SVM) This changes shadow paging to use, at minimum, 32PAE shadow page tables. This makes it possible to place a guest using shadow paging anywhere in host physical memory instead of just the first 4 GB This patch updates SVM so that the shadow pts are activated and CR4 reads as well as writes are intercepted. Note that all patches with this name need to be used together for this to work. --- diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index ede619b..d1125ee 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -290,11 +290,13 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info * core) { PrintDebug(core->vm_info, core, "Created\n"); core->ctrl_regs.cr0 |= 0x80000000; - core->ctrl_regs.cr3 = core->direct_map_pt; + + v3_activate_passthrough_pt(core); ctrl_area->cr_reads.cr0 = 1; ctrl_area->cr_writes.cr0 = 1; - //ctrl_area->cr_reads.cr4 = 1; + //intercept cr4 read so shadow pager can use PAE independently of guest + ctrl_area->cr_reads.cr4 = 1; ctrl_area->cr_writes.cr4 = 1; ctrl_area->cr_reads.cr3 = 1; ctrl_area->cr_writes.cr3 = 1;