X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fvmx.c;h=2278da9e4ea1e2e8dbc1a42bf9fb3b0d34361758;hb=4939ecae04ce6416f404670640620a23aee9b914;hp=8aa8b2f29f0a54a8308d09c25de60fd98efb2714;hpb=190b2ef9470c23c275754b74745933d973f8c439;p=palacios.git diff --git a/palacios/src/geekos/vmx.c b/palacios/src/geekos/vmx.c index 8aa8b2f..2278da9 100644 --- a/palacios/src/geekos/vmx.c +++ b/palacios/src/geekos/vmx.c @@ -1,8 +1,5 @@ /* Eventually we want to get rid of these */ -#include -#include -#include -#include + #include #include /* ** */ @@ -30,6 +27,8 @@ extern int Launch_VM(ullong_t vmcsPtr, uint_t eip); #define ROMBIOS_DEBUG_PORT 0x403 +extern struct vmm_os_hooks * os_hooks; + static struct VM theVM; @@ -884,7 +883,7 @@ int VMLaunch(struct VMDescriptor *vm) VmxOnRegion * CreateVmxOnRegion() { union VMX_MSR basicMSR; - VmxOnRegion * region = (VmxOnRegion *)Alloc_Page(); + VmxOnRegion * region = (VmxOnRegion *)(os_hooks)->allocate_pages(1); Get_MSR(IA32_VMX_BASIC_MSR, &basicMSR.regs.high, &basicMSR.regs.low); // memcpy(region, &basicMSR.vmxBasic.revision, sizeof(uint_t)); @@ -898,7 +897,7 @@ VmxOnRegion * CreateVmxOnRegion() { VMCS * CreateVMCS() { union VMX_MSR basicMSR; - VMCS * vmcs = (VMCS *)Alloc_Page(); + VMCS * vmcs = (VMCS *)(os_hooks)->allocate_pages(1); Get_MSR(IA32_VMX_BASIC_MSR, &basicMSR.regs.high, &basicMSR.regs.low); *(ulong_t *)vmcs = basicMSR.vmxBasic.revision;