Hi Richard, On 2022/1/27 14:34, Richard Henderson wrote:
+ if (el <= 2) { + if (hcr_el2 & HCR_E2H) { + /* Check CPTR_EL2.ZEN. */ + switch (extract32(env->cp15.cptr_el[2], 16, 2)) { + case 1: + if (el != 0 || !(hcr_el2 & HCR_TGE)) {
It looks to me that the code will be easier to follow if we can put '!(hcr_el2 & HCR_TGE)' before 'el != 0'.
+ break; + } + /* fall through */ + case 0: + case 2: + return 2; + }
Regardless, thanks for the fix. Reviewed-and-tested-by: Zenghui Yu <yuzeng...@huawei.com>