VirtualBox

Changeset 73166 in vbox


Ignore:
Timestamp:
Jul 17, 2018 5:20:32 AM (6 years ago)
Author:
vboxsync
Message:

VMM/HMSVMR0: Try use EMRZSetPendingIoPort[Read|Write] interface for pending IO ops.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r73152 r73166  
    70267026            Assert(!IoExitInfo.n.u1Rep);
    70277027
     7028            uint8_t const cbInstr = pVmcb->ctrl.u64ExitInfo2 - pCtx->rip;
    70287029            if (IoExitInfo.n.u1Type == SVM_IOIO_WRITE)
    70297030            {
    70307031                rcStrict = IOMIOPortWrite(pVM, pVCpu, IoExitInfo.n.u16Port, pCtx->eax & uAndVal, cbValue);
     7032                if (    rcStrict == VINF_IOM_R3_IOPORT_WRITE
     7033                    && !pCtx->eflags.Bits.u1TF)
     7034                    rcStrict = EMRZSetPendingIoPortWrite(pVCpu, IoExitInfo.n.u16Port, cbInstr, cbValue, pCtx->eax & uAndVal);
    70317035                STAM_COUNTER_INC(&pVCpu->hm.s.StatExitIOWrite);
    70327036            }
     
    70417045                    pCtx->eax = (pCtx->eax & ~uAndVal) | (u32Val & uAndVal);
    70427046                }
    7043                 else if (rcStrict == VINF_IOM_R3_IOPORT_READ)
    7044                 {
    7045                     HMR0SavePendingIOPortRead(pVCpu, pVCpu->cpum.GstCtx.rip, pVmcb->ctrl.u64ExitInfo2, IoExitInfo.n.u16Port,
    7046                                               uAndVal, cbValue);
    7047                 }
     7047                else if (    rcStrict == VINF_IOM_R3_IOPORT_READ
     7048                         && !pCtx->eflags.Bits.u1TF)
     7049                    rcStrict = EMRZSetPendingIoPortRead(pVCpu, IoExitInfo.n.u16Port, cbInstr, cbValue);
    70487050
    70497051                STAM_COUNTER_INC(&pVCpu->hm.s.StatExitIORead);
     
    71027104
    71037105#ifdef VBOX_STRICT
    7104         if (rcStrict == VINF_IOM_R3_IOPORT_READ)
     7106        if (   rcStrict == VINF_IOM_R3_IOPORT_READ
     7107            || rcStrict == VINF_EM_PENDING_R3_IOPORT_READ)
    71057108            Assert(IoExitInfo.n.u1Type == SVM_IOIO_READ);
    7106         else if (rcStrict == VINF_IOM_R3_IOPORT_WRITE || rcStrict == VINF_IOM_R3_IOPORT_COMMIT_WRITE)
     7109        else if (   rcStrict == VINF_IOM_R3_IOPORT_WRITE
     7110                 || rcStrict == VINF_IOM_R3_IOPORT_COMMIT_WRITE
     7111                 || rcStrict == VINF_EM_PENDING_R3_IOPORT_WRITE)
    71077112            Assert(IoExitInfo.n.u1Type == SVM_IOIO_WRITE);
    71087113        else
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