Skip to content
  • Charlie Jacobsen's avatar
    Finished lcd_vmx_init and its dependencies. · 18122896
    Charlie Jacobsen authored and Vikram Narayanan's avatar Vikram Narayanan committed
    Added a few missing macros to arch/x86/include/vmx.h,
    and RESERVED masks for easily determining which bits
    in a vmx control are reserved (needed in adjust_vmx_controls).
    
    Re-factored setup_vmcs_config and adjust_vmx_controls.
    setup_vmcs_config does pretty much the same thing, but it
    fails immediately if a control isn't available --
    adjust_vmx_controls confirms that the exact desired
    controls are available, and sets the reserved bits to
    1 or 0 as needed. Cleaner comments and organization.
    Re-factored the vmx basic settings to
    vmcs_config_basic_settings.
    
    Removed some of the vmx feature check code that was in
    the original lcd_vmx_init, as setup_vmcs_config now does
    that.
    
    Essentially a straight copy over of:
    
    -- __vmx_enable
    -- vmx_enable
    -- vmx_disable
    -- vmx_free_vmxon_areas
    -- __vmxon
    -- __vmxoff
    
    The only difference is I shifted tbl and cache
    invalidation to vmx_enable (originally in __vmx_enable)
    and added some comments.
    
    Straight copy over of
    -- vmx_alloc_vmcs
    -- vmx_free_vmcs
    -- invvpid, invept code, with slight renaming
    18122896