VirtualBox

Changeset 10382 in vbox for trunk/src


Ignore:
Timestamp:
Jul 8, 2008 6:00:58 PM (17 years ago)
Author:
vboxsync
Message:

Refuse huge (>= _4G) REP prefixed transfers.

File:
1 edited

Legend:

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

    r10381 r10382  
    304304    if (pCpu->prefix & PREFIX_REP)
    305305    {
     306#ifndef IN_GC
     307        if (    CPUMIsGuestIn64BitCode(pVM, pRegFrame)
     308            &&  pRegFrame->rcx >= _4G)
     309            return VINF_EM_RAW_EMULATE_INSTR;
     310#endif
     311
    306312        cTransfers = pRegFrame->ecx;
    307313        if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
     
    545551    if (pCpu->prefix & PREFIX_REP)
    546552    {
     553#ifndef IN_GC
     554        if (    CPUMIsGuestIn64BitCode(pVM, pRegFrame)
     555            &&  pRegFrame->rcx >= _4G)
     556            return VINF_EM_RAW_EMULATE_INSTR;
     557#endif
     558
    547559        cTransfers = pRegFrame->ecx;
    548560        if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
     
    13211333    if (uPrefix & PREFIX_REP)
    13221334    {
     1335#ifndef IN_GC
     1336        if (    CPUMIsGuestIn64BitCode(pVM, pRegFrame)
     1337            &&  pRegFrame->rcx >= _4G)
     1338            return VINF_EM_RAW_EMULATE_INSTR;
     1339#endif
    13231340        cTransfers = pRegFrame->ecx;
    13241341
     
    14771494    if (uPrefix & PREFIX_REP)
    14781495    {
     1496#ifndef IN_GC
     1497        if (    CPUMIsGuestIn64BitCode(pVM, pRegFrame)
     1498            &&  pRegFrame->rcx >= _4G)
     1499            return VINF_EM_RAW_EMULATE_INSTR;
     1500#endif
    14791501        cTransfers = pRegFrame->ecx;
    14801502        if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
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