Changeset 12746 in vbox
- Timestamp:
- Sep 25, 2008 3:18:01 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r12744 r12746 522 522 523 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);524 rc = PDMR3VMMDevHeapAlloc(pVM, HWACCM_VTX_TSS_SIZE, (RTR3PTR *)&pVM->hwaccm.s.vmx.pRealModeTSS); 525 525 AssertRC(rc); 526 526 if (RT_FAILURE(rc)) … … 533 533 memset(pVM->hwaccm.s.vmx.pRealModeTSS->IntRedirBitmap, 0x0, sizeof(pVM->hwaccm.s.vmx.pRealModeTSS->IntRedirBitmap)); 534 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); 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; 536 537 537 538 rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_SETUP_VM, 0, NULL); -
trunk/src/VBox/VMM/HWACCMInternal.h
r12703 r12746 121 121 /** Maxium resume loops allowed in ring 0 (safety precaution) */ 122 122 #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) 123 126 124 127 /** HWACCM SSM version -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r12745 r12746 794 794 795 795 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); 797 797 rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_BASE, GCPhys /* phys = virt in this mode */); 798 798
Note:
See TracChangeset
for help on using the changeset viewer.