VirtualBox

Changeset 96636 in vbox


Ignore:
Timestamp:
Sep 7, 2022 4:24:26 PM (2 years ago)
Author:
vboxsync
Message:

VMM/IEM: Align the bounce buffers on a 64 byte boundrary improve cacheline matching and make sure we've got well aligned data buffers. bugref:9898

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r96494 r96636  
    57705770        memset(pbBuf + cbMem, 0xaa, sizeof(pVCpu->iem.s.aBounceBuffers[iMemMap].ab) - cbMem);
    57715771#endif
     5772    AssertCompileMemberAlignment(VMCPU, iem.s.aBounceBuffers, 64);
    57725773
    57735774    /*
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r96624 r96636  
    642642    } aMemBbMappings[3];
    643643
     644    /* Ensure that aBounceBuffers are aligned at a 32 byte boundrary. */
     645    uint64_t                abAlignment7[1];
     646
    644647    /** Bounce buffer storage.
    645648     * This runs in parallel to aMemMappings and aMemBbMappings. */
     
    719722    uint8_t                 cLogRelWrMsr;
    720723    /** Alignment padding. */
    721     uint8_t                 abAlignment8[50];
     724    uint8_t                 abAlignment8[42];
    722725
    723726    /** Data TLB.
     
    741744} IEMCPU;
    742745AssertCompileMemberOffset(IEMCPU, fCurXcpt, 0x48);
     746AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 8);
     747AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 16);
     748AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 32);
     749AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 64);
    743750AssertCompileMemberAlignment(IEMCPU, DataTlb, 64);
    744751AssertCompileMemberAlignment(IEMCPU, CodeTlb, 64);
     752
    745753/** Pointer to the per-CPU IEM state. */
    746754typedef IEMCPU *PIEMCPU;
Note: See TracChangeset for help on using the changeset viewer.

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