qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/35] target/arm: Always honour HCR_EL2.TSC when HCR_EL2.NV


From: Richard Henderson
Subject: Re: [PATCH 07/35] target/arm: Always honour HCR_EL2.TSC when HCR_EL2.NV is set
Date: Thu, 28 Dec 2023 09:18:59 +1100
User-agent: Mozilla Thunderbird

On 12/18/23 22:32, Peter Maydell wrote:
The HCR_EL2.TSC trap for trapping EL1 execution of SMC instructions
has a behaviour change for FEAT_NV when EL3 is not implemented:

  * in older architecture versions TSC was required to have no
    effect (i.e. the SMC insn UNDEFs)
  * with FEAT_NV, when HCR_EL2.NV == 1 the trap must apply
    (i.e. SMC traps to EL2, as it already does in all cases when
    EL3 is implemented)
  * in newer architecture versions, the behaviour either without
    FEAT_NV or with FEAT_NV and HCR_EL2.NV == 0 is relaxed to
    an IMPDEF choice between UNDEF and trap-to-EL2 (i.e. it is
    permitted to always honour HCR_EL2.TSC) for AArch64 only

Add the condition to honour the trap bit when HCR_EL2.NV == 1.  We
leave the HCR_EL2.NV == 0 case with the existing (UNDEF) behaviour,
as our IMPDEF choice (both because it avoids a behaviour change
for older CPU models and because we'd have to distinguish AArch32
from AArch64 if we opted to trap to EL2).

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  target/arm/tcg/op_helper.c | 16 +++++++++++++---
  1 file changed, 13 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]