VirtualBox

Changeset 72490 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Jun 9, 2018 3:11:13 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122975
Message:

NEM,EM: Generic optimization of I/O port accesses that have to be executed in ring-3. Only NEM uses the feature for now. bugref:9044 bugref:9193

Location:
trunk/src/VBox/VMM/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/EMHandleRCTmpl.h

    r72488 r72490  
    221221
    222222        /*
     223         * Execute pending I/O Port access.
     224         */
     225        case VINF_EM_PENDING_R3_IOPORT_WRITE:
     226            rc = emR3ExecutePendingIoPortWrite(pVM, pVCpu);
     227            break;
     228        case VINF_EM_PENDING_R3_IOPORT_READ:
     229            rc = emR3ExecutePendingIoPortRead(pVM, pVCpu);
     230            break;
     231
     232        /*
    223233         * Memory mapped I/O access - emulate the instruction.
    224234         */
  • trunk/src/VBox/VMM/include/EMInternal.h

    r72488 r72490  
    378378    /** Current time slice value. */
    379379    uint64_t                u64TimeSliceExec;
    380     uint64_t                u64Alignment;
     380
     381    /** Pending ring-3 I/O port access (VINF_EM_PENDING_R3_IOPORT_READ / VINF_EM_PENDING_R3_IOPORT_WRITE). */
     382    struct
     383    {
     384        RTIOPORT            uPort;          /**< The I/O port number.*/
     385        uint8_t             cbValue;        /**< The value size in bytes.  Zero when not pending. */
     386        uint8_t             cbInstr;        /**< The instruction length. */
     387        uint32_t            uValue;         /**< The value to write. */
     388    } PendingIoPortAccess;
    381389
    382390    /** MWait halt state. */
    383391    struct
    384392    {
    385         uint32_t            fWait;          /** Type of mwait; see EMMWAIT_FLAG_*. */
     393        uint32_t            fWait;          /**< Type of mwait; see EMMWAIT_FLAG_*. */
    386394        uint32_t            u32Padding;
    387         RTGCPTR             uMWaitRAX;      /** MWAIT hints. */
    388         RTGCPTR             uMWaitRCX;      /** MWAIT extensions. */
    389         RTGCPTR             uMonitorRAX;    /** Monitored address. */
    390         RTGCPTR             uMonitorRCX;    /** Monitor extension. */
    391         RTGCPTR             uMonitorRDX;    /** Monitor hint. */
     395        RTGCPTR             uMWaitRAX;      /**< MWAIT hints. */
     396        RTGCPTR             uMWaitRCX;      /**< MWAIT extensions. */
     397        RTGCPTR             uMonitorRAX;    /**< Monitored address. */
     398        RTGCPTR             uMonitorRCX;    /**< Monitor extension. */
     399        RTGCPTR             uMonitorRDX;    /**< Monitor hint. */
    392400    } MWait;
    393401
     
    486494bool    emR3IsExecutionAllowed(PVM pVM, PVMCPU pVCpu);
    487495
     496VBOXSTRICTRC emR3ExecutePendingIoPortWrite(PVM pVM, PVMCPU pVCpu);
     497VBOXSTRICTRC emR3ExecutePendingIoPortRead(PVM pVM, PVMCPU pVCpu);
     498
    488499RT_C_DECLS_END
    489500
  • trunk/src/VBox/VMM/include/NEMInternal.h

    r72489 r72490  
    4545 */
    4646# define NEM_WIN_USE_HYPERCALLS_FOR_PAGES
    47 //# define NEM_WIN_USE_HYPERCALLS_FOR_REGISTERS
    48 //# define NEM_WIN_USE_OUR_OWN_RUN_API
     47# define NEM_WIN_USE_HYPERCALLS_FOR_REGISTERS
     48# define NEM_WIN_USE_OUR_OWN_RUN_API
    4949# if defined(NEM_WIN_USE_OUR_OWN_RUN_API) && !defined(NEM_WIN_USE_HYPERCALLS_FOR_REGISTERS)
    5050#  error "NEM_WIN_USE_OUR_OWN_RUN_API requires NEM_WIN_USE_HYPERCALLS_FOR_REGISTERS"
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