VirtualBox

Changeset 12744 in vbox


Ignore:
Timestamp:
Sep 25, 2008 2:57:17 PM (16 years ago)
Author:
vboxsync
Message:

Enabled the real-mode VT-x TSS allocation again.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r12732 r12744  
    521521            pVM->hwaccm.s.fInitialized = true;
    522522
    523 #ifdef VBOX_WITH_VMMDEV_HEAP
    524             /* Allocate one page for the TSS we need for real mode emulation. */
    525             rc = PDMR3VMMDevHeapAlloc(pVM, sizeof(*pVM->hwaccm.s.vmx.pRealModeTSS), (RTR3PTR *)&pVM->hwaccm.s.vmx.pRealModeTSS);
     523            /* Allocate three pages for the TSS we need for real mode emulation. (2 page for the IO bitmap) */
     524            rc = PDMR3VMMDevHeapAlloc(pVM, sizeof(*pVM->hwaccm.s.vmx.pRealModeTSS) + 2*PAGE_SIZE, (RTR3PTR *)&pVM->hwaccm.s.vmx.pRealModeTSS);
    526525            AssertRC(rc);
    527526            if (RT_FAILURE(rc))
    528527                return rc;
    529528
    530             /* The I/O bitmap starts right after the virtual interrupt redirection bitmap. Outside the TSS on purpose; the CPU will not check it
    531              * for I/O operations. (but fault (#GP) on all IO instructions instead) */
     529            /* The I/O bitmap starts right after the virtual interrupt redirection bitmap. */
    532530            ASMMemZero32(pVM->hwaccm.s.vmx.pRealModeTSS, sizeof(*pVM->hwaccm.s.vmx.pRealModeTSS));
    533531            pVM->hwaccm.s.vmx.pRealModeTSS->offIoBitmap = sizeof(*pVM->hwaccm.s.vmx.pRealModeTSS);
    534532            /* Bit set to 0 means redirection enabled. */
    535533            memset(pVM->hwaccm.s.vmx.pRealModeTSS->IntRedirBitmap, 0x0, sizeof(pVM->hwaccm.s.vmx.pRealModeTSS->IntRedirBitmap));
    536 #endif
     534            /* Allow all port IO, so the VT-x IO intercepts do their job. */
     535            memset(pVM->hwaccm.s.vmx.pRealModeTSS + 1, 0xff, PAGE_SIZE*2);
    537536
    538537            rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
  • trunk/src/VBox/VMM/PDM.cpp

    r12696 r12744  
    12591259    Log(("PDMR3VMMDevHeapFree %VHv\n", pv));
    12601260
    1261     Assert(pVM->pdm.s.cbVMMDevHeapLeft == 0);
     1261    /* @todo not a real heap as there's currently only one user. */
    12621262    pVM->pdm.s.cbVMMDevHeapLeft = pVM->pdm.s.cbVMMDevHeap;
    12631263    return VINF_SUCCESS;
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