Changeset 92579 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Nov 24, 2021 3:04:08 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-linux.cpp
r92578 r92579 1236 1236 1237 1237 /* 1238 * Stuff that goes into kvm_run::s.regs.sregs: 1239 */ 1240 /** @todo apic_base */ 1241 1238 * Stuff that goes into kvm_run::s.regs.sregs. 1239 * 1240 * Note! The apic_base can be ignored because we gets all MSR writes to it 1241 * and VBox always keeps the correct value. 1242 */ 1242 1243 bool fMaybeChangedMode = false; 1243 1244 bool fUpdateCr3 = false; … … 1337 1338 } 1338 1339 } 1339 1340 /** @todo apic_base */1341 1340 #undef NEM_LNX_IMPORT_SEG 1342 1341 } … … 1643 1642 /* 1644 1643 * Stuff that goes into kvm_run::s.regs.sregs: 1645 */ 1646 /** @todo apic_base */ 1647 if (fExtrn & ( CPUMCTX_EXTRN_SREG_MASK | CPUMCTX_EXTRN_TABLE_MASK | CPUMCTX_EXTRN_CR_MASK 1648 | CPUMCTX_EXTRN_EFER | CPUMCTX_EXTRN_APIC_TPR)) 1649 { 1644 * 1645 * The APIC base register updating is a little suboptimal... But at least 1646 * VBox always has the right base register value, so it's one directional. 1647 */ 1648 uint64_t const uApicBase = APICGetBaseMsrNoCheck(pVCpu); 1649 if ( (fExtrn & ( CPUMCTX_EXTRN_SREG_MASK | CPUMCTX_EXTRN_TABLE_MASK | CPUMCTX_EXTRN_CR_MASK 1650 | CPUMCTX_EXTRN_EFER | CPUMCTX_EXTRN_APIC_TPR)) 1651 || uApicBase != pVCpu->nem.s.uKvmApicBase) 1652 { 1653 if ((pVCpu->nem.s.uKvmApicBase ^ uApicBase) & MSR_IA32_APICBASE_EN) 1654 Log(("NEM/%u: APICBASE_EN changed %#010RX64 -> %#010RX64\n", pVCpu->idCpu, pVCpu->nem.s.uKvmApicBase, uApicBase)); 1655 pRun->s.regs.sregs.apic_base = uApicBase; 1656 pVCpu->nem.s.uKvmApicBase = uApicBase; 1657 1658 if (fExtrn & CPUMCTX_EXTRN_APIC_TPR) 1659 pRun->s.regs.sregs.cr8 = CPUMGetGuestCR8(pVCpu); 1660 1650 1661 #define NEM_LNX_EXPORT_SEG(a_KvmSeg, a_CtxSeg) do { \ 1651 1662 (a_KvmSeg).base = (a_CtxSeg).u64Base; \ … … 1713 1724 pRun->s.regs.sregs.cr4 = pCtx->cr4; 1714 1725 } 1715 if (fExtrn & CPUMCTX_EXTRN_APIC_TPR)1716 pRun->s.regs.sregs.cr8 = CPUMGetGuestCR8(pVCpu);1717 1726 if (fExtrn & CPUMCTX_EXTRN_EFER) 1718 1727 pRun->s.regs.sregs.efer = pCtx->msrEFER; 1719 1720 /** @todo apic_base */1721 1728 1722 1729 RT_ZERO(pRun->s.regs.sregs.interrupt_bitmap); /* this is an alternative interrupt injection interface */
Note:
See TracChangeset
for help on using the changeset viewer.