Changeset 43977 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Nov 27, 2012 4:43:29 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r43961 r43977 282 282 283 283 /* Allocate one page for the virtual APIC page for TPR caching. */ 284 rc = RTR0MemObjAllocCont(&pVCpu->hm.s.vmx.hMemObjV APIC, PAGE_SIZE, false /* fExecutable */);284 rc = RTR0MemObjAllocCont(&pVCpu->hm.s.vmx.hMemObjVirtApic, PAGE_SIZE, false /* fExecutable */); 285 285 AssertRC(rc); 286 286 if (RT_FAILURE(rc)) 287 287 return rc; 288 288 289 pVCpu->hm.s.vmx.pbV APIC = (uint8_t *)RTR0MemObjAddress(pVCpu->hm.s.vmx.hMemObjVAPIC);290 pVCpu->hm.s.vmx.HCPhysV APIC = RTR0MemObjGetPagePhysAddr(pVCpu->hm.s.vmx.hMemObjVAPIC, 0);291 ASMMemZeroPage(pVCpu->hm.s.vmx.pbV APIC);289 pVCpu->hm.s.vmx.pbVirtApic = (uint8_t *)RTR0MemObjAddress(pVCpu->hm.s.vmx.hMemObjVirtApic); 290 pVCpu->hm.s.vmx.HCPhysVirtApic = RTR0MemObjGetPagePhysAddr(pVCpu->hm.s.vmx.hMemObjVirtApic, 0); 291 ASMMemZeroPage(pVCpu->hm.s.vmx.pbVirtApic); 292 292 293 293 /* Allocate the MSR bitmap if this feature is supported. */ … … 359 359 pVCpu->hm.s.vmx.HCPhysVMCS = 0; 360 360 } 361 if (pVCpu->hm.s.vmx.hMemObjV APIC!= NIL_RTR0MEMOBJ)362 { 363 RTR0MemObjFree(pVCpu->hm.s.vmx.hMemObjV APIC, false);364 pVCpu->hm.s.vmx.hMemObjV APIC= NIL_RTR0MEMOBJ;365 pVCpu->hm.s.vmx.pbV APIC= 0;366 pVCpu->hm.s.vmx.HCPhysV APIC= 0;361 if (pVCpu->hm.s.vmx.hMemObjVirtApic != NIL_RTR0MEMOBJ) 362 { 363 RTR0MemObjFree(pVCpu->hm.s.vmx.hMemObjVirtApic, false); 364 pVCpu->hm.s.vmx.hMemObjVirtApic = NIL_RTR0MEMOBJ; 365 pVCpu->hm.s.vmx.pbVirtApic = 0; 366 pVCpu->hm.s.vmx.HCPhysVirtApic = 0; 367 367 } 368 368 if (pVCpu->hm.s.vmx.hMemObjMsrBitmap != NIL_RTR0MEMOBJ) … … 706 706 /* Optional */ 707 707 rc = VMXWriteVmcs(VMX_VMCS32_CTRL_TPR_THRESHOLD, 0); 708 rc |= VMXWriteVmcs64(VMX_VMCS64_CTRL_VAPIC_PAGEADDR_FULL, pVCpu->hm.s.vmx.HCPhysV APIC);708 rc |= VMXWriteVmcs64(VMX_VMCS64_CTRL_VAPIC_PAGEADDR_FULL, pVCpu->hm.s.vmx.HCPhysVirtApic); 709 709 710 710 if (pVM->hm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC) … … 2811 2811 2812 2812 Assert(!(pVM->hm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC) 2813 || (pVCpu->hm.s.vmx.pbV APIC&& pVM->hm.s.vmx.pbApicAccess));2813 || (pVCpu->hm.s.vmx.pbVirtApic && pVM->hm.s.vmx.pbApicAccess)); 2814 2814 2815 2815 /* … … 3066 3066 AssertRC(rc2); 3067 3067 /* The TPR can be found at offset 0x80 in the APIC mmio page. */ 3068 pVCpu->hm.s.vmx.pbV APIC[0x80] = u8LastTPR;3068 pVCpu->hm.s.vmx.pbVirtApic[0x80] = u8LastTPR; 3069 3069 3070 3070 /* … … 3268 3268 { 3269 3269 Assert(pVM->hm.s.fTPRPatchingActive); 3270 pVCpu->hm.s.vmx.pbV APIC[0x80] = pCtx->msrLSTAR = ASMRdMsr(MSR_K8_LSTAR);3270 pVCpu->hm.s.vmx.pbVirtApic[0x80] = pCtx->msrLSTAR = ASMRdMsr(MSR_K8_LSTAR); 3271 3271 ASMWrMsr(MSR_K8_LSTAR, u64OldLSTAR); 3272 3272 } … … 3380 3380 */ 3381 3381 if ( fSetupTPRCaching 3382 && u8LastTPR != pVCpu->hm.s.vmx.pbV APIC[0x80])3383 { 3384 rc2 = PDMApicSetTPR(pVCpu, pVCpu->hm.s.vmx.pbV APIC[0x80]);3382 && u8LastTPR != pVCpu->hm.s.vmx.pbVirtApic[0x80]) 3383 { 3384 rc2 = PDMApicSetTPR(pVCpu, pVCpu->hm.s.vmx.pbVirtApic[0x80]); 3385 3385 AssertRC(rc2); 3386 3386 } -
trunk/src/VBox/VMM/include/HMInternal.h
r43947 r43977 550 550 uint64_t u64EntryCtls; 551 551 /** Physical address of the virtual APIC page for TPR caching. */ 552 RTHCPHYS HCPhysV APIC;552 RTHCPHYS HCPhysVirtApic; 553 553 /** R0 memory object for the virtual APIC page for TPR caching. */ 554 RTR0MEMOBJ hMemObjV APIC;554 RTR0MEMOBJ hMemObjVirtApic; 555 555 /** Virtual address of the virtual APIC page for TPR caching. */ 556 R0PTRTYPE(uint8_t *) pbV APIC;556 R0PTRTYPE(uint8_t *) pbVirtApic; 557 557 558 558 /** Current CR0 mask. */
Note:
See TracChangeset
for help on using the changeset viewer.