Changeset 81625 in vbox for trunk/src/VBox/Devices/VMMDev/VMMDevState.h
- Timestamp:
- Nov 1, 2019 8:47:17 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VMMDevState.h
r81571 r81625 137 137 uint32_t fHostCursorRequested; 138 138 139 /** Pointer to device instance - R3 poitner. */140 PPDMDEVINSR3 pDevInsR3;141 /** Pointer to device instance - R0 pointer. */142 PPDMDEVINSR0 pDevInsR0;143 144 /** LUN\#0 + Status: VMMDev port base interface. */145 PDMIBASE IBase;146 /** LUN\#0: VMMDev port interface. */147 PDMIVMMDEVPORT IPort;148 #ifdef VBOX_WITH_HGCM149 /** LUN\#0: HGCM port interface. */150 PDMIHGCMPORT IHGCMPort;151 //# if HC_ARCH_BITS == 32152 // RTR3PTR R3PtrAlignment1;153 //# endif154 #endif155 /** Pointer to base interface of the driver. */156 R3PTRTYPE(PPDMIBASE) pDrvBase;157 /** VMMDev connector interface */158 R3PTRTYPE(PPDMIVMMDEVCONNECTOR) pDrv;159 #ifdef VBOX_WITH_HGCM160 /** HGCM connector interface */161 R3PTRTYPE(PPDMIHGCMCONNECTOR) pHGCMDrv;162 #endif163 139 /** message buffer for backdoor logging. */ 164 140 char szMsg[512]; … … 185 161 bool fNewGuestFilterMaskValid; 186 162 /** Alignment padding. */ 187 bool afAlignment3[7]; 188 189 /** GC physical address of VMMDev RAM area */ 190 RTGCPHYS32 GCPhysVMMDevRAM; 191 /** R3 pointer to VMMDev RAM area */ 192 R3PTRTYPE(VMMDevMemory *) pVMMDevRAMR3; 193 /** R0 pointer to VMMDev RAM area - first page only, could be NULL! */ 194 R0PTRTYPE(VMMDevMemory *) pVMMDevRAMR0; 195 #ifdef VBOX_WITH_RAW_MODE_KEEP 196 /** R0 pointer to VMMDev RAM area - first page only, could be NULL! */ 197 RCPTRTYPE(VMMDevMemory *) pVMMDevRAMRC; 198 RTRCPTR RCPtrAlignment3b; 199 #endif 200 201 /** R3 pointer to VMMDev Heap RAM area. */ 202 R3PTRTYPE(VMMDevMemory *) pVMMDevHeapR3; 203 /** GC physical address of VMMDev Heap RAM area */ 204 RTGCPHYS32 GCPhysVMMDevHeap; 163 bool afAlignment3[3]; 205 164 206 165 /** Information reported by guest via VMMDevReportGuestInfo generic request. … … 236 195 DISPLAYCHANGEDATA displayChangeData; 237 196 238 /** Pointer to the credentials. */239 R3PTRTYPE(VMMDEVCREDS *) pCredentials;240 241 #if HC_ARCH_BITS == 32242 uint32_t uAlignment4;243 #endif244 245 197 /** memory balloon change request */ 246 198 uint32_t cMbMemoryBalloon; … … 271 223 uint64_t msLatchedHostTime; 272 224 bool fTimesyncBackdoorLo; 225 bool afAlignment6[1]; 226 #else 273 227 bool afAlignment6[2]; 274 #e lse275 bool afAlignment6[1+2]; 276 #endif 277 228 #endif 229 230 /** Set if guest should be allowed to trigger state save and power off. */ 231 bool fAllowGuestToSaveState; 278 232 /** Set if GetHostTime should fail. 279 233 * Loaded from the GetHostTimeDisabled configuration value. */ … … 292 246 /** Number of additional cores to keep around. */ 293 247 uint32_t cGuestCoreDumps; 294 295 #ifdef VBOX_WITH_HGCM296 /** List of pending HGCM requests (VBOXHGCMCMD). */297 RTLISTANCHORR3 listHGCMCmd;298 /** Critical section to protect the list. */299 RTCRITSECT critsectHGCMCmdList;300 /** Whether the HGCM events are already automatically enabled. */301 uint32_t u32HGCMEnabled;302 /** Saved state version of restored commands. */303 uint32_t u32SSMVersion;304 RTMEMCACHE hHgcmCmdCache;305 STAMPROFILE StatHgcmCmdArrival;306 STAMPROFILE StatHgcmCmdCompletion;307 STAMPROFILE StatHgcmCmdTotal;308 STAMCOUNTER StatHgcmLargeCmdAllocs;309 STAMCOUNTER StatHgcmFailedPageListLocking;310 #endif /* VBOX_WITH_HGCM */311 STAMCOUNTER StatReqBufAllocs;312 313 /** Per CPU request 4K sized buffers, allocated as needed. */314 R3PTRTYPE(VMMDevRequestHeader *) apReqBufs[VMM_MAX_CPU_COUNT];315 316 /** Status LUN: Shared folders LED */317 struct318 {319 /** The LED. */320 PDMLED Led;321 /** The LED ports. */322 PDMILEDPORTS ILeds;323 /** Partner of ILeds. */324 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;325 } SharedFolders;326 248 327 249 /** FLag whether CPU hotplug events are monitored */ … … 338 260 uint32_t StatMemBalloonChunks; 339 261 340 /** Set if RC/R0 is enabled. */341 bool fRZEnabled;342 262 /** Set if testing is enabled. */ 343 263 bool fTestingEnabled; … … 345 265 bool fTestingMMIO; 346 266 /** Alignment padding. */ 347 bool afPadding9[HC_ARCH_BITS == 32 ? 1 : 5];267 bool afPadding9[HC_ARCH_BITS == 32 ? 2 : 6]; 348 268 #ifndef VBOX_WITHOUT_TESTING_FEATURES 349 269 /** The high timestamp value. */ … … 383 303 uint8_t abReadBack[VMMDEV_TESTING_READBACK_SIZE]; 384 304 } TestingData; 385 /** The XML output file name (can be a named pipe, doesn't matter to us). */ 386 R3PTRTYPE(char *) pszTestingXmlOutput; 387 /** Testing instance for dealing with the output. */ 388 RTTEST hTestingTest; 305 306 /** Handle for the I/O ports used by the testing component. */ 307 IOMIOPORTHANDLE hIoPortTesting; 308 /** Handle for the MMIO region used by the testing component. */ 309 IOMMMIOHANDLE hMmioTesting; 389 310 #endif /* !VBOX_WITHOUT_TESTING_FEATURES */ 390 311 … … 406 327 uint64_t cNsHeartbeatTimeout; 407 328 /** Timer for signalling a flatlined guest. */ 408 PTMTIMERR3 pFlatlinedTimer;329 TMTIMERHANDLE hFlatlinedTimer; 409 330 /** @} */ 331 332 /** Handle for the backdoor logging I/O port. */ 333 IOMIOPORTHANDLE hIoPortBackdoorLog; 334 /** Handle for the alternative timesync I/O port. */ 335 IOMIOPORTHANDLE hIoPortAltTimesync; 336 /** Handle for the VMM request I/O port (PCI region \#0). */ 337 IOMIOPORTHANDLE hIoPortReq; 338 /** Handle for the fast VMM request I/O port (PCI region \#0). */ 339 IOMIOPORTHANDLE hIoPortFast; 340 /** Handle for the VMMDev RAM (PCI region \#1). */ 341 PGMMMIO2HANDLE hMmio2VMMDevRAM; 342 /** Handle for the VMMDev Heap (PCI region \#2). */ 343 PGMMMIO2HANDLE hMmio2Heap; 410 344 } VMMDEV; 411 /** Pointer to the VMM device state. */345 /** Pointer to the shared VMM device state. */ 412 346 typedef VMMDEV *PVMMDEV; 413 347 AssertCompileMemberAlignment(VMMDEV, CritSect, 8); … … 421 355 422 356 423 void VMMDevNotifyGuest(VMMDEV *pVMMDevState, uint32_t u32EventMask); 424 void VMMDevCtlSetGuestFilterMask(VMMDEV *pVMMDevState, uint32_t u32OrMask, uint32_t u32NotMask); 357 /** 358 * State structure for the VMM device, ring-3 edition. 359 */ 360 typedef struct VMMDEVR3 361 { 362 /** LUN\#0 + Status: VMMDev port base interface. */ 363 PDMIBASE IBase; 364 /** LUN\#0: VMMDev port interface. */ 365 PDMIVMMDEVPORT IPort; 366 #ifdef VBOX_WITH_HGCM 367 /** LUN\#0: HGCM port interface. */ 368 PDMIHGCMPORT IHGCMPort; 369 /** HGCM connector interface */ 370 R3PTRTYPE(PPDMIHGCMCONNECTOR) pHGCMDrv; 371 #endif 372 /** Pointer to base interface of the driver. */ 373 R3PTRTYPE(PPDMIBASE) pDrvBase; 374 /** VMMDev connector interface */ 375 R3PTRTYPE(PPDMIVMMDEVCONNECTOR) pDrv; 376 /** Pointer to the device instance. 377 * @note Only for interface methods to get their bearings. */ 378 PPDMDEVINSR3 pDevIns; 379 380 /** R3 pointer to VMMDev RAM area */ 381 R3PTRTYPE(VMMDevMemory *) pVMMDevRAMR3; 382 383 /** R3 pointer to VMMDev Heap RAM area. */ 384 R3PTRTYPE(VMMDevMemory *) pVMMDevHeapR3; 385 386 /** Pointer to the credentials. */ 387 R3PTRTYPE(VMMDEVCREDS *) pCredentials; 388 /** Set if pCredentials is using the RTMemSafer allocator, clear if heap. */ 389 bool fSaferCredentials; 390 bool afAlignment[7]; 391 392 #ifdef VBOX_WITH_HGCM 393 /** Critical section to protect the list. */ 394 RTCRITSECT critsectHGCMCmdList; 395 /** List of pending HGCM requests (VBOXHGCMCMD). */ 396 RTLISTANCHORR3 listHGCMCmd; 397 /** Whether the HGCM events are already automatically enabled. */ 398 uint32_t u32HGCMEnabled; 399 /** Saved state version of restored commands. */ 400 uint32_t uSavedStateVersion; 401 RTMEMCACHE hHgcmCmdCache; 402 STAMPROFILE StatHgcmCmdArrival; 403 STAMPROFILE StatHgcmCmdCompletion; 404 STAMPROFILE StatHgcmCmdTotal; 405 STAMCOUNTER StatHgcmLargeCmdAllocs; 406 STAMCOUNTER StatHgcmFailedPageListLocking; 407 #endif /* VBOX_WITH_HGCM */ 408 STAMCOUNTER StatReqBufAllocs; 409 /** Per CPU request 4K sized buffers, allocated as needed. */ 410 R3PTRTYPE(VMMDevRequestHeader *) apReqBufs[VMM_MAX_CPU_COUNT]; 411 412 /** Status LUN: Shared folders LED */ 413 struct 414 { 415 /** The LED. */ 416 PDMLED Led; 417 /** The LED ports. */ 418 PDMILEDPORTS ILeds; 419 /** Partner of ILeds. */ 420 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector; 421 } SharedFolders; 422 423 #ifndef VBOX_WITHOUT_TESTING_FEATURES 424 /** The XML output file name (can be a named pipe, doesn't matter to us). */ 425 R3PTRTYPE(char *) pszTestingXmlOutput; 426 /** Testing instance for dealing with the output. */ 427 RTTEST hTestingTest; 428 #endif 429 } VMMDEVR3; 430 /** Pointer to the ring-3 VMM device state. */ 431 typedef VMMDEVR3 *PVMMDEVR3; 432 433 434 /** 435 * State structure for the VMM device, ring-0 edition. 436 */ 437 typedef struct VMMDEVR0 438 { 439 /** R0 pointer to VMMDev RAM area - first page only, could be NULL! */ 440 R0PTRTYPE(VMMDevMemory *) pVMMDevRAMR0; 441 } VMMDEVR0; 442 /** Pointer to the ring-0 VMM device state. */ 443 typedef VMMDEVR0 *PVMMDEVR0; 444 445 446 /** 447 * State structure for the VMM device, raw-mode edition. 448 */ 449 typedef struct VMMDEVRC 450 { 451 /** R0 pointer to VMMDev RAM area - first page only, could be NULL! */ 452 RCPTRTYPE(VMMDevMemory *) pVMMDevRAMRC; 453 } VMMDEVRC; 454 /** Pointer to the raw-mode VMM device state. */ 455 typedef VMMDEVRC *PVMMDEVRC; 456 457 458 /** @typedef VMMDEVCC 459 * The VMMDEV device data for the current context. */ 460 typedef CTX_SUFF(VMMDEV) VMMDEVCC; 461 /** @typedef PVMMDEVCC 462 * Pointer to the VMMDEV device for the current context. */ 463 typedef CTX_SUFF(PVMMDEV) PVMMDEVCC; 464 465 466 void VMMDevNotifyGuest(PPDMDEVINS pDevIns, PVMMDEV pThis, PVMMDEVCC pThisCC, uint32_t fAddEvents); 467 void VMMDevCtlSetGuestFilterMask(PPDMDEVINS pDevIns, PVMMDEV pThis, PVMMDEVCC pThisCC, uint32_t fOrMask, uint32_t fNotMask); 425 468 426 469
Note:
See TracChangeset
for help on using the changeset viewer.