VirtualBox

Changeset 12746 in vbox


Ignore:
Timestamp:
Sep 25, 2008 3:18:01 PM (16 years ago)
Author:
vboxsync
Message:

Bitmap corrections.

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

Legend:

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

    r12744 r12746  
    522522
    523523            /* 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);
     524            rc = PDMR3VMMDevHeapAlloc(pVM, HWACCM_VTX_TSS_SIZE, (RTR3PTR *)&pVM->hwaccm.s.vmx.pRealModeTSS);
    525525            AssertRC(rc);
    526526            if (RT_FAILURE(rc))
     
    533533            memset(pVM->hwaccm.s.vmx.pRealModeTSS->IntRedirBitmap, 0x0, sizeof(pVM->hwaccm.s.vmx.pRealModeTSS->IntRedirBitmap));
    534534            /* 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);
     535            memset(pVM->hwaccm.s.vmx.pRealModeTSS + 1, 0, PAGE_SIZE*2);
     536            *((unsigned char *)pVM->hwaccm.s.vmx.pRealModeTSS + HWACCM_VTX_TSS_SIZE - 2) = 0xff;
    536537
    537538            rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r12703 r12746  
    121121/** Maxium resume loops allowed in ring 0 (safety precaution) */
    122122#define HWACCM_MAX_RESUME_LOOPS             1024
     123
     124/** Size of the TSS structure + 2 pages for the IO bitmap + end byte. */
     125#define HWACCM_VTX_TSS_SIZE                 (sizeof(VBOXTSS) + 2*PAGE_SIZE + 1)
    123126
    124127/** HWACCM SSM version
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r12745 r12746  
    794794
    795795            rc =  VMXWriteVMCS(VMX_VMCS_GUEST_FIELD_TR,         0);
    796             rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_LIMIT,         sizeof(VBOXTSS) + 2*PAGE_SIZE);
     796            rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_LIMIT,         HWACCM_VTX_TSS_SIZE);
    797797            rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_BASE,          GCPhys /* phys = virt in this mode */);
    798798
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