Page MenuHomeFreeBSD

D60730.diff
No OneTemporary

D60730.diff

diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c
--- a/sys/amd64/amd64/initcpu.c
+++ b/sys/amd64/amd64/initcpu.c
@@ -375,11 +375,15 @@
* returns inaccurate values. That case is handled entirely by the
* family/model check above.
*
+ * Released versions of vmm erroneously advertise IRPERF support, so
+ * ignore it when running under bhyve.
+ *
* This runs on every core (BSP and each AP) via initializecpu();
* pmc_amd_initialize() later assumes IRPERF's enabled/disabled state
* is consistent across all cores.
*/
if ((amd_extended_feature_extensions & AMDFEID_IRPERF) &&
+ vm_guest != VM_GUEST_BHYVE &&
((CPUID_TO_FAMILY(cpu_id) > 0x17) ||
(CPUID_TO_FAMILY(cpu_id) == 0x17 && CPUID_TO_MODEL(cpu_id) >= 0x30))) {
wrmsr(MSR_HWCR, rdmsr(MSR_HWCR) | HWCR_IRPERFEN);

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 18, 4:04 PM (7 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40858623
Default Alt Text
D60730.diff (829 B)

Event Timeline