X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmx.h;h=fd5e6ce2fd8884c70191e3d930bd6e6441b59af6;hb=a10fb029c3528d241c24505129da62ca023b6b9a;hp=67e546b412b7b087305bd1be70366cc26339fac4;hpb=068d7e66db537f981fde19a098a12e4390fa3de4;p=palacios.git diff --git a/palacios/include/palacios/vmx.h b/palacios/include/palacios/vmx.h index 67e546b..fd5e6ce 100644 --- a/palacios/include/palacios/vmx.h +++ b/palacios/include/palacios/vmx.h @@ -1,4 +1,3 @@ - /* * This file is part of the Palacios Virtual Machine Monitor developed * by the V3VEE Project with funding from the United States National @@ -182,6 +181,11 @@ struct vmx_basic_msr { typedef enum { VMXASSIST_DISABLED, VMXASSIST_ENABLED +} vmxassist_state_t; + +typedef enum { + VMX_UNLAUNCHED, + VMX_LAUNCHED } vmx_state_t; struct tss_descriptor { @@ -213,14 +217,22 @@ struct vmcs_host_state { struct v3_segment tr; }; + + + + struct vmx_data { vmx_state_t state; + vmxassist_state_t assist_state; struct vmcs_host_state host_state; addr_t vmcs_ptr_phys; uint8_t ia32e_avail; + v3_reg_t guest_cr4; /// corresponds to the CR4 Read shadow + + /* VMX Control Fields */ struct vmx_pin_ctrls pin_ctrls; struct vmx_pri_proc_ctrls pri_proc_ctrls; @@ -230,9 +242,15 @@ struct vmx_data { }; int v3_is_vmx_capable(); -void v3_init_vmx_hooks(struct v3_ctrl_ops * vm_ops); + void v3_init_vmx_cpu(int cpu_id); +void v3_deinit_vmx_cpu(int cpu_id); + +int v3_start_vmx_guest(struct guest_info* info); +int v3_vmx_enter(struct guest_info * info); +int v3_init_vmx_vmcs(struct guest_info * info, v3_vm_class_t vm_class); +int v3_deinit_vmx_vmcs(struct guest_info * core); #endif // ! __V3VEE__