summaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2009-06-23 10:05:14 +0800
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-09 16:04:53 -0500
commit7ad5372ff889df9cfff2c8cda9627f79537c8445 (patch)
treec9a9e72451d20ba2ae8e0f5a14301522281add70 /cpu-exec.c
parent47ea89f3d3003e74725472e04289020a497f99fe (diff)
downloadqemu-7ad5372ff889df9cfff2c8cda9627f79537c8445.tar.gz
qemu-7ad5372ff889df9cfff2c8cda9627f79537c8445.tar.bz2
qemu-7ad5372ff889df9cfff2c8cda9627f79537c8445.zip
QEMU: MCE: Add MCE simulation to qemu/tcg
- MCE features are initialized when VCPU is intialized according to CPUID. - A monitor command "mce" is added to inject a MCE. - A new interrupt mask: CPU_INTERRUPT_MCE is added to inject the MCE. aliguori: fix build for linux-user Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index db5cb5730e..38335f8b4f 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -400,6 +400,10 @@ int cpu_exec(CPUState *env1)
env->hflags2 |= HF2_NMI_MASK;
do_interrupt(EXCP02_NMI, 0, 0, 0, 1);
next_tb = 0;
+ } else if (interrupt_request & CPU_INTERRUPT_MCE) {
+ env->interrupt_request &= ~CPU_INTERRUPT_MCE;
+ do_interrupt(EXCP12_MCHK, 0, 0, 0, 0);
+ next_tb = 0;
} else if ((interrupt_request & CPU_INTERRUPT_HARD) &&
(((env->hflags2 & HF2_VINTR_MASK) &&
(env->hflags2 & HF2_HIF_MASK)) ||