/* Eventually we want to get rid of these */
-#include <geekos/mem.h>
-#include <geekos/segment.h>
-#include <geekos/gdt.h>
-#include <geekos/idt.h>
+
#include <geekos/cpu.h>
#include <geekos/io_devs.h>
/* ** */
#define ROMBIOS_DEBUG_PORT 0x403
+extern struct vmm_os_hooks * os_hooks;
+
static struct VM theVM;
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));
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;