mirror of
				https://github.com/yuzu-emu/unicorn.git
				synced 2025-11-04 13:54:48 +00:00 
			
		
		
		
	target/arm: Fix reported EL for mte_check_fail
The reporting in AArch64.TagCheckFail only depends on PSTATE.EL, and not the AccType of the operation. There are two guest visible problems that affect LDTR and STTR because of this: (1) Selecting TCF0 vs TCF1 to decide on reporting, (2) Report "data abort same el" not "data abort lower el". Backports 50244cc76abcac3296cff3d84826f5ff71808c80
This commit is contained in:
		
							parent
							
								
									511636a3f4
								
							
						
					
					
						commit
						4f00eacb11
					
				| 
						 | 
					@ -501,14 +501,10 @@ static void mte_check_fail(CPUARMState *env, uint32_t desc,
 | 
				
			||||||
    reg_el = regime_el(env, arm_mmu_idx);
 | 
					    reg_el = regime_el(env, arm_mmu_idx);
 | 
				
			||||||
    sctlr = env->cp15.sctlr_el[reg_el];
 | 
					    sctlr = env->cp15.sctlr_el[reg_el];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (arm_mmu_idx) {
 | 
					    el = arm_current_el(env);
 | 
				
			||||||
    case ARMMMUIdx_E10_0:
 | 
					    if (el == 0) {
 | 
				
			||||||
    case ARMMMUIdx_E20_0:
 | 
					 | 
				
			||||||
        el = 0;
 | 
					 | 
				
			||||||
        tcf = extract64(sctlr, 38, 2);
 | 
					        tcf = extract64(sctlr, 38, 2);
 | 
				
			||||||
        break;
 | 
					    } else {
 | 
				
			||||||
    default:
 | 
					 | 
				
			||||||
        el = reg_el;
 | 
					 | 
				
			||||||
        tcf = extract64(sctlr, 40, 2);
 | 
					        tcf = extract64(sctlr, 40, 2);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue