X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmx.h;h=2b50a04890cc60d9553660c4689b119bde0a33c0;hb=1bafb4aec89c2c611117ec6ccc17d0f22f392254;hp=d637d8f149b18e414f6b8cf388abd65d7d893de8;hpb=1316eb77b6d89245583446dab3345f749c415764;p=palacios.git diff --git a/palacios/include/palacios/vmx.h b/palacios/include/palacios/vmx.h index d637d8f..2b50a04 100644 --- a/palacios/include/palacios/vmx.h +++ b/palacios/include/palacios/vmx.h @@ -28,10 +28,11 @@ #include #include +#include // Intel VMX Specific MSRs #define VMX_FEATURE_CONTROL_MSR 0x0000003a -#define VMX_BASIC_MSR 0x00000480 +#define VMX_BASIC_MSR 0x00000480 #define VMX_PINBASED_CTLS_MSR 0x00000481 #define VMX_PROCBASED_CTLS_MSR 0x00000482 #define VMX_EXIT_CTLS_MSR 0x00000483 @@ -67,25 +68,16 @@ struct vmx_basic_msr { uint_t rsvd2 : 10; // Always 0 } __attribute__((packed)); +typedef enum { + VMXASSIST_STARTUP, + VMXASSIST_V8086_BIOS, + VMXASSIST_V8086, + NORMAL +} vmx_state_t; - - - -enum VMState { VM_VMXASSIST_STARTUP, VM_VMXASSIST_V8086_BIOS, VM_VMXASSIST_V8086, VM_NORMAL }; - - - - - - - -struct VM { - enum VMState state; - struct VMXRegs registers; - struct VMDescriptor descriptor; - struct VMCSData vmcs; - struct VMCS *vmcsregion; - struct VmxOnRegion *vmxonregion; +struct vmx_data { + vmx_state_t state; + addr_t vmcs_ptr_phys; }; @@ -103,17 +95,12 @@ struct Instruction { -int is_vmx_capable(); - -VmxOnRegion * Init_VMX(); -VmxOnRegion * CreateVmxOnRegion(); +int v3_is_vmx_capable(); +void v3_init_vmx(struct v3_ctrl_ops* vm_ops); -int VMLaunch(struct VMDescriptor *vm); - - -int Do_VMM(struct VMXRegs regs); #endif // ! __V3VEE__ #endif +