VirtualBox

Changeset 10010 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 30, 2008 9:39:04 AM (16 years ago)
Author:
vboxsync
Message:

Updates for 64 bits mode (invlpg - amd-v)

File:
1 edited

Legend:

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

    r9988 r10010  
    18681868    case PARMTYPE_IMMEDIATE:
    18691869    case PARMTYPE_ADDRESS:
    1870         if(!(param1.flags & PARAM_VAL32))
     1870        if(!(param1.flags & (PARAM_VAL32|PARAM_VAL64)))
    18711871            return VERR_EM_INTERPRETER;
    1872         addr = (RTGCPTR)param1.val.val32;
     1872        addr = param1.val.val64;
    18731873        break;
    18741874
     
    19081908static int SVMR0InterpretInvpg(PVM pVM, PCPUMCTXCORE pRegFrame, uint32_t uASID)
    19091909{
    1910     Assert(!CPUMIsGuestInLongMode(pVM));    /** @todo */
    19111910    /*
    1912      * Only allow 32-bit code.
     1911     * Only allow 32 & 64 bits code.
    19131912     */
    1914     if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_32BIT)
     1913    DISCPUMODE enmMode = SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid);
     1914    if (enmMode != CPUMODE_16BIT)
    19151915    {
    19161916        RTGCPTR pbCode;
     
    19211921            DISCPUSTATE Cpu;
    19221922
    1923             Cpu.mode = CPUMODE_32BIT;
     1923            Cpu.mode = enmMode;
    19241924            rc = EMInterpretDisasOneEx(pVM, pbCode, pRegFrame, &Cpu, &cbOp);
    19251925            Assert(VBOX_FAILURE(rc) || Cpu.pCurInstr->opcode == OP_INVLPG);
     
    19851985    Assert(pVM->hwaccm.s.fNestedPaging);
    19861986
    1987     Assert(!CPUMIsGuestInLongMode(pVM));    /** @todo */
    1988 
    19891987    /* Skip it if a TLB flush is already pending. */
    19901988    if (!fFlushPending)
     
    20052003
    20062004        /*
    2007         * Only allow 32-bit code.
    2008         */
    2009         if (SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT)
     2005         * Only allow 32 & 64 bits code.
     2006         */
     2007        DISCPUMODE enmMode = SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid);
     2008        if (enmMode != CPUMODE_16BIT)
    20102009        {
    20112010            RTGCPTR pbCode;
     
    20182017                RTGCPTR     addr;
    20192018
    2020                 Cpu.mode = CPUMODE_32BIT;
     2019                Cpu.mode = enmMode;
    20212020                rc = EMInterpretDisasOneEx(pVM, pbCode, CPUMCTX2CORE(pCtx), &Cpu, &cbOp);
    20222021                AssertRCReturn(rc, rc);
     
    20302029                case PARMTYPE_IMMEDIATE:
    20312030                case PARMTYPE_ADDRESS:
    2032                     AssertReturn((param1.flags & PARAM_VAL32), VERR_EM_INTERPRETER);
    2033 
    2034                     addr = (RTGCPTR)param1.val.val32;
     2031                    AssertReturn((param1.flags & (PARAM_VAL32|PARAM_VAL64)), VERR_EM_INTERPRETER);
     2032
     2033                    addr = param1.val.val64;
    20352034                    break;
    20362035
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