Changeset 45966 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 9, 2013 3:39:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45965 r45966 2485 2485 Assert(pVCpu->hm.s.vmx.HCPhysVirtApic); 2486 2486 2487 bool fPendingIntr = false; 2488 uint8_t u8GuestTpr = 0; 2489 rc = PDMApicGetTPR(pVCpu, &u8GuestTpr, &fPendingIntr, NULL /* pu8PendingIntr */); 2487 bool fPendingIntr = false; 2488 uint8_t u8Tpr = 0; 2489 uint8_t u8PendingIntr = 0; 2490 rc = PDMApicGetTPR(pVCpu, &u8Tpr, &fPendingIntr, &u8PendingIntr); 2490 2491 AssertRCReturn(rc, rc); 2491 2492 … … 2496 2497 * the interrupt when we VM-exit for other reasons. 2497 2498 */ 2498 pVCpu->hm.s.vmx.pbVirtApic[0x80] = u8GuestTpr; /* Offset 0x80 is TPR in the APIC MMIO range. */ 2499 /* Bits 3-0 of the TPR threshold field correspond to bits 7-4 of the TPR (which is the Task-Priority Class). */ 2500 uint32_t u32TprThreshold = fPendingIntr ? (u8GuestTpr >> 4) : 0; 2499 pVCpu->hm.s.vmx.pbVirtApic[0x80] = u8Tpr; /* Offset 0x80 is TPR in the APIC MMIO range. */ 2500 uint32_t u32TprThreshold = 0; 2501 if (fPendingIntr) 2502 { 2503 /* Bits 3-0 of the TPR threshold field correspond to bits 7-4 of the TPR (which is the Task-Priority Class). */ 2504 const uint8_t u8PendingPriority = (u8PendingIntr >> 4); 2505 const uint8_t u8TprPriority = (u8Tpr >> 4) & 7; 2506 if (u8PendingPriority <= u8TprPriority) 2507 u32TprThreshold = u8PendingPriority; 2508 } 2501 2509 Assert(!(u32TprThreshold & 0xfffffff0)); /* Bits 31:4 MBZ. */ 2502 2510 … … 2508 2516 { 2509 2517 Assert(!CPUMIsGuestInLongModeEx(pMixedCtx)); /* EFER always up-to-date. */ 2510 pMixedCtx->msrLSTAR = u8 GuestTpr;2518 pMixedCtx->msrLSTAR = u8Tpr; 2511 2519 if (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_MSR_BITMAPS) 2512 2520 {
Note:
See TracChangeset
for help on using the changeset viewer.