Changeset 80274 in vbox for trunk/include
- Timestamp:
- Aug 14, 2019 2:34:38 PM (5 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/gvm.h
r80268 r80274 56 56 57 57 /** VCPU id (0 - (pVM->cCpus - 1). */ 58 #ifdef VBOX_BUGREF_921759 VMCPUID idCpuSafe;60 #else61 58 VMCPUID idCpu; 62 #endif63 59 /** Padding. */ 64 60 uint32_t uPadding; … … 77 73 /** Pointer to the GVM structure, for CTX_SUFF use in VMMAll code. */ 78 74 PGVM pVMR0; 75 /** The ring-3 address of this structure (only VMCPU part). */ 76 PVMCPUR3 pVCpuR3; 79 77 #endif 80 78 81 79 /** Padding so gvmm starts on a 64 byte boundrary. 82 80 * @note Keeping this working for 32-bit header syntax checking. */ 83 #ifdef VBOX_BUGREF_921784 uint8_t abPadding[HC_ARCH_BITS == 32 ? 44 : 32];85 #else86 81 uint8_t abPadding[HC_ARCH_BITS == 32 ? 40 : 24]; 87 #endif88 82 89 83 /** The GVMM per vcpu data. */ … … 158 152 uint32_t u32Magic; 159 153 /** The global VM handle for this VM. */ 160 #ifdef VBOX_BUGREF_9217161 uint32_t hSelfSafe;162 #else163 154 uint32_t hSelf; 164 #endif 165 #ifndef VBOX_BUGREF_9217 155 #ifdef VBOX_BUGREF_9217 156 /** Pointer to this structure (for validation purposes). */ 157 PGVM pSelf; 158 #else 166 159 /** The ring-0 mapping of the VM structure. */ 167 160 PVM pVM; … … 170 163 PVMR3 pVMR3; 171 164 /** The support driver session the VM is associated with. */ 172 #ifdef VBOX_BUGREF_9217173 PSUPDRVSESSION pSessionSafe;174 #else175 165 PSUPDRVSESSION pSession; 176 #endif177 166 /** Number of Virtual CPUs, i.e. how many entries there are in aCpus. 178 167 * Same same as VM::cCpus. */ 179 168 uint32_t cCpus; 180 169 /** Padding so gvmm starts on a 64 byte boundrary. */ 181 #ifdef VBOX_BUGREF_9217182 uint8_t abPadding[HC_ARCH_BITS == 32 ? 12 + 28 + 4 : 28 + 8];183 #else184 170 uint8_t abPadding[HC_ARCH_BITS == 32 ? 12 + 28 : 28]; 185 #endif186 171 187 172 /** The GVMM per vm data. */ -
trunk/include/VBox/vmm/gvmm.h
r76585 r80274 162 162 GVMMR0DECL(int) GVMMR0QueryConfig(PSUPDRVSESSION pSession, const char *pszName, uint64_t *pu64Value); 163 163 164 GVMMR0DECL(int) GVMMR0CreateVM(PSUPDRVSESSION pSession, uint32_t cCpus, PVM *ppVM);164 GVMMR0DECL(int) GVMMR0CreateVM(PSUPDRVSESSION pSession, uint32_t cCpus, PVMCC *ppVM); 165 165 GVMMR0DECL(int) GVMMR0InitVM(PGVM pGVM); 166 166 GVMMR0DECL(void) GVMMR0DoneInitVM(PGVM pGVM); … … 173 173 GVMMR0DECL(int) GVMMR0ValidateGVMandVM(PGVM pGVM, PVM pVM); 174 174 GVMMR0DECL(int) GVMMR0ValidateGVMandVMandEMT(PGVM pGVM, PVM pVM, VMCPUID idCpu); 175 GVMMR0DECL(PVM )GVMMR0GetVMByEMT(RTNATIVETHREAD hEMT);175 GVMMR0DECL(PVMCC) GVMMR0GetVMByEMT(RTNATIVETHREAD hEMT); 176 176 GVMMR0DECL(PGVMCPU) GVMMR0GetGVCpuByEMT(RTNATIVETHREAD hEMT); 177 177 GVMMR0DECL(int) GVMMR0SchedHalt(PGVM pGVM, PVM pVM, PGVMCPU pGVCpu, uint64_t u64ExpireGipTime); -
trunk/include/VBox/vmm/vm.h
r80268 r80274 167 167 /** The CPU ID. 168 168 * This is the index into the VM::aCpu array. */ 169 #ifdef VBOX_BUGREF_9217 170 VMCPUID idCpuUnsafe; 171 #else 169 172 VMCPUID idCpu; 173 #endif 170 174 171 175 /** Align the structures below bit on a 64-byte boundary and make sure it starts … … 1156 1160 R3PTRTYPE(PSUPPAGE) paVMPagesR3; 1157 1161 /** Session handle. For use when calling SUPR0 APIs. */ 1162 #ifdef VBOX_BUGREF_9217 1163 PSUPDRVSESSION pSessionUnsafe; 1164 #else 1158 1165 PSUPDRVSESSION pSession; 1166 #endif 1159 1167 /** Pointer to the ring-3 VM structure. */ 1160 1168 PUVM pUVM; … … 1173 1181 1174 1182 /** The GVM VM handle. Only the GVM should modify this field. */ 1183 #ifdef VBOX_BUGREF_9217 1184 uint32_t hSelfUnsafe; 1185 #else 1175 1186 uint32_t hSelf; 1187 #endif 1176 1188 /** Number of virtual CPUs. */ 1177 1189 #if defined(VBOX_BUGREF_9217) && defined(IN_RING0) -
trunk/include/VBox/vmm/vmcc.h
r80268 r80274 76 76 * For enumerating VCpus in ascending order, avoiding unnecessary apCpusR0 77 77 * access in ring-0, caching the CPU count and not checking for CPU \#0. 78 * @note Close loop with VMCC_FOR_EACH_VMCPU_END. */ 79 /** @def VMCC_FOR_EACH_VMCPU_END 80 * Ends a VMCC_FOR_EACH_VMCPU loop. */ 78 * 79 * Defines local variables @c idCpu, @c pVCpu and @c cCpus. 80 * 81 * @param a_pVM The VM handle. 82 * 83 * @note Close loop with VMCC_FOR_EACH_VMCPU_END. 84 */ 81 85 #define VMCC_FOR_EACH_VMCPU(a_pVM) \ 82 { \86 do { \ 83 87 VMCPUID idCpu = 0; \ 84 88 VMCPUID const cCpus = (a_pVM)->cCpus; \ … … 86 90 for (;;) \ 87 91 { 92 93 /** @def VMCC_FOR_EACH_VMCPU_END 94 * Ends a VMCC_FOR_EACH_VMCPU loop. 95 * @param a_pVM The VM handle. 96 */ 88 97 #define VMCC_FOR_EACH_VMCPU_END(a_pVM) \ 89 98 /* advance */ \ … … 92 101 pVCpu = VMCC_GET_CPU(pVM, idCpu); \ 93 102 } \ 94 } do { } while(0) 103 } while (0) 104 105 /** 106 * Execute the given statement for each virtual CPU in an environment with 107 * @c pVCpu and @c idCpu variables. 108 * 109 * @param a_pVM The VM handle. 110 * @param a_Stmt The statement to execute. 111 */ 112 #define VMCC_FOR_EACH_VMCPU_STMT(a_pVM, a_Stmt) VMCC_FOR_EACH_VMCPU(pVM) { a_Stmt; } VMCC_FOR_EACH_VMCPU_END(pVM) 95 113 96 114 #endif /* !VBOX_INCLUDED_vmm_vmcc_h */ -
trunk/include/VBox/vmm/vmm.h
r80268 r80274 100 100 * @param pvUser The user argument. 101 101 */ 102 typedef DECLCALLBACK(int) FNVMMR0CALLRING3NOTIFICATION(PVMCPU pVCpu, VMMCALLRING3 enmOperation, void *pvUser);102 typedef DECLCALLBACK(int) FNVMMR0CALLRING3NOTIFICATION(PVMCPUCC pVCpu, VMMCALLRING3 enmOperation, void *pvUser); 103 103 /** Pointer to a FNRTMPNOTIFICATION(). */ 104 104 typedef FNVMMR0CALLRING3NOTIFICATION *PFNVMMR0CALLRING3NOTIFICATION; … … 530 530 * @{ 531 531 */ 532 VMMRZDECL(int) VMMRZCallRing3(PVM pVM, PVMCPU pVCpu, VMMCALLRING3 enmOperation, uint64_t uArg);533 VMMRZDECL(int) VMMRZCallRing3NoCpu(PVM pVM, VMMCALLRING3 enmOperation, uint64_t uArg);534 VMMRZDECL(void) VMMRZCallRing3Disable(PVMCPU pVCpu);535 VMMRZDECL(void) VMMRZCallRing3Enable(PVMCPU pVCpu);536 VMMRZDECL(bool) VMMRZCallRing3IsEnabled(PVMCPU pVCpu);537 VMMRZDECL(int) VMMRZCallRing3SetNotification(PVMCPU pVCpu, R0PTRTYPE(PFNVMMR0CALLRING3NOTIFICATION) pfnCallback, RTR0PTR pvUser);538 VMMRZDECL(void) VMMRZCallRing3RemoveNotification(PVMCPU pVCpu);539 VMMRZDECL(bool) VMMRZCallRing3IsNotificationSet(PVMCPU pVCpu);532 VMMRZDECL(int) VMMRZCallRing3(PVMCC pVMCC, PVMCPU pVCpu, VMMCALLRING3 enmOperation, uint64_t uArg); 533 VMMRZDECL(int) VMMRZCallRing3NoCpu(PVMCC pVM, VMMCALLRING3 enmOperation, uint64_t uArg); 534 VMMRZDECL(void) VMMRZCallRing3Disable(PVMCPUCC pVCpu); 535 VMMRZDECL(void) VMMRZCallRing3Enable(PVMCPUCC pVCpu); 536 VMMRZDECL(bool) VMMRZCallRing3IsEnabled(PVMCPUCC pVCpu); 537 VMMRZDECL(int) VMMRZCallRing3SetNotification(PVMCPUCC pVCpu, R0PTRTYPE(PFNVMMR0CALLRING3NOTIFICATION) pfnCallback, RTR0PTR pvUser); 538 VMMRZDECL(void) VMMRZCallRing3RemoveNotification(PVMCPUCC pVCpu); 539 VMMRZDECL(bool) VMMRZCallRing3IsNotificationSet(PVMCPUCC pVCpu); 540 540 /** @} */ 541 541 #endif
Note:
See TracChangeset
for help on using the changeset viewer.