|
@@ -22,6 +22,7 @@
|
|
|
#include "sysemu/tcg.h"
|
|
|
#include "exec/exec-all.h"
|
|
|
#include "qemu/plugin.h"
|
|
|
+#include "internal.h"
|
|
|
|
|
|
bool tcg_allowed;
|
|
|
|
|
@@ -81,6 +82,8 @@ void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc)
|
|
|
|
|
|
void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc)
|
|
|
{
|
|
|
+ /* Prevent looping if already executing in a serial context. */
|
|
|
+ g_assert(!cpu_in_serial_context(cpu));
|
|
|
cpu->exception_index = EXCP_ATOMIC;
|
|
|
cpu_loop_exit_restore(cpu, pc);
|
|
|
}
|