Changeset 53795 in vbox
- Timestamp:
- Jan 14, 2015 9:36:47 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/VBox/vmm/vm.h (modified) (1 diff)
-
include/VBox/vmm/vmapi.h (modified) (1 diff)
-
src/VBox/VMM/VMMR3/VMEmt.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r53630 r53795 695 695 #else 696 696 # define VMCPU_ASSERT_EMT_RETURN(pVCpu, rc) \ 697 AssertMsg (VMCPU_IS_EMT(pVCpu), \698 ("Not emulation thread! Thread=%RTnthrd ThreadEMT=%RTnthrd idCpu=%#x\n", \699 RTThreadNativeSelf(), (pVCpu)->hNativeThread, (pVCpu)->idCpu), \700 (rc))697 AssertMsgReturn(VMCPU_IS_EMT(pVCpu), \ 698 ("Not emulation thread! Thread=%RTnthrd ThreadEMT=%RTnthrd idCpu=%#x\n", \ 699 RTThreadNativeSelf(), (pVCpu)->hNativeThread, (pVCpu)->idCpu), \ 700 (rc)) 701 701 #endif 702 702 -
trunk/include/VBox/vmm/vmapi.h
r52419 r53795 472 472 VMMR3_INT_DECL(void) VMR3NotifyGlobalFFU(PUVM pUVM, uint32_t fFlags); 473 473 VMMR3_INT_DECL(void) VMR3NotifyCpuFFU(PUVMCPU pUVMCpu, uint32_t fFlags); 474 VMMR3DECL(int) VMR3NotifyCpuDeviceReady(PVM pVM, VMCPUID idCpu); 474 475 VMMR3_INT_DECL(int) VMR3WaitHalted(PVM pVM, PVMCPU pVCpu, bool fIgnoreInterrupts); 475 476 VMMR3_INT_DECL(int) VMR3WaitU(PUVMCPU pUVMCpu); 477 VMMR3DECL(int) VMR3WaitForDeviceReady(PVM pVM, VMCPUID idCpu); 476 478 VMMR3_INT_DECL(int) VMR3AsyncPdmNotificationWaitU(PUVMCPU pUVCpu); 477 479 VMMR3_INT_DECL(void) VMR3AsyncPdmNotificationWakeupU(PUVM pUVM); -
trunk/src/VBox/VMM/VMMR3/VMEmt.cpp
r51052 r53795 1023 1023 * sure EMT wakes up and promptly service an FF request. 1024 1024 * 1025 * @param pUV M Pointer to the user modeVM structure.1025 * @param pUVCpu Pointer to the user mode per CPU VM structure. 1026 1026 * @param fFlags Notification flags, VMNOTIFYFF_FLAGS_*. 1027 1027 * @internal … … 1046 1046 * @param fIgnoreInterrupts If set the VM_FF_INTERRUPT flags is ignored. 1047 1047 * @thread The emulation thread. 1048 * @remarks Made visible for implementing vmsvga sync register. 1048 1049 * @internal 1049 1050 */ … … 1296 1297 } 1297 1298 1299 1300 /** 1301 * Special interface for implementing a HLT-like port on a device. 1302 * 1303 * This can be called directly from device code, provide the device is trusted 1304 * to access the VMM directly. Since we may not have an accurate register set 1305 * and the caller certainly shouldn't (device code does not access CPU 1306 * registers), this function will return when interrupts are pending regardless 1307 * of the actual EFLAGS.IF state. 1308 * 1309 * @returns VBox error status (never informational statuses). 1310 * @param pVM The VM handle. 1311 * @param idCpu The id of the calling EMT. 1312 */ 1313 VMMR3DECL(int) VMR3WaitForDeviceReady(PVM pVM, VMCPUID idCpu) 1314 { 1315 /* 1316 * Validate caller and resolve the CPU ID. 1317 */ 1318 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 1319 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID); 1320 PVMCPU pVCpu = &pVM->aCpus[idCpu]; 1321 VMCPU_ASSERT_EMT_RETURN(pVCpu, VERR_VM_THREAD_NOT_EMT); 1322 1323 /* 1324 * Tag along with the HLT mechanics for now. 1325 */ 1326 int rc = VMR3WaitHalted(pVM, pVCpu, false /*fIgnoreInterrupts*/); 1327 if (RT_SUCCESS(rc)) 1328 return VINF_SUCCESS; 1329 return rc; 1330 } 1331 1332 1333 /** 1334 * Wakes up a CPU that has called VMR3WaitForDeviceReady. 1335 * 1336 * @returns VBox error status (never informational statuses). 1337 * @param pVM The VM handle. 1338 * @param idCpu The id of the calling EMT. 1339 */ 1340 VMMR3DECL(int) VMR3NotifyCpuDeviceReady(PVM pVM, VMCPUID idCpu) 1341 { 1342 /* 1343 * Validate caller and resolve the CPU ID. 1344 */ 1345 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 1346 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID); 1347 PVMCPU pVCpu = &pVM->aCpus[idCpu]; 1348 1349 /* 1350 * Pretend it was an FF that got set since we've got logic for that already. 1351 */ 1352 VMR3NotifyCpuFFU(pVCpu->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM); 1353 return VINF_SUCCESS; 1354 } 1355
Note:
See TracChangeset
for help on using the changeset viewer.

