summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-04-04 17:33:51 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 20:01:34 -0600
commita188f2440a5fadba9170e8308e4fa8c1059f2287 (patch)
tree139dc528e46bd267c4878f430e562239c059ab42 /linux-user
parente7587cd2eac1545b7cbff8eb53f4d4e11f8311e1 (diff)
downloadhqemu-a188f2440a5fadba9170e8308e4fa8c1059f2287.zip
hqemu-a188f2440a5fadba9170e8308e4fa8c1059f2287.tar.gz
linux-user: arm: Handle (ignore) EXCP_YIELD in ARM cpu_loop()
The new-in-ARMv8 YIELD instruction has been implemented to throw an EXCP_YIELD back up to the QEMU main loop. In system emulation we use this to decide to schedule a different guest CPU in SMP configurations. In usermode emulation there is nothing to do, so just ignore it and resume the guest. This prevents an abort with "unhandled CPU exception 0x10004" if the guest process uses the YIELD instruction. Reported-by: Hunter Laux <hunterlaux@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1456833171-31900-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 50c6b84..f346790 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -920,6 +920,9 @@ void cpu_loop(CPUARMState *env)
if (do_kernel_trap(env))
goto error;
break;
+ case EXCP_YIELD:
+ /* nothing to do here for user-mode, just resume guest code */
+ break;
default:
error:
EXCP_DUMP(env, "qemu: unhandled CPU exception 0x%x - aborting\n", trapnr);
@@ -1113,6 +1116,9 @@ void cpu_loop(CPUARMState *env)
case EXCP_SEMIHOST:
env->xregs[0] = do_arm_semihosting(env);
break;
+ case EXCP_YIELD:
+ /* nothing to do here for user-mode, just resume guest code */
+ break;
default:
EXCP_DUMP(env, "qemu: unhandled CPU exception 0x%x - aborting\n", trapnr);
abort();
OpenPOWER on IntegriCloud