VirtualBox

Ignore:
Timestamp:
Aug 1, 2021 8:56:10 PM (3 years ago)
Author:
vboxsync
Message:

VMMDev: New port for lock contention testing. bugref:6695

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r90266 r90461  
    2727#include <VBox/vmm/pdmifs.h>
    2828#ifndef VBOX_WITHOUT_TESTING_FEATURES
     29# include <VBox/vmm/pdmthread.h>
    2930# include <iprt/test.h>
    3031# include <VBox/VMMDevTesting.h>
     
    260261    uint32_t            StatMemBalloonChunks;
    261262
     263    /** @name Testing
     264     * @{ */
    262265    /** Set if testing is enabled. */
    263266    bool                fTestingEnabled;
     
    266269    /** Alignment padding. */
    267270    bool                afPadding9[HC_ARCH_BITS == 32 ? 2 : 6];
    268 #ifndef VBOX_WITHOUT_TESTING_FEATURES
     271#if !defined(VBOX_WITHOUT_TESTING_FEATURES) || defined(DOXYGEN_RUNNING)
    269272    /** The high timestamp value. */
    270273    uint32_t            u32TestingHighTimestamp;
     
    303306        uint8_t         abReadBack[VMMDEV_TESTING_READBACK_SIZE];
    304307    } TestingData;
    305 
     308    /** The locking testing control dword. */
     309    union
     310    {
     311        /** Plain view. */
     312        uint32_t        u32;
     313        struct
     314        {
     315            /** Number of microseconds to hold the lock. Zero means disabled. */
     316            uint32_t    cUsHold : 14;
     317            /** Number of microseconds to wait before retaking the lock again. */
     318            uint32_t    cUsBetween : 14;
     319            /** Reserved MBZ. */
     320            uint32_t    uReserved : 3;
     321            /** Whether to poke EMTs before releasing it. */
     322            uint32_t    fPokeBeforeRelease : 1;
     323        } s;
     324    } TestingLockControl;
     325    /** Alignment padding.  */
     326    uint32_t            uPadding10;
     327    /** Event semaphore that the locking thread blocks. */
     328    SUPSEMEVENT         hTestingLockEvt;
    306329    /** Handle for the I/O ports used by the testing component. */
    307330    IOMIOPORTHANDLE     hIoPortTesting;
    308331    /** Handle for the MMIO region used by the testing component. */
    309332    IOMMMIOHANDLE       hMmioTesting;
    310 #endif /* !VBOX_WITHOUT_TESTING_FEATURES */
     333#endif /* !VBOX_WITHOUT_TESTING_FEATURES || DOXYGEN_RUNNING */
     334    /** @} */
    311335
    312336    /** @name Heartbeat
     
    453477    /** Testing instance for dealing with the output. */
    454478    RTTEST                          hTestingTest;
     479    /** The locking test thread (). */
     480    PPDMTHREAD                      pTestingLockThread;
    455481#endif
    456482} VMMDEVR3;
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