diff options
-rw-r--r-- | target-arm/helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 57cc879..c43d66f 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -5218,6 +5218,9 @@ static int bad_mode_switch(CPUARMState *env, int mode) * allows FIQ mode to be Secure-only. (In v8 this doesn't exist.) */ return 0; + case ARM_CPU_MODE_HYP: + return !arm_feature(env, ARM_FEATURE_EL2) + || arm_current_el(env) < 2 || arm_is_secure(env); case ARM_CPU_MODE_MON: return !arm_is_secure(env); default: |