VirtualBox

Changeset 60847 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
May 5, 2016 3:24:46 PM (9 years ago)
Author:
vboxsync
Message:

IOM: New way of defer RC+R0 I/O port writes, prepping for MMIO writes.

Location:
trunk/src/VBox/VMM/VMMR0
Files:
4 edited

Legend:

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

    r59999 r60847  
    16261626    pVCpu->hm.s.PendingIO.s.Port.uAndVal  = uAndVal;
    16271627    pVCpu->hm.s.PendingIO.s.Port.cbSize   = cbSize;
     1628/** @todo IOM will do this stuff, retire the HM feature.   */
    16281629    return;
    16291630}
     
    16491650    pVCpu->hm.s.PendingIO.s.Port.uAndVal  = uAndVal;
    16501651    pVCpu->hm.s.PendingIO.s.Port.cbSize   = cbSize;
     1652/** @todo IOM will do this stuff, retire the HM feature.   */
    16511653    return;
    16521654}
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r60812 r60847  
    49864986                hmR0SvmSetPendingXcptDB(pVCpu);
    49874987            }
    4988             /* rcStrict is VINF_SUCCESS or in [VINF_EM_FIRST..VINF_EM_LAST]. */
     4988            /* rcStrict is VINF_SUCCESS, VINF_IOM_R3_IOPORT_COMMIT_WRITE, or in [VINF_EM_FIRST..VINF_EM_LAST],
     4989               however we can ditch VINF_IOM_R3_IOPORT_COMMIT_WRITE as it has VMCPU_FF_IOM as backup. */
    49894990            else if (   rcStrict2 != VINF_SUCCESS
    49904991                     && (rcStrict == VINF_SUCCESS || rcStrict2 < rcStrict))
    49914992                rcStrict = rcStrict2;
     4993            AssertCompile(VINF_EM_LAST < VINF_IOM_R3_IOPORT_COMMIT_WRITE);
    49924994
    49934995            HM_RESTORE_PREEMPT();
     
    50015003    if (rcStrict == VINF_IOM_R3_IOPORT_READ)
    50025004        Assert(IoExitInfo.n.u1Type == SVM_IOIO_READ);
    5003     else if (rcStrict == VINF_IOM_R3_IOPORT_WRITE)
     5005    else if (rcStrict == VINF_IOM_R3_IOPORT_WRITE || rcStrict == VINF_IOM_R3_IOPORT_COMMIT_WRITE)
    50045006        Assert(IoExitInfo.n.u1Type == SVM_IOIO_WRITE);
    50055007    else
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r60811 r60847  
    1236412364                hmR0VmxSetPendingXcptDB(pVCpu, pMixedCtx);
    1236512365            }
    12366             /* rcStrict is VINF_SUCCESS or in [VINF_EM_FIRST..VINF_EM_LAST]. */
     12366            /* rcStrict is VINF_SUCCESS, VINF_IOM_R3_IOPORT_COMMIT_WRITE, or in [VINF_EM_FIRST..VINF_EM_LAST],
     12367               however we can ditch VINF_IOM_R3_IOPORT_COMMIT_WRITE as it has VMCPU_FF_IOM as backup. */
    1236712368            else if (   rcStrict2 != VINF_SUCCESS
    1236812369                     && (rcStrict == VINF_SUCCESS || rcStrict2 < rcStrict))
    1236912370                rcStrict = rcStrict2;
     12371            AssertCompile(VINF_EM_LAST < VINF_IOM_R3_IOPORT_COMMIT_WRITE);
    1237012372
    1237112373            HM_RESTORE_PREEMPT();
     
    1237712379    if (rcStrict == VINF_IOM_R3_IOPORT_READ)
    1237812380        Assert(!fIOWrite);
    12379     else if (rcStrict == VINF_IOM_R3_IOPORT_WRITE)
     12381    else if (rcStrict == VINF_IOM_R3_IOPORT_WRITE || rcStrict == VINF_IOM_R3_IOPORT_COMMIT_WRITE)
    1238012382        Assert(fIOWrite);
    1238112383    else
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r60398 r60847  
    761761            STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetIOWrite);
    762762            break;
     763        case VINF_IOM_R3_IOPORT_COMMIT_WRITE:
     764            STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetIOCommitWrite);
     765            break;
    763766        case VINF_IOM_R3_MMIO_READ:
    764767            STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIORead);
     
    767770            STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOWrite);
    768771            break;
     772        case VINF_IOM_R3_MMIO_COMMIT_WRITE:
     773            STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOCommitWrite);
     774            break;
    769775        case VINF_IOM_R3_MMIO_READ_WRITE:
    770776            STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOReadWrite);
     
    825831            break;
    826832        case VINF_EM_RAW_TO_R3:
     833            STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3Total);
    827834            if (VM_FF_IS_PENDING(pVM, VM_FF_TM_VIRTUAL_SYNC))
    828835                STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3TMVirt);
     
    840847                STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3CritSect);
    841848            else if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_TO_R3))
    842                 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3);
     849                STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3FF);
     850            else if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_IEM))
     851                STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3Iem);
     852            else if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_IOM))
     853                STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3Iom);
    843854            else
    844855                STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3Unknown);
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