mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 06:27:41 -07: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:
parent
a8486bc9c9
commit
e7701825e1
3 changed files with 111 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue