Changeset 19593 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 12, 2009 7:56:07 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r19481 r19593 3256 3256 static int emR3HighPriorityPostForcedActions(PVM pVM, PVMCPU pVCpu, int rc) 3257 3257 { 3258 if (VM _FF_ISPENDING(pVM, VM_FF_PDM_CRITSECT))3259 PDMR3CritSectFF(pV M);3258 if (VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_PDM_CRITSECT)) 3259 PDMR3CritSectFF(pVCpu); 3260 3260 3261 3261 if (VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_CSAM_PENDING_ACTION)) -
trunk/src/VBox/VMM/PDMCritSect.cpp
r19439 r19593 295 295 * Process the critical sections queued for ring-3 'leave'. 296 296 * 297 * @param pV M The VMhandle.298 */ 299 VMMR3DECL(void) PDMR3CritSectFF(PVM pVM)300 { 301 Assert(pV M->pdm.s.cQueuedCritSectLeaves > 0);302 303 const RTUINT c = pV M->pdm.s.cQueuedCritSectLeaves;297 * @param pVCpu The VMCPU handle. 298 */ 299 VMMR3DECL(void) PDMR3CritSectFF(PVMCPU pVCpu) 300 { 301 Assert(pVCpu->pdm.s.cQueuedCritSectLeaves > 0); 302 303 const RTUINT c = pVCpu->pdm.s.cQueuedCritSectLeaves; 304 304 for (RTUINT i = 0; i < c; i++) 305 305 { 306 PPDMCRITSECT pCritSect = pV M->pdm.s.apQueuedCritSectsLeaves[i];306 PPDMCRITSECT pCritSect = pVCpu->pdm.s.apQueuedCritSectsLeaves[i]; 307 307 int rc = RTCritSectLeave(&pCritSect->s.Core); 308 308 LogFlow(("PDMR3CritSectFF: %p - %Rrc\n", pCritSect, rc)); … … 310 310 } 311 311 312 pV M->pdm.s.cQueuedCritSectLeaves = 0;313 VM _FF_CLEAR(pVM, VM_FF_PDM_CRITSECT);312 pVCpu->pdm.s.cQueuedCritSectLeaves = 0; 313 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_PDM_CRITSECT); 314 314 } 315 315 -
trunk/src/VBox/VMM/PDMInternal.h
r19475 r19593 797 797 typedef struct PDMASYNCCOMPLETIONMANAGER *PPDMASYNCCOMPLETIONMANAGER; 798 798 799 800 /** 801 * PDM VMCPU Instance data. 802 * Changes to this must checked against the padding of the cfgm union in VMCPU! 803 */ 804 typedef struct PDMCPU 805 { 806 /** The number of entries in the apQueuedCritSectsLeaves table that's currnetly in use. */ 807 RTUINT cQueuedCritSectLeaves; 808 RTUINT uPadding0; /**< Alignment padding.*/ 809 /** Critical sections queued in RC/R0 because of contention preventing leave to complete. (R3 Ptrs) 810 * We will return to Ring-3 ASAP, so this queue doesn't have to be very long. */ 811 R3PTRTYPE(PPDMCRITSECT) apQueuedCritSectsLeaves[8]; 812 } PDMCPU; 813 799 814 /** 800 815 * Converts a PDM pointer into a VM pointer. … … 850 865 RCPTRTYPE(PPDMQUEUE) pDevHlpQueueRC; 851 866 852 /** The number of entries in the apQueuedCritSectsLeaves table that's currnetly in use. */ 853 RTUINT cQueuedCritSectLeaves; 854 /** Critical sections queued in RC/R0 because of contention preventing leave to complete. (R3 Ptrs) 855 * We will return to Ring-3 ASAP, so this queue doesn't have to be very long. */ 856 R3PTRTYPE(PPDMCRITSECT) apQueuedCritSectsLeaves[8]; 867 RTUINT uPadding1; /**< Alignment padding. */ 857 868 858 869 /** Linked list of timer driven PDM queues. */ … … 867 878 RCPTRTYPE(struct PDMQUEUE *) pQueueFlushRC; 868 879 #if HC_ARCH_BITS == 64 869 RTRCPTR padding0;880 RTRCPTR uPadding2; 870 881 #endif 871 882 -
trunk/src/VBox/VMM/VMM.cpp
r19582 r19593 1687 1687 PRINT_FLAG(VM_FF_,PDM_QUEUES); 1688 1688 PRINT_FLAG(VM_FF_,PDM_DMA); 1689 PRINT_FLAG(VM_FF_,PDM_CRITSECT);1690 1689 PRINT_FLAG(VM_FF_,DBGF); 1691 1690 PRINT_FLAG(VM_FF_,REQUEST); … … 1728 1727 PRINT_FLAG(VMCPU_FF_,INTERRUPT_APIC); 1729 1728 PRINT_FLAG(VMCPU_FF_,INTERRUPT_PIC); 1729 PRINT_FLAG(VMCPU_FF_,PDM_CRITSECT); 1730 1730 PRINT_FLAG(VMCPU_FF_,PGM_SYNC_CR3); 1731 1731 PRINT_FLAG(VMCPU_FF_,PGM_SYNC_CR3_NON_GLOBAL); -
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r19590 r19593 253 253 * Queue the request. 254 254 */ 255 RTUINT i = pV M->pdm.s.cQueuedCritSectLeaves++;255 RTUINT i = pVCpu->pdm.s.cQueuedCritSectLeaves++; 256 256 LogFlow(("PDMCritSectLeave: [%d]=%p => R3\n", i, pCritSect)); 257 AssertFatal(i < RT_ELEMENTS(pV M->pdm.s.apQueuedCritSectsLeaves));258 pV M->pdm.s.apQueuedCritSectsLeaves[i] = MMHyperCCToR3(pVM, pCritSect);259 VM _FF_SET(pVM, VM_FF_PDM_CRITSECT);257 AssertFatal(i < RT_ELEMENTS(pVCpu->pdm.s.apQueuedCritSectsLeaves)); 258 pVCpu->pdm.s.apQueuedCritSectsLeaves[i] = MMHyperCCToR3(pVM, pCritSect); 259 VMCPU_FF_SET(pVCpu, VMCPU_FF_PDM_CRITSECT); 260 260 VMCPU_FF_SET(pVCpu, VMCPU_FF_TO_R3); 261 261 STAM_REL_COUNTER_INC(&pVM->pdm.s.StatQueuedCritSectLeaves); -
trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp
r19462 r19593 332 332 GEN_CHECK_OFF(PDM, pDevHlpQueueR0); 333 333 GEN_CHECK_OFF(PDM, pDevHlpQueueRC); 334 GEN_CHECK_OFF(PDM , cQueuedCritSectLeaves);335 GEN_CHECK_OFF(PDM , apQueuedCritSectsLeaves);334 GEN_CHECK_OFF(PDMCPU, cQueuedCritSectLeaves); 335 GEN_CHECK_OFF(PDMCPU, apQueuedCritSectsLeaves); 336 336 GEN_CHECK_OFF(PDM, pQueuesTimer); 337 337 GEN_CHECK_OFF(PDM, pQueuesForced);
Note:
See TracChangeset
for help on using the changeset viewer.