- Timestamp:
- Dec 18, 2023 8:30:13 AM (17 months ago)
- svn:sync-xref-src-repo-rev:
- 160786
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r102621 r102630 1031 1031 bool fNt4LeafLimit; 1032 1032 bool fInvariantTsc; 1033 bool fInvariantApic; 1033 1034 bool fForceVme; 1034 1035 bool fNestedHWVirt; … … 1799 1800 1800 1801 /* Cpuid 6: Digital Thermal Sensor and Power Management Paramenters. 1801 * Intel: Various stuff. 1802 * AMD: EAX, EBX, EDX - reserved. 1802 * Intel: Various thermal and power management related stuff. 1803 * AMD: EBX, EDX - reserved. 1804 * EAX - Bit two is ARAT, indicating that APIC timers run at a constant 1805 * rate regardless of processor P-states. Same as Intel. 1803 1806 * ECX - Bit zero is EffFreq, indicating MSR_0000_00e7 and MSR_0000_00e8 1804 * present. Same as intel.1807 * present. Same as Intel. 1805 1808 * VIA: ?? 1806 1809 * 1807 * We clear everything here for now. 1808 */ 1809 cpumR3CpuIdZeroLeaf(pCpum, 6); 1810 * We clear everything except for the ARAT bit which is important for Windows 11. 1811 */ 1812 uSubLeaf = 0; 1813 while ((pCurLeaf = cpumR3CpuIdGetExactLeaf(pCpum, 6, uSubLeaf)) != NULL) 1814 { 1815 pCurLeaf->uEbx = pCurLeaf->uEcx = pCurLeaf->uEdx = 0; 1816 pCurLeaf->uEax &= 0 1817 | X86_CPUID_POWER_EAX_ARAT 1818 ; 1819 1820 /* Since we emulate the APIC timers, we can normally set the ARAT bit 1821 * regardless of whether the host CPU sets it or not. Intel sets the ARAT 1822 * bit circa since the Westmere generation, AMD probably only since Zen. 1823 * See @bugref{10567}. 1824 */ 1825 if (pConfig->fInvariantApic) 1826 pCurLeaf->uEax |= X86_CPUID_POWER_EAX_ARAT; 1827 1828 uSubLeaf++; 1829 } 1810 1830 1811 1831 /* Cpuid 7 + ECX: Structured Extended Feature Flags Enumeration … … 2710 2730 */ 2711 2731 rc = CFGMR3QueryBoolDef(pCpumCfg, "InvariantTsc", &pConfig->fInvariantTsc, true); 2732 AssertLogRelRCReturn(rc, rc); 2733 2734 /** @cfgm{/CPUM/InvariantApic, boolean, true} 2735 * Set the Always Running APIC Timer (ARAT) flag in lea if true; otherwise 2736 * pass through the host setting. The Windows 10/11 HAL won't use APIC timers 2737 * unless the ARAT bit is set. Note that both Intel and AMD set this bit. 2738 */ 2739 rc = CFGMR3QueryBoolDef(pCpumCfg, "InvariantApic", &pConfig->fInvariantApic, true); 2712 2740 AssertLogRelRCReturn(rc, rc); 2713 2741
Note:
See TracChangeset
for help on using the changeset viewer.