Changeset 101163 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Sep 18, 2023 8:44:24 PM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 159136
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInline.h
r100998 r101163 332 332 } 333 333 334 #ifdef VBOX_INCLUDED_vmm_dbgf_h /* VM::dbgf.ro.cEnabledHwBreakpoints is only accessible if VBox/vmm/dbgf.h is included. */ 334 335 335 336 /** … … 392 393 } 393 394 395 #endif /* VBOX_INCLUDED_vmm_dbgf_h */ 396 394 397 395 398 #ifndef IEM_WITH_OPAQUE_DECODER_STATE 396 399 397 400 # if defined(VBOX_INCLUDED_vmm_dbgf_h) || defined(DOXYGEN_RUNNING) /* dbgf.ro.cEnabledHwBreakpoints */ 401 398 402 /** 399 403 * Initializes the execution state. … … 458 462 # endif /* VBOX_STRICT */ 459 463 } 460 # endif /* VBOX_INCLUDED_vmm_dbgf_h */ 461 462 463 # if defined(VBOX_WITH_NESTED_HWVIRT_SVM) || defined(VBOX_WITH_NESTED_HWVIRT_VMX) 464 465 466 # if defined(VBOX_WITH_NESTED_HWVIRT_SVM) || defined(VBOX_WITH_NESTED_HWVIRT_VMX) 464 467 /** 465 468 * Performs a minimal reinitialization of the execution state. … … 477 480 iemOpcodeFlushHeavy(pVCpu, cbInstr); 478 481 } 479 # endif 480 482 # endif 483 484 # endif /* VBOX_INCLUDED_vmm_dbgf_h || DOXYGEN_RUNNING */ 481 485 482 486 /** … … 3564 3568 3565 3569 3570 # ifdef XAPIC_OFF_END /* Requires VBox/apic.h to be included before IEMInline.h. */ 3566 3571 /** 3567 3572 * Sets virtual-APIC write emulation as pending. … … 3588 3593 VMCPU_FF_SET(pVCpu, VMCPU_FF_VMX_APIC_WRITE); 3589 3594 } 3595 # endif /* XAPIC_OFF_END */ 3590 3596 3591 3597 #endif /* VBOX_WITH_NESTED_HWVIRT_VMX */ -
trunk/src/VBox/VMM/include/IEMInternal.h
r101111 r101163 742 742 AssertCompile(!(IEM_F_MODE_X86_64BIT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK)); 743 743 744 /** Native instruction type for use with the native code generator. 745 * This is a byte (uint8_t) for x86 and amd64 and uint32_t for the other(s). */ 746 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 747 typedef uint8_t IEMNATIVEINSTR; 748 #else 749 typedef uint32_t IEMNATIVEINSTR; 750 #endif 751 /** Pointer to a native instruction unit. */ 752 typedef IEMNATIVEINSTR *PIEMNATIVEINSTR; 753 744 754 /** 745 755 * A call for the threaded call table. … … 826 836 struct 827 837 { 828 uint8_t *pbCode; 829 /** Amount of code that pbCode points to. */ 830 uint32_t cbAllocated; 838 /** The native instructions. */ 839 PIEMNATIVEINSTR paInstructions; 840 /** Number of instructions pointed to by paInstructions. */ 841 uint32_t cInstructions; 831 842 } Native; 832 843 /** Generic view for zeroing when freeing. */ … … 974 985 /** Statistics: Time spend pruning. */ 975 986 STAMPROFILE StatPrune; 987 988 /** The delayed free list (see iemTbAlloctorScheduleForFree). */ 989 PIEMTB pDelayedFreeHead; 976 990 977 991 /** Allocation chunks. */ … … 1368 1382 * This is allocated once with maxed-out sizes and re-used afterwards. */ 1369 1383 R3PTRTYPE(PIEMTB) pThrdCompileTbR3; 1370 /** Fixed TB used for native recompilation.1371 * This is allocated once and re-used afterwards, growing individual1372 * components as needed. */1373 R3PTRTYPE(PIEMTB) pNativeCompileTbR3;1374 1384 /** Pointer to the ring-3 TB cache for this EMT. */ 1375 1385 R3PTRTYPE(PIEMTBCACHE) pTbCacheR3; … … 1378 1388 * RIP to opcode bytes stored in the TB (AMD-V / VT-x). */ 1379 1389 uint64_t uCurTbStartPc; 1380 /** Number of TBs executed. */ 1381 uint64_t cTbExec; 1390 /** Number of threaded TBs executed. */ 1391 uint64_t cTbExecThreaded; 1392 /** Number of native TBs executed. */ 1393 uint64_t cTbExecNative; 1382 1394 /** Whether we need to check the opcode bytes for the current instruction. 1383 1395 * This is set by a previous instruction if it modified memory or similar. */ … … 1414 1426 /** Pointer to the ring-3 TB allocator for this EMT. */ 1415 1427 R3PTRTYPE(PIEMTBALLOCATOR) pTbAllocatorR3; 1416 /* Alignment. */ 1417 uint64_t auAlignment10[7]; 1428 /** Pointer to the ring-3 executable memory allocator for this EMT. */ 1429 R3PTRTYPE(struct IEMEXECMEMALLOCATOR *) pExecMemAllocatorR3; 1430 1431 /** Native recompiler state for ring-3. */ 1432 struct IEMRECOMPILERSTATE 1433 { 1434 /** Size of the buffer that pbNativeRecompileBufR3 points to in 1435 * IEMNATIVEINSTR units. */ 1436 uint32_t cInstrBufAlloc; 1437 uint32_t uPadding; /* We don't keep track of this here... */ 1438 /** Fixed temporary code buffer for native recompilation. */ 1439 R3PTRTYPE(PIEMNATIVEINSTR) pInstrBuf; 1440 1441 /** Actual number of labels in paLabels. */ 1442 uint32_t cLabels; 1443 /** Max number of entries allowed in paLabels before reallocating it. */ 1444 uint32_t cLabelsAlloc; 1445 /** Labels defined while recompiling (referenced by fixups). */ 1446 R3PTRTYPE(struct IEMNATIVELABEL *) paLabels; 1447 1448 /** Actual number of fixups paFixups. */ 1449 uint32_t cFixups; 1450 /** Max number of entries allowed in paFixups before reallocating it. */ 1451 uint32_t cFixupsAlloc; 1452 /** Buffer used by the recompiler for recording fixups when generating code. */ 1453 R3PTRTYPE(struct IEMNATIVEFIXUP *) paFixups; 1454 } Native; 1455 1456 // /* Alignment. */ 1457 // uint64_t auAlignment10[1]; 1418 1458 /** Statistics: Times TB execution was broken off before reaching the end. */ 1419 1459 STAMCOUNTER StatTbExecBreaks; … … 1430 1470 /** Threaded TB statistics: Number of calls per TB. */ 1431 1471 STAMPROFILE StatTbThreadedCalls; 1472 /** Native TB statistics: Native code size per TB. */ 1473 STAMPROFILE StatTbNativeCode; 1474 /** Native TB statistics: Profiling native recompilation. */ 1475 STAMPROFILE StatNativeRecompilation; 1432 1476 /** @} */ 1433 1477 … … 5290 5334 extern const PFNIEMOP g_apfnIemThreadedRecompilerVecMap3[1024]; 5291 5335 5292 DECLCALLBACK(int) iemTbInit(PVMCC pVM, uint32_t cInitialTbs, uint32_t cMaxTbs); 5293 void iemThreadedTbObsolete(PVMCPUCC pVCpu, PIEMTB pTb); 5336 DECLCALLBACK(int) iemTbInit(PVMCC pVM, uint32_t cInitialTbs, uint32_t cMaxTbs, 5337 uint64_t cbInitialExec, uint64_t cbMaxExec, uint32_t cbChunkExec); 5338 void iemThreadedTbObsolete(PVMCPUCC pVCpu, PIEMTB pTb, bool fSafeToFree); 5339 void iemTbAllocatorProcessDelayedFrees(PVMCPU pVCpu, PIEMTBALLOCATOR pTbAllocator); 5340 5294 5341 5295 5342 /** @todo FNIEMTHREADEDFUNC and friends may need more work... */ … … 5348 5395 bool iemThreadedCompileBeginEmitCallsComplications(PVMCPUCC pVCpu, PIEMTB pTb); 5349 5396 5397 /* Native recompiler public bits: */ 5398 PIEMTB iemNativeRecompile(PVMCPUCC pVCpu, PIEMTB pTb); 5399 int iemExecMemAllocatorInit(PVMCPU pVCpu, uint64_t cbMax, uint64_t cbInitial, uint32_t cbChunk); 5400 void iemExecMemAllocatorFree(PVMCPU pVCpu, void *pv, size_t cb); 5401 5350 5402 5351 5403 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.