VirtualBox

Changeset 9539

Show
Ignore:
Timestamp:
06/09/08 14:15:55 (6 months ago)
Author:
vboxsync
Message:

Some changes for amd64.
Lifted a restriction for executing code in VT-x (idt & tr): watch for regressions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/VMM/HWACCM.cpp

    r9383 r9539  
    635635    } 
    636636 
    637     /* @todo we can support real-mode by using v86 and protected mode without paging with identity mapped pages. 
     637    /* @todo we can support real-mode by using v86 with identity mapped pages. 
    638638     * (but do we really care?) 
    639639     */ 
     
    643643    /** @note The context supplied by REM is partial. If we add more checks here, be sure to verify that REM provides this info! */ 
    644644 
    645 #ifndef HWACCM_VMX_EMULATE_ALL 
     645#if 0 //ndef HWACCM_VMX_EMULATE_ALL 
    646646    /* Too early for VMX. */ 
    647647    if (pCtx->idtr.pIdt == 0 || pCtx->idtr.cbIdt == 0 || pCtx->tr == 0) 
    648648        return false; 
     649#endif 
    649650 
    650651    /* The guest is about to complete the switch to protected mode. Wait a bit longer. */ 
     652    /* Windows XP; switch to protected mode; all selectors are marked not present in the  
     653     * hidden registers (possible recompiler bug) */ 
    651654    if (pCtx->csHid.Attr.n.u1Present == 0) 
    652655        return false; 
    653656    if (pCtx->ssHid.Attr.n.u1Present == 0) 
    654657        return false; 
    655 #endif 
    656658 
    657659    if (pVM->hwaccm.s.vmx.fEnabled) 
  • trunk/src/VBox/VMM/PGM.cpp

    r9383 r9539  
    31473147        } 
    31483148 
    3149         //case PGMMODE_AMD64_NX: 
     3149        case PGMMODE_AMD64_NX: 
    31503150        case PGMMODE_AMD64: 
    31513151            GCPhysCR3 = CPUMGetGuestCR3(pVM) & 0xfffffffffffff000ULL; /** @todo define this mask! */ 
  • trunk/src/VBox/VMM/VMM.cpp

    r9281 r9539  
    17001700    } 
    17011701 
     1702    /* Do nothing if the switcher is disabled. */ 
     1703    if (pVM->vmm.s.fSwitcherDisabled) 
     1704        return VINF_SUCCESS; 
     1705 
    17021706    /* 
    17031707     * Select the new switcher. 
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r9300 r9539  
    581581    int rc; 
    582582 
    583     LogFlow(("PGMInvalidatePage: GCPtrPage=%VGv\n", GCPtrPage)); 
     583    Log2(("PGMInvalidatePage: GCPtrPage=%VGv\n", GCPtrPage)); 
    584584 
    585585    /** @todo merge PGMGCInvalidatePage with this one */ 
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r9212 r9539  
    398398{ 
    399399#if PGM_GST_TYPE == PGM_TYPE_32BIT \ 
    400  || PGM_GST_TYPE == PGM_TYPE_PAE \ 
    401  || PGM_GST_TYPE == PGM_TYPE_AMD64 
     400 || PGM_GST_TYPE == PGM_TYPE_PAE 
    402401 
    403402    LogFlow(("MapCR3: %VGp\n", GCPhysCR3)); 
     
    415414        { 
    416415            PGM_INVL_PG(pVM->pgm.s.GCPtrCR3Mapping); 
    417 #if PGM_GST_TYPE == PGM_TYPE_32BIT 
     416# if PGM_GST_TYPE == PGM_TYPE_32BIT 
    418417            pVM->pgm.s.pGuestPDHC = (R3R0PTRTYPE(PX86PD))HCPtrGuestCR3; 
    419418            pVM->pgm.s.pGuestPDGC = (RCPTRTYPE(PX86PD))pVM->pgm.s.GCPtrCR3Mapping; 
    420419 
    421 #elif PGM_GST_TYPE == PGM_TYPE_PAE 
     420# else /* PAE */ 
    422421            unsigned offset = GCPhysCR3 & GST_CR3_PAGE_MASK & PAGE_OFFSET_MASK; 
    423422            pVM->pgm.s.pGstPaePDPTHC = (R3R0PTRTYPE(PX86PDPT)) HCPtrGuestCR3; 
     
    455454                PGM_INVL_PG(GCPtr); 
    456455            } 
    457  
    458 #else /* PGM_GST_TYPE == PGM_TYPE_AMD64 */ 
    459             rc = VERR_NOT_IMPLEMENTED; 
    460 #endif 
     456# endif 
    461457        } 
    462458        else 
     
    466462        AssertMsgFailed(("rc=%Vrc GCPhysGuestPD=%VGp\n", rc, GCPhysCR3)); 
    467463 
    468 #else /* prot/real mode stub */ 
     464#else /* prot/real/amd64 mode stub */ 
    469465    int rc = VINF_SUCCESS; 
    470466#endif 
     
    500496 
    501497#elif PGM_GST_TYPE == PGM_TYPE_AMD64 
    502 //#error not implemented 
    503     rc = VERR_NOT_IMPLEMENTED; 
     498    /* nothing to do; vt-x/amd-v only */ 
    504499 
    505500#else /* prot/real mode stub */ 
     
    613608    } 
    614609 
    615 #elif PGM_GST_TYPE == PGM_TYPE_AMD64 
    616     AssertFailed(); 
    617610#else 
    618     /* prot/real mode stub */ 
     611    /* prot/real/amd64 mode stub */ 
    619612 
    620613#endif 
     
    680673        } 
    681674    } 
    682 #elif PGM_GST_TYPE == PGM_TYPE_AMD64 
    683     AssertFailed(); 
    684675#else 
    685     /* prot/real mode stub */ 
     676    /* prot/real/amd64 mode stub */ 
    686677#endif 
    687678    return rc; 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy