VirtualBox

Changeset 45618 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Apr 18, 2013 6:41:07 PM (12 years ago)
Author:
vboxsync
Message:

Do HMR3Init first in vmR3InitRing3 so the other components can skip raw-mode bits during init.

Location:
trunk/include/VBox
Files:
6 edited

Legend:

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

    r45474 r45618  
    19481948/** Unsupported CPU feature combination. */
    19491949#define VERR_HM_UNSUPPORTED_CPU_FEATURE_COMBO       (-4112)
     1950/** Internal processing error \#3 in the HM code.  */
     1951#define VERR_HM_IPE_3                               (-4113)
     1952/** Internal processing error \#3 in the HM code.  */
     1953#define VERR_HM_IPE_4                               (-4114)
     1954/** Internal processing error \#3 in the HM code.  */
     1955#define VERR_HM_IPE_5                               (-4115)
    19501956/** @} */
    19511957
  • trunk/include/VBox/vmm/hm.h

    r44373 r45618  
    4444 * @returns 0 - disabled, 1 - enabled
    4545 * @param   a_pVM       Pointer to the shared VM structure.
     46 * @sa      HMIsEnabledNotMacro, HMR3IsEnabled
    4647 * @internal
    4748 */
    48 #define HMIsEnabled(a_pVM)    ((a_pVM)->fHMEnabled)
     49#if defined(VBOX_STRICT) && defined(IN_RING3)
     50# define HMIsEnabled(a_pVM)   HMIsEnabledNotMacro(a_pVM)
     51#else
     52# define HMIsEnabled(a_pVM)   ((a_pVM)->fHMEnabled)
     53#endif
    4954
    5055 /**
     
    6671#define HMCanEmulateIoBlockEx(a_pCtx)   (!CPUMIsGuestInPagedProtectedModeEx(a_pCtx))
    6772
     73VMMDECL(bool)                   HMIsEnabledNotMacro(PVM pVM);
    6874VMM_INT_DECL(int)               HMInvalidatePage(PVMCPU pVCpu, RTGCPTR GCVirt);
    6975VMM_INT_DECL(bool)              HMHasPendingIrq(PVM pVM);
     
    126132VMMR3_INT_DECL(void)            HMR3NotifyEmulated(PVMCPU pVCpu);
    127133VMMR3_INT_DECL(bool)            HMR3IsActive(PVMCPU pVCpu);
    128 VMMR3_INT_DECL(bool)            HMR3IsAllowed(PVM pVM);
    129134VMMR3_INT_DECL(void)            HMR3PagingModeChanged(PVM pVM, PVMCPU pVCpu, PGMMODE enmShadowMode, PGMMODE enmGuestMode);
    130135VMMR3_INT_DECL(int)             HMR3EmulateIoBlock(PVM pVM, PCPUMCTX pCtx);
  • trunk/include/VBox/vmm/vm.h

    r45533 r45618  
    44
    55/*
    6  * Copyright (C) 2006-2012 Oracle Corporation
     6 * Copyright (C) 2006-2013 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    8585
    8686/**
    87  * Per virtual CPU data.
     87 * The cross context virtual CPU structure.
     88 *
     89 * Run 'kmk run-struct-tests' (from src/VBox/VMM if you like) after updating!
    8890 */
    8991typedef struct VMCPU
     
    784786
    785787
    786 /** This is the VM structure.
    787  *
    788  * It contains (nearly?) all the VM data which have to be available in all
    789  * contexts. Even if it contains all the data the idea is to use APIs not
    790  * to modify all the members all around the place. Therefore we make use of
    791  * unions to hide everything which isn't local to the current source module.
    792  * This means we'll have to pay a little bit of attention when adding new
    793  * members to structures in the unions and make sure to keep the padding sizes
    794  * up to date.
    795  *
    796  * Run tstVMStructSize after update!
     788/**
     789 * The cross context VM structure.
     790 *
     791 * It contains all the VM data which have to be available in all contexts.
     792 * Even if it contains all the data the idea is to use APIs not to modify all
     793 * the members all around the place.  Therefore we make use of unions to hide
     794 * everything which isn't local to the current source module.  This means we'll
     795 * have to pay a little bit of attention when adding new members to structures
     796 * in the unions and make sure to keep the padding sizes up to date.
     797 *
     798 * Run 'kmk run-struct-tests' (from src/VBox/VMM if you like) after updating!
    797799 */
    798800typedef struct VM
     
    875877    bool                        fCSAMEnabled;
    876878    /** Hardware VM support is available and enabled.
     879     * Determined very early during init.
    877880     * This is placed here for performance reasons. */
    878881    bool                        fHMEnabled;
    879     /** Hardware VM support is required and non-optional.
    880      * This is initialized together with the rest of the VM structure. */
    881     bool                        fHwVirtExtForced;
    882     /** Set when this VM is the master FT node. */
     882    /** For asserting on fHMEnable usage. */
     883    bool                        fHMEnabledFixed;
     884    /** Set when this VM is the master FT node.
     885     * @todo This doesn't need to be here, FTM should store it in it's own
     886     *       structures instead. */
    883887    bool                        fFaultTolerantMaster;
    884     /** Large page enabled flag. */
     888    /** Large page enabled flag.
     889     * @todo This doesn't need to be here, PGM should store it in it's own
     890     *       structures instead. */
    885891    bool                        fUseLargePages;
    886892    /** @} */
  • trunk/include/VBox/vmm/vm.mac

    r45276 r45618  
    6262    .fPATMEnabled           resb 1
    6363    .fCSAMEnabled           resb 1
    64     .fHMEnabled         resb 1
    65     .fHwVirtExtForced       resb 1
     64    .fHMEnabled             resb 1
     65    .fHMEnabledFixed        resb 1
    6666    .fFaultTolerantMaster   resb 1
    6767    .fUseLargePages         resb 1
  • trunk/include/VBox/vmm/vmapi.h

    r44528 r45618  
    325325    VMINITCOMPLETED_RING0,
    326326    /** The hardware accelerated virtualization init is completed.
    327      * Used to make decisision depending on whether HMIsEnabled(). */
     327     * Used to make decisision depending on HM* bits being completely
     328     * initialized. */
    328329    VMINITCOMPLETED_HM,
    329     /** The GC init is completed. */
    330     VMINITCOMPLETED_GC
     330    /** The RC init is completed. */
     331    VMINITCOMPLETED_RC
    331332} VMINITCOMPLETED;
    332333
  • trunk/include/VBox/vmm/vmm.h

    r45525 r45618  
    235235VMM_INT_DECL(VMMSWITCHER)   VMMGetSwitcher(PVM pVM);
    236236VMM_INT_DECL(void)          VMMTrashVolatileXMMRegs(void);
    237 
    238 /** @def VMMIsHwVirtExtForced
    239  * Checks if forced to use the hardware assisted virtualization extensions.
    240  *
    241  * This is intended for making setup decisions where we can save resources when
    242  * using hardware assisted virtualization.
    243  *
    244  * @returns true / false.
    245  * @param   pVM     Pointer to the shared VM structure.
    246  * @internal
    247  */
    248 #define VMMIsHwVirtExtForced(pVM)   ((pVM)->fHwVirtExtForced)
    249237
    250238
Note: See TracChangeset for help on using the changeset viewer.

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