diff options
author | Huang Ying <ying.huang@intel.com> | 2009-07-20 10:00:53 +0800 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2009-07-20 12:37:47 -0300 |
commit | c68b2374c9048812f488e00ffb95db66c0bc07a7 (patch) | |
tree | 799e2a2cb6250b117462bcb955cef8e1bf1fbdbb /target-i386/helper.c | |
parent | replace qemu_kvm_cpu_env (diff) | |
download | qemu-kvm-c68b2374c9048812f488e00ffb95db66c0bc07a7.tar.gz qemu-kvm-c68b2374c9048812f488e00ffb95db66c0bc07a7.tar.bz2 qemu-kvm-c68b2374c9048812f488e00ffb95db66c0bc07a7.zip |
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.
ChangeLog:
v7:
- Re-based on qemu-kvm.git/next branch
v6:
- Re-based on latest qemu-kvm.git
v5:
- Re-based on latest qemu-kvm.git
v3:
- Re-based on qemu/tcg MCE support patch
v2:
- Use new kernel MCE capability exportion interface.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r-- | target-i386/helper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index 49cefc3e3..1d113ebce 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1509,6 +1509,11 @@ void cpu_inject_x86_mce(CPUState *cenv, int bank, uint64_t status, unsigned bank_num = mcg_cap & 0xff; uint64_t *banks = cenv->mce_banks; + if (kvm_enabled()) { + kvm_inject_x86_mce(cenv, bank, status, mcg_status, addr, misc); + return; + } + if (bank >= bank_num || !(status & MCI_STATUS_VAL)) return; |