Changeset 24251 in vbox
- Timestamp:
- Nov 2, 2009 1:13:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r24249 r24251 2259 2259 RTGCUINTPTR errCode, instrInfo; 2260 2260 bool fSetupTPRCaching = false; 2261 bool fRestoreLSTAR = false;2262 2261 uint64_t u64LSTAR = 0; 2263 2262 uint8_t u8LastTPR = 0; … … 2503 2502 /* A TPR change could activate a pending interrupt, so catch lstar writes. */ 2504 2503 vmxR0SetMSRPermission(pVCpu, MSR_K8_LSTAR, true, false); 2505 fRestoreLSTAR = false;2506 2504 } 2507 2505 else … … 2511 2509 */ 2512 2510 vmxR0SetMSRPermission(pVCpu, MSR_K8_LSTAR, true, true); 2513 2514 /* Must save the host LSTAR msr to restore it later. */2515 fRestoreLSTAR = true;2516 2511 } 2517 2512 } … … 2614 2609 2615 2610 /* Save the current TPR value in the LSTAR msr so our patches can access it. */ 2616 if ( fRestoreLSTAR)2611 if (pVM->hwaccm.s.fTPRPatchingActive) 2617 2612 { 2618 2613 Assert(pVM->hwaccm.s.fTPRPatchingActive); … … 2638 2633 2639 2634 /* Restore the host LSTAR msr if the guest could have changed it. */ 2640 if ( fRestoreLSTAR)2635 if (pVM->hwaccm.s.fTPRPatchingActive) 2641 2636 { 2642 2637 Assert(pVM->hwaccm.s.fTPRPatchingActive);
Note:
See TracChangeset
for help on using the changeset viewer.