VirtualBox

Changeset 71048 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Feb 19, 2018 9:21:43 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120911
Message:

VMM/IEM: Nested Hw.virt: Fix decode-assist fetching 15 bytes for SVM intercepted page-faults. Still a couple of todos left.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h

    r71036 r71048  
    963963            uint8_t const offOpCode = pVCpu->iem.s.offOpcode;
    964964            uint8_t const cbCurrent = pVCpu->iem.s.cbOpcode - pVCpu->iem.s.offOpcode;
    965             if (   cbCurrent > 0
    966                 && cbCurrent < sizeof(pVmcbCtrl->abInstr))
     965            if (cbCurrent >= SVM_CTRL_GUEST_INSTR_BYTES_MAX)
    967966            {
    968                 Assert(cbCurrent <= sizeof(pVCpu->iem.s.abOpcode));
    969                 memcpy(&pVmcbCtrl->abInstr[0], &pVCpu->iem.s.abOpcode[offOpCode], cbCurrent);
     967                Assert(cbCurrent <= RT_ELEMENTS(pVCpu->iem.s.abOpcode));
     968                memcpy(&pVmcbCtrl->abInstr[0], &pVCpu->iem.s.abOpcode[offOpCode], SVM_CTRL_GUEST_INSTR_BYTES_MAX);
     969            }
     970            else
     971            {
     972                /** @todo fetch 15 bytes from CS:RIP and stop fetching on exceptions or CS
     973                 *        limit is exceeded. */
    970974            }
    971975#endif
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