- Timestamp:
- May 27, 2011 11:28:52 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r37062 r37231 51 51 static bool hwaccmR0IsSubjectToVmxPreemptionTimerErratum(void); 52 52 static DECLCALLBACK(void) hwaccmR0PowerCallback(RTPOWEREVENT enmEvent, void *pvUser); 53 static DECLCALLBACK(void) hwaccmR0 CpuCallback(RTMPEVENT enmEvent, RTCPUID idCpu, void *pvData);53 static DECLCALLBACK(void) hwaccmR0MpEventCallback(RTMPEVENT enmEvent, RTCPUID idCpu, void *pvData); 54 54 55 55 /******************************************************************************* … … 499 499 if (!HWACCMR0Globals.vmx.fUsingSUPR0EnableVTx) 500 500 { 501 rc = RTMpNotificationRegister(hwaccmR0 CpuCallback, 0);501 rc = RTMpNotificationRegister(hwaccmR0MpEventCallback, NULL); 502 502 AssertRC(rc); 503 503 504 rc = RTPowerNotificationRegister(hwaccmR0PowerCallback, 0);504 rc = RTPowerNotificationRegister(hwaccmR0PowerCallback, NULL); 505 505 AssertRC(rc); 506 506 } … … 580 580 { 581 581 /* Doesn't really matter if this fails. */ 582 rc = RTMpNotificationDeregister(hwaccmR0CpuCallback, 0); 583 AssertRC(rc); 584 rc = RTPowerNotificationDeregister(hwaccmR0PowerCallback, 0); 585 AssertRC(rc); 582 rc = RTMpNotificationDeregister(hwaccmR0MpEventCallback, NULL); AssertRC(rc); 583 rc = RTPowerNotificationDeregister(hwaccmR0PowerCallback, NULL); AssertRC(rc); 586 584 } 587 585 else … … 603 601 604 602 /* Free the per-cpu pages used for VT-x and AMD-V */ 605 for (unsigned i =0;i<RT_ELEMENTS(HWACCMR0Globals.aCpuInfo);i++)603 for (unsigned i = 0; i < RT_ELEMENTS(HWACCMR0Globals.aCpuInfo); i++) 606 604 { 607 605 if (HWACCMR0Globals.aCpuInfo[i].pMemObj != NIL_RTR0MEMOBJ) … … 735 733 { 736 734 /* Allocate one page per cpu for the global vt-x and amd-v pages */ 737 for (unsigned i =0;i<RT_ELEMENTS(HWACCMR0Globals.aCpuInfo);i++)735 for (unsigned i = 0; i < RT_ELEMENTS(HWACCMR0Globals.aCpuInfo); i++) 738 736 { 739 737 Assert(!HWACCMR0Globals.aCpuInfo[i].pMemObj); 740 738 741 if (RTMpIsCpuPossible(RTMpCpuId ()))739 if (RTMpIsCpuPossible(RTMpCpuIdFromSetIndex(i))) 742 740 { 743 741 rc = RTR0MemObjAllocCont(&HWACCMR0Globals.aCpuInfo[i].pMemObj, 1 << PAGE_SHIFT, true /* executable R0 mapping */); … … 805 803 if (!pCpu->pMemObj) 806 804 { 807 LogRel(("HWACCMR0: hwaccmR0EnableCpu failed idCpu=%d.\n", idCpu)); 808 AssertFailed(); 805 AssertLogRelMsgFailed(("hwaccmR0EnableCpu failed idCpu=%u.\n", idCpu)); 809 806 return VERR_INTERNAL_ERROR; 810 807 } … … 900 897 * @param pvData Opaque data (PVM pointer). 901 898 */ 902 static DECLCALLBACK(void) hwaccmR0 CpuCallback(RTMPEVENT enmEvent, RTCPUID idCpu, void *pvData)899 static DECLCALLBACK(void) hwaccmR0MpEventCallback(RTMPEVENT enmEvent, RTCPUID idCpu, void *pvData) 903 900 { 904 901 /*
Note:
See TracChangeset
for help on using the changeset viewer.