VirtualBox

Changeset 90597 in vbox for trunk/include


Ignore:
Timestamp:
Aug 10, 2021 1:08:35 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146208
Message:

VMM: Speed up VMMGetCpu in ring-0 by using hash table (via new GVMMR0GetGVCpuByGVMandEMT call). bugref:6695

Location:
trunk/include/VBox/vmm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/gvm.h

    r90380 r90597  
    193193        struct GVMMPERVM    s;
    194194#endif
    195         uint8_t             padding[256];
     195        uint8_t             padding[4352];
    196196    } gvmm;
    197197
  • trunk/include/VBox/vmm/gvm.mac

    r90380 r90597  
    6767
    6868        alignb 64
    69         .gvmm               resb 256
     69        .gvmm               resb 4352
    7070        alignb 64
    7171        .gmm                resb 1024
  • trunk/include/VBox/vmm/gvmm.h

    r85121 r90597  
    188188GVMMR0DECL(PVMCC)   GVMMR0GetVMByEMT(RTNATIVETHREAD hEMT);
    189189GVMMR0DECL(PGVMCPU) GVMMR0GetGVCpuByEMT(RTNATIVETHREAD hEMT);
     190GVMMR0DECL(PGVMCPU) GVMMR0GetGVCpuByGVMandEMT(PGVM pGVM, RTNATIVETHREAD hEMT);
    190191GVMMR0DECL(int)     GVMMR0SchedHalt(PGVM pGVM, PGVMCPU pGVCpu, uint64_t u64ExpireGipTime);
    191192GVMMR0DECL(int)     GVMMR0SchedHaltReq(PGVM pGVM, VMCPUID idCpu, uint64_t u64ExpireGipTime);
  • trunk/include/VBox/vmm/vm.h

    r90500 r90597  
    275275    /** Trace groups enable flags.  */
    276276    uint32_t                fTraceGroups;                           /* 64 / 44 */
    277     /** State data for use by ad hoc profiling. */
    278     uint32_t                uAdHoc;
     277    /** Number of collisions hashing the ring-0 EMT handle. */
     278    uint8_t                 cEmtHashCollisions;
     279    uint8_t                 abAdHoc[3];
    279280    /** Profiling samples for use by ad hoc profiling. */
    280281    STAMPROFILEADV          aStatAdHoc[8];                          /* size: 40*8 = 320 */
     
    12401241    /** @} */
    12411242
     1243    /** Max EMT hash lookup collisions (in GVMM). */
     1244    uint8_t                     cMaxEmtHashCollisions;
     1245
    12421246    /** Padding - the unions must be aligned on a 64 bytes boundary. */
    1243     uint8_t                     abAlignment3[HC_ARCH_BITS == 64 ? 24 : 52];
     1247    uint8_t                     abAlignment3[HC_ARCH_BITS == 64 ? 23 : 51];
    12441248
    12451249    /** CPUM part. */
  • trunk/include/VBox/vmm/vm.mac

    r90500 r90597  
    8383    alignb 64
    8484    .fTraceGroups           resd 1
    85     .uAdHoc                 resd 1
     85    .cEmtHashCollisions     resb 1
     86    .abAdHoc                resb 3
    8687    alignb 8
    8788    .aStatAdHoc             resb STAMPROFILEADV_size * 8
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette