Changeset 10110 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 2, 2008 2:22:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r10108 r10110 253 253 /* Program the control fields. Most of them never have to be changed again. */ 254 254 /* CR0/3/4 reads must be intercepted, our shadow values are not necessarily the same as the guest's. */ 255 /* Note: CR8 reads will refer to V_TPR, so no need to catch them. */256 255 /** @note CR0 & CR4 can be safely read when guest and shadow copies are identical. */ 257 256 if (!pVM->hwaccm.s.fNestedPaging) … … 264 263 */ 265 264 if (!pVM->hwaccm.s.fNestedPaging) 266 pVMCB->ctrl.u16InterceptWrCRx = RT_BIT(0) | RT_BIT(3) | RT_BIT(4) | RT_BIT(8);265 pVMCB->ctrl.u16InterceptWrCRx = RT_BIT(0) | RT_BIT(3) | RT_BIT(4); 267 266 else 268 pVMCB->ctrl.u16InterceptWrCRx = RT_BIT(0) | RT_BIT(4) | RT_BIT(8);267 pVMCB->ctrl.u16InterceptWrCRx = RT_BIT(0) | RT_BIT(4); 269 268 270 269 /* Intercept all DRx reads and writes. */ … … 744 743 #endif 745 744 745 /* TPR caching in CR8 */ 746 uint8_t u8TPR; 747 int rc = PDMApicGetTPR(pVM, &u8TPR); 748 AssertRC(rc); 749 pCtx->cr8 = u8TPR; 750 pVMCB->ctrl.IntCtrl.n.u8VTPR = u8TPR; 751 746 752 /* Done. */ 747 753 pVM->hwaccm.s.fContextUseFlags &= ~HWACCM_CHANGED_ALL_GUEST; … … 1106 1112 pCtx->dr6 = pVMCB->guest.u64DR6; 1107 1113 pCtx->dr7 = pVMCB->guest.u64DR7; 1114 1115 /* Update the APIC if the cached TPR value has changed. */ 1116 if (pVMCB->ctrl.IntCtrl.n.u8VTPR != pCtx->cr8) 1117 { 1118 rc = PDMApicSetTPR(pVM, pVMCB->ctrl.IntCtrl.n.u8VTPR); 1119 AssertRC(rc); 1120 pCtx->cr8 = pVMCB->ctrl.IntCtrl.n.u8VTPR; 1121 } 1122 pVMCB->ctrl.IntCtrl.n.u8VTPR = pCtx->cr8; 1108 1123 1109 1124 /* Check if an injected event was interrupted prematurely. */ … … 1494 1509 break; 1495 1510 case 8: 1511 AssertFailed(); /* shouldn't come here anymore */ 1496 1512 pVM->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_CR8; 1497 1513 break;
Note:
See TracChangeset
for help on using the changeset viewer.