Re: [PATCH 3/4] target/arm: Fix {fp,sve}_exception_el for VHE mode running

2022-01-28 Thread Zenghui Yu via
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

Re: [PATCH 3/4] target/arm: Fix {fp, sve}_exception_el for VHE mode running

2022-01-28 Thread Peter Maydell
On Thu, 27 Jan 2022 at 06:34, Richard Henderson wrote: > > When HCR_EL2.E2H is set, the format of CPTR_EL2 changes to > look more like CPACR_EL1, with ZEN and FPEN fields instead > of TZ and TFP fields. > > Reported-by: Zenghui Yu > Signed-off-by: Richard Henderson > --- > target/arm/helper.c |

[PATCH 3/4] target/arm: Fix {fp, sve}_exception_el for VHE mode running

2022-01-26 Thread Richard Henderson
When HCR_EL2.E2H is set, the format of CPTR_EL2 changes to look more like CPACR_EL1, with ZEN and FPEN fields instead of TZ and TFP fields. Reported-by: Zenghui Yu Signed-off-by: Richard Henderson --- target/arm/helper.c | 77 +++-- 1 file changed, 60 ins