target-arm: Correct condition for taking VIRQ and VFIQ
The VIRQ and VFIQ exceptions are (as the comments say) only taken if the CPU is in Non-secure state and the IMO/FMO bits are set to enable virtualized interrupts. Correct the code to actually implement this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1414684132-23971-3-git-send-email-peter.maydell@linaro.org
This commit is contained in:
		
							parent
							
								
									b5c633c5bd
								
							
						
					
					
						commit
						9fae24f554
					
				@ -1269,13 +1269,13 @@ static inline bool arm_excp_unmasked(CPUState *cs, unsigned int excp_idx)
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        return !(env->daif & PSTATE_I);
 | 
					        return !(env->daif & PSTATE_I);
 | 
				
			||||||
    case EXCP_VFIQ:
 | 
					    case EXCP_VFIQ:
 | 
				
			||||||
        if (!secure && !(env->cp15.hcr_el2 & HCR_FMO)) {
 | 
					        if (secure || !(env->cp15.hcr_el2 & HCR_FMO)) {
 | 
				
			||||||
            /* VFIQs are only taken when hypervized and non-secure.  */
 | 
					            /* VFIQs are only taken when hypervized and non-secure.  */
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return !(env->daif & PSTATE_F);
 | 
					        return !(env->daif & PSTATE_F);
 | 
				
			||||||
    case EXCP_VIRQ:
 | 
					    case EXCP_VIRQ:
 | 
				
			||||||
        if (!secure && !(env->cp15.hcr_el2 & HCR_IMO)) {
 | 
					        if (secure || !(env->cp15.hcr_el2 & HCR_IMO)) {
 | 
				
			||||||
            /* VIRQs are only taken when hypervized and non-secure.  */
 | 
					            /* VIRQs are only taken when hypervized and non-secure.  */
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user