#define HYPERV_APIC_BUS_FREQUENCY (200000000ULL)
/* for kernel-irqchip=off */
#define HV_X64_MSR_APIC_FREQUENCY 0x40000023
+#define HV_X64_MSR_VP_ASSIST_PAGE 0x40000073
static bool is_modern_os = true;
}
}
}
+
+ /*
+ * Linux tries to use it anyway even when not exposed.
+ * Ignore the write as the VP assist page is not used.
+ */
+ if (vcpu->exit_ctx.MsrAccess.MsrNumber == HV_X64_MSR_VP_ASSIST_PAGE
+ && vcpu->exit_ctx.MsrAccess.AccessInfo.IsWrite
+ && !whpx_irqchip_in_kernel()
+ && whpx->hyperv_enlightenments_enabled) {
+ is_known_msr = 1;
+ }
+
/*
* For all unsupported MSR access we:
* ignore writes