VirtualBox

Changeset 12664 in vbox for trunk/src


Ignore:
Timestamp:
Sep 23, 2008 10:33:35 AM (16 years ago)
Author:
vboxsync
Message:

IO breakpoint length implies an io range.

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

Legend:

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

    r12625 r12664  
    4747
    4848static int SVMR0InterpretInvpg(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uASID);
     49
     50/* IO operation lookup arrays. */
     51static uint32_t aIOSize[4]  = {1, 2, 0, 4};
    4952
    5053/**
     
    18611864                    for (unsigned i=0;i<4;i++)
    18621865                    {
    1863                         if (    pCtx->dr[i] == IoExitInfo.n.u16Port
     1866                        unsigned uBPLen = aIOSize[X86_DR7_GET_LEN(pCtx->dr[7], i)];
     1867
     1868                        if (    (IoExitInfo.n.u16Port >= pCtx->dr[i] && IoExitInfo.n.u16Port <= pCtx->dr[i] + uBPLen)
    18641869                            &&  (pCtx->dr[7] & (X86_DR7_L(i) | X86_DR7_G(i)))
    18651870                            &&  (pCtx->dr[7] & X86_DR7_RW(i, X86_DR7_RW_IO)) == X86_DR7_RW(i, X86_DR7_RW_IO))
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r12625 r12664  
    21742174                    for (unsigned i=0;i<4;i++)
    21752175                    {
    2176                         if (    pCtx->dr[i] == uPort
     2176                        unsigned uBPLen = aIOSize[X86_DR7_GET_LEN(pCtx->dr[7], i)];
     2177
     2178                        if (    (uPort >= pCtx->dr[i] && uPort <= pCtx->dr[i] + uBPLen)
    21772179                            &&  (pCtx->dr[7] & (X86_DR7_L(i) | X86_DR7_G(i)))
    21782180                            &&  (pCtx->dr[7] & X86_DR7_RW(i, X86_DR7_RW_IO)) == X86_DR7_RW(i, X86_DR7_RW_IO))
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