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>
This commit is contained in:
		
							parent
							
								
									fbc1c7e688
								
							
						
					
					
						commit
						ac09878158
					
				@ -293,15 +293,12 @@ static inline void load_eflags(int eflags, int update_mask)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static inline int cpu_has_work(CPUState *env)
 | 
					static inline int cpu_has_work(CPUState *env)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int work;
 | 
					    return ((env->interrupt_request & CPU_INTERRUPT_HARD) &&
 | 
				
			||||||
 | 
					            (env->eflags & IF_MASK)) ||
 | 
				
			||||||
    work = (env->interrupt_request & CPU_INTERRUPT_HARD) &&
 | 
					           (env->interrupt_request & (CPU_INTERRUPT_NMI |
 | 
				
			||||||
           (env->eflags & IF_MASK);
 | 
					                                      CPU_INTERRUPT_INIT |
 | 
				
			||||||
    work |= env->interrupt_request & CPU_INTERRUPT_NMI;
 | 
					                                      CPU_INTERRUPT_SIPI |
 | 
				
			||||||
    work |= env->interrupt_request & CPU_INTERRUPT_INIT;
 | 
					                                      CPU_INTERRUPT_MCE));
 | 
				
			||||||
    work |= env->interrupt_request & CPU_INTERRUPT_SIPI;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return work;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* load efer and update the corresponding hflags. XXX: do consistency
 | 
					/* load efer and update the corresponding hflags. XXX: do consistency
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user