diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-03-02 08:56:06 +0100 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2011-03-15 01:19:05 -0300 |
commit | ac098781583bb1ca8369b5bd81fa5fbafa86231c (patch) | |
tree | c7510802574b1f32336bdfa3d3ac7c38d6812223 /target-i386 | |
parent | fbc1c7e6886290c72e78bac85db8e779d608b38b (diff) |
x86: Account for MCE in cpu_has_work
MCEs can be injected asynchronously, so they can also terminate the halt
state.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
CC: Huang Ying <ying.huang@intel.com>
CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
CC: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/exec.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/target-i386/exec.h b/target-i386/exec.h index 3e7386e91c..6f9f709d8a 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -293,15 +293,12 @@ static inline void load_eflags(int eflags, int update_mask) static inline int cpu_has_work(CPUState *env) { - int work; - - work = (env->interrupt_request & CPU_INTERRUPT_HARD) && - (env->eflags & IF_MASK); - work |= env->interrupt_request & CPU_INTERRUPT_NMI; - work |= env->interrupt_request & CPU_INTERRUPT_INIT; - work |= env->interrupt_request & CPU_INTERRUPT_SIPI; - - return work; + return ((env->interrupt_request & CPU_INTERRUPT_HARD) && + (env->eflags & IF_MASK)) || + (env->interrupt_request & (CPU_INTERRUPT_NMI | + CPU_INTERRUPT_INIT | + CPU_INTERRUPT_SIPI | + CPU_INTERRUPT_MCE)); } /* load efer and update the corresponding hflags. XXX: do consistency |