From: Jack Lange Date: Wed, 22 Oct 2008 22:12:55 +0000 (-0500) Subject: Merge branch 'kitten' of ssh://sharedev@newskysaw.cs.northwestern.edu/home/sharedev... X-Git-Tag: 1.0^2~4 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=9dc62167c8f74a37391028c558f46db50a7998d1;hp=-c Merge branch 'kitten' of ssh://sharedev@newskysaw.cs.northwestern.edu/home/sharedev/palacios into kitten --- 9dc62167c8f74a37391028c558f46db50a7998d1 diff --combined palacios/src/palacios/svm.c index 86629d3,95bb586..77653af --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@@ -59,7 -59,7 +59,7 @@@ static vmcb_t * Allocate_VMCB() - +#include static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) { vmcb_ctrl_t * ctrl_area = GET_VMCB_CTRL_AREA(vmcb); @@@ -77,21 -77,7 +77,21 @@@ ctrl_area->cr_reads.cr0 = 1; ctrl_area->cr_writes.cr0 = 1; + + /* Set up the efer to enable 64 bit page tables */ + { + struct efer_64 * efer = (struct efer_64 *)&(guest_state->efer); + struct cr4_32 * cr4 = (struct cr4_32 *)&(guest_state->cr4); + efer->lma = 1; + efer->lme = 1; + + cr4->pae = 1; + } + guest_state->efer |= EFER_MSR_svm_enable; + + + guest_state->rflags = 0x00000002; // The reserved bit is always 1 ctrl_area->svm_instrs.VMRUN = 1; ctrl_area->svm_instrs.VMMCALL = 1; @@@ -327,7 -313,7 +327,7 @@@ static int start_svm_guest(struct guest v3_clgi(); - PrintDebug("SVM Entry to rip=%p...\n", (void *)info->rip); + //PrintDebug("SVM Entry to rip=%p...\n", (void *)info->rip); v3_get_msr(0xc0000101, &vm_cr_high, &vm_cr_low); @@@ -339,7 -325,7 +339,7 @@@ rdtscll(tmp_tsc); v3_set_msr(0xc0000101, vm_cr_high, vm_cr_low); - PrintDebug("SVM Returned\n"); + //PrintDebug("SVM Returned\n"); #if PrintDebug @@@ -353,11 -339,11 +353,11 @@@ v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc); num_exits++; - PrintDebug("Turning on global interrupts\n"); + //PrintDebug("Turning on global interrupts\n"); v3_stgi(); - PrintDebug("SVM Exit number %d\n", num_exits); + //PrintDebug("SVM Exit number %d\n", num_exits);