VirtualBox

Changeset 17923 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 16, 2009 12:16:58 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
44486
Message:

Fixed pushf/popf emulation (VT-x, real-mode)

File:
1 edited

Legend:

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

    r17909 r17923  
    25882588
    25892589                        cbParm  = (Cpu.prefix & PREFIX_OPSIZE) ? 4 : 2;
    2590                         uMask   = (Cpu.prefix & PREFIX_ADDRSIZE) ? 0xffffffff : 0xffff;
     2590                        uMask   = (Cpu.prefix & PREFIX_OPSIZE) ? 0xffffffff : 0xffff;
    25912591
    25922592                        rc = SELMToFlatEx(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack);
     
    25962596                            break;
    25972597                        }
     2598                        eflags.u = 0;
    25982599#ifdef VBOX_WITH_NEW_PHYS_CODE
    2599                         eflags.u = 0;
    26002600                        rc = PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &eflags.u, cbParm);
    26012601                        if (RT_FAILURE(rc))
     
    26072607                        PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &eflags.u, cbParm);
    26082608#endif
    2609                         LogFlow(("POPF %x -> %RGv\n", eflags.u, pCtx->rsp));
     2609                        LogFlow(("POPF %x -> %RGv mask=%x\n", eflags.u, pCtx->rsp, uMask));
    26102610                        pCtx->eflags.u = (pCtx->eflags.u & ~(X86_EFL_POPF_BITS & uMask)) | (eflags.u & X86_EFL_POPF_BITS & uMask);
    26112611                        /* RF cleared when popped in real mode; see pushf description in AMD manual. */
     
    26262626
    26272627                        cbParm  = (Cpu.prefix & PREFIX_OPSIZE) ? 4 : 2;
    2628                         uMask   = (Cpu.prefix & PREFIX_ADDRSIZE) ? 0xffffffff : 0xffff;
     2628                        uMask   = (Cpu.prefix & PREFIX_OPSIZE) ? 0xffffffff : 0xffff;
    26292629
    26302630                        rc = SELMToFlatEx(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), (pCtx->esp - cbParm) & uMask, 0, &GCPtrStack);
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