VirtualBox

Changeset 7471 in vbox for trunk/include


Ignore:
Timestamp:
Mar 17, 2008 10:50:10 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28911
Message:

Rewrote VT-x & AMD-V mode changes. Requires the MP apis in our runtime to function properly. (only tested Windows)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/hwaccm.h

    r5999 r7471  
    3030#include <VBox/types.h>
    3131#include <VBox/pgm.h>
     32#include <iprt/mp.h>
    3233
    3334
     
    3637 */
    3738
     39/**
     40 * HWACCM state
     41 */
     42typedef enum HWACCMSTATE
     43{
     44    /* Not yet set */
     45    HWACCMSTATE_UNINITIALIZED = 0,
     46    /* Enabled */
     47    HWACCMSTATE_ENABLED,
     48    /* Disabled */
     49    HWACCMSTATE_DISABLED,
     50    /** The usual 32-bit hack. */
     51    HWACCMSTATE_32BIT_HACK = 0x7fffffff
     52} HWACCMSTATE;
    3853
    3954__BEGIN_DECLS
     
    5469
    5570/**
    56  * Does Ring-0 HWACCM initialization.
     71 * Does global Ring-0 HWACCM initialization.
     72 *
     73 * @returns VBox status code.
     74 */
     75HWACCMR0DECL(int) HWACCMR0Init();
     76
     77/**
     78 * Does global Ring-0 HWACCM termination.
     79 *
     80 * @returns VBox status code.
     81 */
     82HWACCMR0DECL(int) HWACCMR0Term();
     83
     84/**
     85 * Does Ring-0 per VM HWACCM initialization.
    5786 *
    5887 * This is mainly to check that the Host CPU mode is compatible
     
    6291 * @param   pVM         The VM to operate on.
    6392 */
    64 HWACCMR0DECL(int) HWACCMR0Init(PVM pVM);
     93HWACCMR0DECL(int) HWACCMR0InitVM(PVM pVM);
     94
     95/**
     96 * Sets up HWACCM on all cpus.
     97 *
     98 * @returns VBox status code.
     99 * @param   pVM                 The VM to operate on.
     100 * @param   enmNewHwAccmState   New hwaccm state
     101 *
     102 */
     103HWACCMR0DECL(int) HWACCMR0EnableAllCpus(PVM pVM, HWACCMSTATE enmNewHwAccmState);
    65104
    66105/** @} */
     
    91130
    92131/**
     132 * Initialize VT-x or AMD-V
     133 *
     134 * @returns VBox status code.
     135 * @param   pVM         The VM handle.
     136 */
     137HWACCMR3DECL(int) HWACCMR3InitFinalizeR0(PVM pVM);
     138
     139/**
    93140 * Applies relocations to data and code managed by this
    94141 * component. This function will be called at init and
     
    165212
    166213/**
    167  * Does Ring-0 VMX initialization.
    168  *
    169  * @returns VBox status code.
    170  * @param   pVM         The VM to operate on.
    171  */
    172 HWACCMR0DECL(int) HWACCMR0SetupVMX(PVM pVM);
     214 * Sets up a VT-x or AMD-V session
     215 *
     216 * @returns VBox status code.
     217 * @param   pVM         The VM to operate on.
     218 */
     219HWACCMR0DECL(int) HWACCMR0SetupVM(PVM pVM);
    173220
    174221
     
    182229
    183230/**
    184  * Enable VMX or SVN
    185  *
    186  * @returns VBox status code.
    187  * @param   pVM         The VM to operate on.
    188  */
    189 HWACCMR0DECL(int) HWACCMR0Enable(PVM pVM);
    190 
    191 
    192 /**
    193  * Disable VMX or SVN
    194  *
    195  * @returns VBox status code.
    196  * @param   pVM         The VM to operate on.
    197  */
    198 HWACCMR0DECL(int) HWACCMR0Disable(PVM pVM);
     231 * Enters the VT-x or AMD-V session
     232 *
     233 * @returns VBox status code.
     234 * @param   pVM         The VM to operate on.
     235 */
     236HWACCMR0DECL(int) HWACCMR0Enter(PVM pVM);
     237
     238
     239/**
     240 * Leaves the VT-x or AMD-V session
     241 *
     242 * @returns VBox status code.
     243 * @param   pVM         The VM to operate on.
     244 */
     245HWACCMR0DECL(int) HWACCMR0Leave(PVM pVM);
    199246
    200247
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette