mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
kvm: x86: add mce support
Port qemu-kvm's MCE support commit c68b2374c9048812f488e00ffb95db66c0bc07a7 Author: Huang Ying <ying.huang@intel.com> Date: Mon Jul 20 10:00:53 2009 +0800 Add MCE simulation support to qemu/kvm KVM ioctls are used to initialize MCE simulation and inject MCE. The real MCE simulation is implemented in Linux kernel. The Kernel part has been merged. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
committed by
Anthony Liguori
parent
a8486bc9c9
commit
e7701825e1
@@ -27,6 +27,7 @@
|
||||
#include "exec-all.h"
|
||||
#include "qemu-common.h"
|
||||
#include "kvm.h"
|
||||
#include "kvm_x86.h"
|
||||
|
||||
//#define DEBUG_MMU
|
||||
|
||||
@@ -1030,6 +1031,11 @@ void cpu_inject_x86_mce(CPUState *cenv, int bank, uint64_t status,
|
||||
if (bank >= bank_num || !(status & MCI_STATUS_VAL))
|
||||
return;
|
||||
|
||||
if (kvm_enabled()) {
|
||||
kvm_inject_x86_mce(cenv, bank, status, mcg_status, addr, misc);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* if MSR_MCG_CTL is not all 1s, the uncorrected error
|
||||
* reporting is disabled
|
||||
|
||||
Reference in New Issue
Block a user