From: Peter Maydell Date: Mon, 4 Apr 2016 16:33:51 +0000 (+0100) Subject: linux-user: arm: Handle (ignore) EXCP_YIELD in ARM cpu_loop() X-Git-Tag: TizenStudio_2.0_p2.4~27^2~6^2~8^2~69^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f911e0a323f29ecc780a94380cfbf9f574c19eb7;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: Peter Maydell Message-id: 1456833171-31900-1-git-send-email-peter.maydell@linaro.org --- diff --git a/linux-user/main.c b/linux-user/main.c index b432bf2..5f3ec97 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -907,6 +907,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); @@ -1097,6 +1100,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();