Changeset 43387 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Sep 21, 2012 9:40:25 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 80859
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 4 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm.h
r43373 r43387 1 1 /** @file 2 * H WACCM - Intel/AMD VM Hardware Support Manager (VMM)2 * HM - Intel/AMD VM Hardware Support Manager (VMM) 3 3 */ 4 4 … … 24 24 */ 25 25 26 #ifndef ___VBox_vmm_h waccm_h27 #define ___VBox_vmm_h waccm_h26 #ifndef ___VBox_vmm_hm_h 27 #define ___VBox_vmm_hm_h 28 28 29 29 #include <VBox/vmm/pgm.h> 30 30 #include <VBox/vmm/cpum.h> 31 #include <VBox/vmm/vmm.h> 31 32 #include <iprt/mp.h> 32 33 33 34 34 /** @defgroup grp_h waccm The VM Hardware Manager API35 /** @defgroup grp_hm The VM Hardware Manager API 35 36 * @{ 36 37 */ … … 39 40 40 41 /** 41 * Query H WACCM state (enabled/disabled)42 * Query HM state (enabled/disabled) 42 43 * 43 44 * @returns 0 - disabled, 1 - enabled 44 45 * @param pVM The VM to operate on. 45 46 */ 46 #define H WACCMIsEnabled(pVM) ((pVM)->fHWACCMEnabled)47 #define HMIsEnabled(pVM) ((pVM)->fHMEnabled) 47 48 48 49 /** … … 52 53 * @param pCtx CPU context 53 54 */ 54 #define H WACCMCanEmulateIoBlock(pVCpu) (!CPUMIsGuestInPagedProtectedMode(pVCpu))55 #define H WACCMCanEmulateIoBlockEx(pCtx) (!CPUMIsGuestInPagedProtectedModeEx(pCtx))55 #define HMCanEmulateIoBlock(pVCpu) (!CPUMIsGuestInPagedProtectedMode(pVCpu)) 56 #define HMCanEmulateIoBlockEx(pCtx) (!CPUMIsGuestInPagedProtectedModeEx(pCtx)) 56 57 57 VMMDECL(int) H WACCMInvalidatePage(PVMCPU pVCpu, RTGCPTR GCVirt);58 VMMDECL(bool) H WACCMHasPendingIrq(PVM pVM);58 VMMDECL(int) HMInvalidatePage(PVMCPU pVCpu, RTGCPTR GCVirt); 59 VMMDECL(bool) HMHasPendingIrq(PVM pVM); 59 60 60 61 #ifndef IN_RC 61 VMMDECL(int) H WACCMFlushTLB(PVMCPU pVCpu);62 VMMDECL(int) H WACCMFlushTLBOnAllVCpus(PVM pVM);63 VMMDECL(int) H WACCMInvalidatePageOnAllVCpus(PVM pVM, RTGCPTR GCVirt);64 VMMDECL(int) H WACCMInvalidatePhysPage(PVM pVM, RTGCPHYS GCPhys);65 VMMDECL(bool) H WACCMIsNestedPagingActive(PVM pVM);66 VMMDECL(PGMMODE) H WACCMGetShwPagingMode(PVM pVM);62 VMMDECL(int) HMFlushTLB(PVMCPU pVCpu); 63 VMMDECL(int) HMFlushTLBOnAllVCpus(PVM pVM); 64 VMMDECL(int) HMInvalidatePageOnAllVCpus(PVM pVM, RTGCPTR GCVirt); 65 VMMDECL(int) HMInvalidatePhysPage(PVM pVM, RTGCPHYS GCPhys); 66 VMMDECL(bool) HMIsNestedPagingActive(PVM pVM); 67 VMMDECL(PGMMODE) HMGetShwPagingMode(PVM pVM); 67 68 #else 68 69 /* Nop in GC */ 69 # define H WACCMFlushTLB(pVCpu) do { } while (0)70 # define H WACCMIsNestedPagingActive(pVM) false71 # define H WACCMFlushTLBOnAllVCpus(pVM) do { } while (0)70 # define HMFlushTLB(pVCpu) do { } while (0) 71 # define HMIsNestedPagingActive(pVM) false 72 # define HMFlushTLBOnAllVCpus(pVM) do { } while (0) 72 73 #endif 73 74 74 75 #ifdef IN_RING0 75 /** @defgroup grp_h waccm_r0 The VM Hardware Manager API76 * @ingroup grp_h waccm76 /** @defgroup grp_hm_r0 The VM Hardware Manager API 77 * @ingroup grp_hm 77 78 * @{ 78 79 */ 79 VMMR0DECL(int) H WACCMR0Init(void);80 VMMR0DECL(int) H WACCMR0Term(void);81 VMMR0DECL(int) H WACCMR0InitVM(PVM pVM);82 VMMR0DECL(int) H WACCMR0TermVM(PVM pVM);83 VMMR0DECL(int) H WACCMR0EnableAllCpus(PVM pVM);84 VMMR0DECL(int) H WACCMR0EnterSwitcher(PVM pVM, bool *pfVTxDisabled);85 VMMR0DECL( int) HWACCMR0LeaveSwitcher(PVM pVM, bool fVTxDisabled);80 VMMR0DECL(int) HMR0Init(void); 81 VMMR0DECL(int) HMR0Term(void); 82 VMMR0DECL(int) HMR0InitVM(PVM pVM); 83 VMMR0DECL(int) HMR0TermVM(PVM pVM); 84 VMMR0DECL(int) HMR0EnableAllCpus(PVM pVM); 85 VMMR0DECL(int) HMR0EnterSwitcher(PVM pVM, VMMSWITCHER enmSwitcher, bool *pfVTxDisabled); 86 VMMR0DECL(void) HMR0LeaveSwitcher(PVM pVM, bool fVTxDisabled); 86 87 87 VMMR0DECL(void) H WACCMR0SavePendingIOPortWrite(PVMCPU pVCpu, RTGCPTR GCPtrRip, RTGCPTR GCPtrRipNext, unsigned uPort, unsigned uAndVal, unsigned cbSize);88 VMMR0DECL(void) H WACCMR0SavePendingIOPortRead(PVMCPU pVCpu, RTGCPTR GCPtrRip, RTGCPTR GCPtrRipNext, unsigned uPort, unsigned uAndVal, unsigned cbSize);88 VMMR0DECL(void) HMR0SavePendingIOPortWrite(PVMCPU pVCpu, RTGCPTR GCPtrRip, RTGCPTR GCPtrRipNext, unsigned uPort, unsigned uAndVal, unsigned cbSize); 89 VMMR0DECL(void) HMR0SavePendingIOPortRead(PVMCPU pVCpu, RTGCPTR GCPtrRip, RTGCPTR GCPtrRipNext, unsigned uPort, unsigned uAndVal, unsigned cbSize); 89 90 90 91 /** @} */ … … 93 94 94 95 #ifdef IN_RING3 95 /** @defgroup grp_h waccm_r3 The VM Hardware Manager API96 * @ingroup grp_h waccm96 /** @defgroup grp_hm_r3 The VM Hardware Manager API 97 * @ingroup grp_hm 97 98 * @{ 98 99 */ 99 VMMR3DECL(bool) H WACCMR3IsEventPending(PVMCPU pVCpu);100 VMMR3DECL(int) H WACCMR3Init(PVM pVM);101 VMMR3_INT_DECL(int) H WACCMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);102 VMMR3DECL(void) H WACCMR3Relocate(PVM pVM);103 VMMR3DECL(int) H WACCMR3Term(PVM pVM);104 VMMR3DECL(void) H WACCMR3Reset(PVM pVM);105 VMMR3DECL(void) H WACCMR3ResetCpu(PVMCPU pVCpu);106 VMMR3DECL(void) H WACCMR3CheckError(PVM pVM, int iStatusCode);107 VMMR3DECL(bool) H WACCMR3CanExecuteGuest(PVM pVM, PCPUMCTX pCtx);108 VMMR3DECL(void) H WACCMR3NotifyScheduled(PVMCPU pVCpu);109 VMMR3DECL(void) H WACCMR3NotifyEmulated(PVMCPU pVCpu);110 VMMR3DECL(bool) H WACCMR3IsActive(PVMCPU pVCpu);111 VMMR3DECL(bool) H WACCMR3IsNestedPagingActive(PVM pVM);112 VMMR3DECL(bool) H WACCMR3IsAllowed(PVM pVM);113 VMMR3DECL(void) H WACCMR3PagingModeChanged(PVM pVM, PVMCPU pVCpu, PGMMODE enmShadowMode, PGMMODE enmGuestMode);114 VMMR3DECL(bool) H WACCMR3IsVPIDActive(PVM pVM);115 VMMR3DECL(int) H WACCMR3InjectNMI(PVM pVM);116 VMMR3DECL(int) H WACCMR3EmulateIoBlock(PVM pVM, PCPUMCTX pCtx);117 VMMR3DECL(VBOXSTRICTRC) H WACCMR3RestartPendingIOInstr(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);118 VMMR3DECL(int) H WACMMR3EnablePatching(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem);119 VMMR3DECL(int) H WACMMR3DisablePatching(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem);120 VMMR3DECL(int) H WACCMR3PatchTprInstr(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);121 VMMR3DECL(bool) H WACCMR3IsRescheduleRequired(PVM pVM, PCPUMCTX pCtx);122 VMMR3DECL(bool) H WACCMR3IsVmxPreemptionTimerUsed(PVM pVM);100 VMMR3DECL(bool) HMR3IsEventPending(PVMCPU pVCpu); 101 VMMR3DECL(int) HMR3Init(PVM pVM); 102 VMMR3_INT_DECL(int) HMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat); 103 VMMR3DECL(void) HMR3Relocate(PVM pVM); 104 VMMR3DECL(int) HMR3Term(PVM pVM); 105 VMMR3DECL(void) HMR3Reset(PVM pVM); 106 VMMR3DECL(void) HMR3ResetCpu(PVMCPU pVCpu); 107 VMMR3DECL(void) HMR3CheckError(PVM pVM, int iStatusCode); 108 VMMR3DECL(bool) HMR3CanExecuteGuest(PVM pVM, PCPUMCTX pCtx); 109 VMMR3DECL(void) HMR3NotifyScheduled(PVMCPU pVCpu); 110 VMMR3DECL(void) HMR3NotifyEmulated(PVMCPU pVCpu); 111 VMMR3DECL(bool) HMR3IsActive(PVMCPU pVCpu); 112 VMMR3DECL(bool) HMR3IsNestedPagingActive(PVM pVM); 113 VMMR3DECL(bool) HMR3IsAllowed(PVM pVM); 114 VMMR3DECL(void) HMR3PagingModeChanged(PVM pVM, PVMCPU pVCpu, PGMMODE enmShadowMode, PGMMODE enmGuestMode); 115 VMMR3DECL(bool) HMR3IsVPIDActive(PVM pVM); 116 VMMR3DECL(int) HMR3InjectNMI(PVM pVM); 117 VMMR3DECL(int) HMR3EmulateIoBlock(PVM pVM, PCPUMCTX pCtx); 118 VMMR3DECL(VBOXSTRICTRC) HMR3RestartPendingIOInstr(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx); 119 VMMR3DECL(int) HMR3EnablePatching(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem); 120 VMMR3DECL(int) HMR3DisablePatching(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem); 121 VMMR3DECL(int) HMR3PatchTprInstr(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx); 122 VMMR3DECL(bool) HMR3IsRescheduleRequired(PVM pVM, PCPUMCTX pCtx); 123 VMMR3DECL(bool) HMR3IsVmxPreemptionTimerUsed(PVM pVM); 123 124 124 125 /** @} */ … … 126 127 127 128 #ifdef IN_RING0 128 /** @addtogroup grp_h waccm_r0129 /** @addtogroup grp_hm_r0 129 130 * @{ 130 131 */ 131 VMMR0DECL(int) H WACCMR0SetupVM(PVM pVM);132 VMMR0DECL(int) H WACCMR0RunGuestCode(PVM pVM, PVMCPU pVCpu);133 VMMR0DECL(int) H WACCMR0Enter(PVM pVM, PVMCPU pVCpu);134 VMMR0DECL(int) H WACCMR0Leave(PVM pVM, PVMCPU pVCpu);135 VMMR0DECL(int) H WACCMR0InvalidatePage(PVM pVM, PVMCPU pVCpu);136 VMMR0DECL(int) H WACCMR0FlushTLB(PVM pVM);137 VMMR0DECL(bool) H WACCMR0SuspendPending(void);132 VMMR0DECL(int) HMR0SetupVM(PVM pVM); 133 VMMR0DECL(int) HMR0RunGuestCode(PVM pVM, PVMCPU pVCpu); 134 VMMR0DECL(int) HMR0Enter(PVM pVM, PVMCPU pVCpu); 135 VMMR0DECL(int) HMR0Leave(PVM pVM, PVMCPU pVCpu); 136 VMMR0DECL(int) HMR0InvalidatePage(PVM pVM, PVMCPU pVCpu); 137 VMMR0DECL(int) HMR0FlushTLB(PVM pVM); 138 VMMR0DECL(bool) HMR0SuspendPending(void); 138 139 139 140 # if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) 140 VMMR0DECL(int) H WACCMR0SaveFPUState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);141 VMMR0DECL(int) H WACCMR0SaveDebugState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx);142 VMMR0DECL(int) H WACCMR0TestSwitcher3264(PVM pVM);141 VMMR0DECL(int) HMR0SaveFPUState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx); 142 VMMR0DECL(int) HMR0SaveDebugState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx); 143 VMMR0DECL(int) HMR0TestSwitcher3264(PVM pVM); 143 144 # endif 144 145 -
trunk/include/VBox/vmm/hm_svm.h
r43373 r43387 1 1 /** @file 2 * H WACCM - SVM Structures and Definitions. (VMM)2 * HM - SVM Structures and Definitions. (VMM) 3 3 */ 4 4 -
trunk/include/VBox/vmm/hm_vmx.h
r43373 r43387 1 1 /** @file 2 * H WACCM - VMX Structures and Definitions. (VMM)2 * HM - VMX Structures and Definitions. (VMM) 3 3 */ 4 4 -
trunk/include/VBox/vmm/hm_vmx.mac
r43373 r43387 1 1 ;; @file 2 ; H WACCM - VMX Structures and Definitions.2 ; HM - VMX Structures and Definitions. 3 3 ; 4 4 -
trunk/include/VBox/vmm/mm.h
r40652 r43387 131 131 MM_TAG_VMM, 132 132 133 MM_TAG_H WACCM,133 MM_TAG_HM, 134 134 135 135 MM_TAG_32BIT_HACK = 0x7fffffff -
trunk/include/VBox/vmm/vm.h
r42407 r43387 111 111 RTNATIVETHREAD hNativeThreadR0; /* 48 / 32 */ 112 112 /** Which host CPU ID is this EMT running on. 113 * Only valid when in RC or H WACCMR0 with scheduling disabled. */113 * Only valid when in RC or HMR0 with scheduling disabled. */ 114 114 RTCPUID volatile idHostCpu; /* 56 / 36 */ 115 115 … … 139 139 } cpum; 140 140 141 /** H WACCM part. */142 union 143 { 144 #ifdef ___H WACCMInternal_h145 struct H WACCMCPU s;141 /** HM part. */ 142 union 143 { 144 #ifdef ___HMInternal_h 145 struct HMCPU s; 146 146 #endif 147 147 uint8_t padding[5376]; /* multiple of 64 */ 148 } h waccm;148 } hm; 149 149 150 150 /** EM part. */ … … 355 355 #define VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL RT_BIT_32(17) 356 356 /** Check for pending TLB shootdown actions. 357 * Consumer: H WACCM358 * @todo rename to VMCPU_FF_H WACCM_TLB_SHOOTDOWN */357 * Consumer: HM 358 * @todo rename to VMCPU_FF_HM_TLB_SHOOTDOWN */ 359 359 #define VMCPU_FF_TLB_SHOOTDOWN RT_BIT_32(18) 360 360 /** Check for pending TLB flush action. 361 * Consumer: H WACCM362 * @todo rename to VMCPU_FF_H WACCM_TLB_FLUSH */361 * Consumer: HM 362 * @todo rename to VMCPU_FF_HM_TLB_FLUSH */ 363 363 #define VMCPU_FF_TLB_FLUSH RT_BIT_32(VMCPU_FF_TLB_FLUSH_BIT) 364 364 /** The bit number for VMCPU_FF_TLB_FLUSH. */ … … 425 425 #define VMCPU_FF_RESUME_GUEST_MASK (VMCPU_FF_TO_R3) 426 426 427 /** VM Flags that cause the H WACCM loops to go back to ring-3. */428 #define VM_FF_H WACCM_TO_R3_MASK (VM_FF_TM_VIRTUAL_SYNC | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY | VM_FF_PDM_QUEUES | VM_FF_EMT_RENDEZVOUS)429 /** VMCPU Flags that cause the H WACCM loops to go back to ring-3. */430 #define VMCPU_FF_H WACCM_TO_R3_MASK (VMCPU_FF_TO_R3 | VMCPU_FF_TIMER | VMCPU_FF_PDM_CRITSECT)427 /** VM Flags that cause the HM loops to go back to ring-3. */ 428 #define VM_FF_HM_TO_R3_MASK (VM_FF_TM_VIRTUAL_SYNC | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY | VM_FF_PDM_QUEUES | VM_FF_EMT_RENDEZVOUS) 429 /** VMCPU Flags that cause the HM loops to go back to ring-3. */ 430 #define VMCPU_FF_HM_TO_R3_MASK (VMCPU_FF_TO_R3 | VMCPU_FF_TIMER | VMCPU_FF_PDM_CRITSECT) 431 431 432 432 /** All the forced VM flags. */ … … 844 844 /** Hardware VM support is available and enabled. 845 845 * This is placed here for performance reasons. */ 846 bool fH WACCMEnabled;846 bool fHMEnabled; 847 847 /** Hardware VM support is required and non-optional. 848 848 * This is initialized together with the rest of the VM structure. */ … … 930 930 } pgm; 931 931 932 /** H WACCM part. */933 union 934 { 935 #ifdef ___H WACCMInternal_h936 struct H WACCM s;932 /** HM part. */ 933 union 934 { 935 #ifdef ___HMInternal_h 936 struct HM s; 937 937 #endif 938 938 uint8_t padding[5376]; /* multiple of 64 */ 939 } h waccm;939 } hm; 940 940 941 941 /** TRPM part. */ -
trunk/include/VBox/vmm/vm.mac
r41976 r43387 61 61 .fPATMEnabled resb 1 62 62 .fCSAMEnabled resb 1 63 .fH WACCMEnabled resb 163 .fHMEnabled resb 1 64 64 .fHwVirtExtForced resb 1 65 65 .fFaultTolerantMaster resb 1 … … 133 133 134 134 .cpum resb 3584 135 .h waccmresb 5376135 .hm resb 5376 136 136 .em resb 1472 137 137 .iem resb 3072 -
trunk/include/VBox/vmm/vmapi.h
r38838 r43387 310 310 VMINITCOMPLETED_RING0, 311 311 /** The hardware accelerated virtualization init is completed. 312 * Used to make decisision depending on whether H WACCMIsEnabled(). */313 VMINITCOMPLETED_H WACCM,312 * Used to make decisision depending on whether HMIsEnabled(). */ 313 VMINITCOMPLETED_HM, 314 314 /** The GC init is completed. */ 315 315 VMINITCOMPLETED_GC
Note:
See TracChangeset
for help on using the changeset viewer.