提交 6bfd26f3 编写于 作者: V vit9696

OcCpuLib: Fixed CPU detection crash with QEMU 5.0 and KVM accelerator

closes acidanthera/bugtracker#914
上级 b9f4fff5
......@@ -21,6 +21,7 @@ OpenCore Changelog
- Added partial hotkey support to OpenCanopy (e.g. Ctrl+Enter)
- Added builtin text renderer compatibility with Shell page mode
- Fixed `FadtEnableReset` with too small FACP tables
- Fixed CPU detection crash with QEMU 5.0 and KVM accelerator
#### v0.5.8
- Fixed invalid CPU object reference in SSDT-PLUG
......
......@@ -300,9 +300,15 @@ ScanIntelProcessor (
return;
}
if (Cpu->Model >= CPU_MODEL_SANDYBRIDGE) {
//
// Some virtual machines like QEMU 5.0 with KVM will fail to read this value.
// REF: https://github.com/acidanthera/bugtracker/issues/914
//
if (Cpu->Model >= CPU_MODEL_SANDYBRIDGE && !Cpu->Hypervisor) {
PkgCstConfigControl.Uint64 = AsmReadMsr64 (MSR_SANDY_BRIDGE_PKG_CST_CONFIG_CONTROL);
Cpu->CstConfigLock = PkgCstConfigControl.Bits.CFGLock == 1;
} else {
Cpu->CstConfigLock = FALSE;
}
//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册