Changeset 60459 in vbox
- Timestamp:
- Apr 12, 2016 2:31:58 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106548
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/APICAll.cpp
r60456 r60459 158 158 * @param idxFragment The index of the 32-bit fragment in @a 159 159 * pApicReg. 160 * @param u32Fragment The 32-bit vector fragment .160 * @param u32Fragment The 32-bit vector fragment to OR. 161 161 */ 162 162 DECLINLINE(void) apicOrVectorsToReg(volatile XAPIC256BITREG *pApicReg, size_t idxFragment, uint32_t u32Fragment) … … 164 164 Assert(idxFragment < RT_ELEMENTS(pApicReg->u)); 165 165 ASMAtomicOrU32(&pApicReg->u[idxFragment].u32Reg, u32Fragment); 166 } 167 168 169 /** 170 * Atomically AND's a fragment (32 vectors) into an APIC 171 * 256-bit sparse register. 172 * 173 * @param pApicReg The APIC 256-bit spare register. 174 * @param idxFragment The index of the 32-bit fragment in @a 175 * pApicReg. 176 * @param u32Fragment The 32-bit vector fragment to AND. 177 */ 178 DECLINLINE(void) apicAndVectorsToReg(volatile XAPIC256BITREG *pApicReg, size_t idxFragment, uint32_t u32Fragment) 179 { 180 Assert(idxFragment < RT_ELEMENTS(pApicReg->u)); 181 ASMAtomicAndU32(&pApicReg->u[idxFragment].u32Reg, u32Fragment); 166 182 } 167 183 … … 1290 1306 { 1291 1307 Assert(pApicCpu); 1292 Assert(TMTimerIsLockOwner( CTX_SUFF(pApicCpu->pTimer)));1308 Assert(TMTimerIsLockOwner(pApicCpu->CTX_SUFF(pTimer))); 1293 1309 1294 1310 if ( pApicCpu->uHintedTimerInitialCount != uInitialCount … … 2397 2413 2398 2414 /** 2399 * Updates pending interrupts from the pending interrupt bitmapto the IRR.2415 * Updates pending interrupts from the pending-interrupt bitmaps to the IRR. 2400 2416 * 2401 2417 * @param pVCpu The cross context virtual CPU structure. … … 2407 2423 PAPICCPU pApicCpu = VMCPU_TO_APICCPU(pVCpu); 2408 2424 PXAPICPAGE pXApicPage = VMCPU_TO_XAPICPAGE(pVCpu); 2425 2426 /* Update edge-triggered pending interrupts. */ 2409 2427 for (;;) 2410 2428 { … … 2418 2436 uint32_t const uFragment = ASMAtomicXchgU32(&pPib->aVectorBitmap[i], 0); 2419 2437 if (uFragment) 2438 { 2439 apicOrVectorsToReg(&pXApicPage->irr, i, uFragment); 2440 apicAndVectorsToReg(&pXApicPage->tmr, i, ~uFragment); 2441 } 2442 } 2443 } 2444 2445 /* Update level-triggered pending interrupts. */ 2446 for (;;) 2447 { 2448 bool const fAlreadySet = apicClearNotificationBitInPib(&pApicCpu->ApicPibLevel); 2449 if (!fAlreadySet) 2450 break; 2451 2452 PAPICPIB pPib = (PAPICPIB)&pApicCpu->ApicPibLevel; 2453 for (size_t i = 0; i < RT_ELEMENTS(pPib->aVectorBitmap); i++) 2454 { 2455 uint32_t const uFragment = ASMAtomicXchgU32(&pPib->aVectorBitmap[i], 0); 2456 if (uFragment) 2457 { 2420 2458 apicOrVectorsToReg(&pXApicPage->irr, i, uFragment); 2459 apicOrVectorsToReg(&pXApicPage->tmr, i, uFragment); 2460 } 2421 2461 } 2422 2462 } -
trunk/src/VBox/VMM/VMMR3/APIC.cpp
r60456 r60459 384 384 VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu); 385 385 386 LogFlow(("APIC%u: APICR3Reset\n", pVCpu->idCpu)); 387 386 388 #ifdef RT_STRICT 387 389 /* Verify that the initial APIC ID reported via CPUID matches our VMCPU ID assumption. */ … … 429 431 { 430 432 VMCPU_ASSERT_EMT(pVCpu); 433 LogFlow(("APIC%u: APICR3InitIpi\n", pVCpu->idCpu)); 431 434 apicR3InitIpi(pVCpu); 432 435 }
Note:
See TracChangeset
for help on using the changeset viewer.