[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/5] linux-user: arm: Handle (ignore) EXCP_YIELD in A
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 2/5] linux-user: arm: Handle (ignore) EXCP_YIELD in ARM cpu_loop() |
Date: |
Mon, 4 Apr 2016 17:43:09 +0100 |
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 <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden
---
linux-user/main.c | 6 ++++++
1 file changed, 6 insertions(+)
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();
--
1.9.1
- [Qemu-devel] [PULL 0/5] target-arm queue, Peter Maydell, 2016/04/04
- [Qemu-devel] [PULL 5/5] target-arm: Make the 64-bit version of VTCR do the migration, Peter Maydell, 2016/04/04
- [Qemu-devel] [PULL 3/5] target-arm: Correctly reset SCTLR_EL3 for 64-bit CPUs, Peter Maydell, 2016/04/04
- [Qemu-devel] [PULL 4/5] target-arm: Remove incorrect ALIAS tags from ESR_EL2 and ESR_EL3, Peter Maydell, 2016/04/04
- [Qemu-devel] [PULL 1/5] hw/arm/bcm2836: Wire up CPU timer interrupts correctly, Peter Maydell, 2016/04/04
- [Qemu-devel] [PULL 2/5] linux-user: arm: Handle (ignore) EXCP_YIELD in ARM cpu_loop(),
Peter Maydell <=
- Re: [Qemu-devel] [PULL 0/5] target-arm queue, Peter Maydell, 2016/04/05