From 9e710d4396556a259801a3c7198b2e42ae0e7ce1 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 29 May 2012 15:30:01 +0200 Subject: [PATCH] target-arm: linux-user: no tb_flush on reset When running automoc4 as linux-user guest program, it segfaults right after it creates a thread. Bisecting pointed to commit a84fac1426 which introduces tb_flush on reset. So something in our thread creation is broken. But for now, let's revert the change to at least get a working build again. [AF: Rebased, fixed typo] --- target-arm/cpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 05e52e0..96f8cca 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -165,7 +165,11 @@ static void arm_cpu_reset(CPUState *s) * bake assumptions about into translated code, so we need to * tb_flush(). */ +#if !defined(CONFIG_USER_ONLY) + /* XXX hack alert! automoc4 segfaults after spawning a new thread with + * this flush enabled */ tb_flush(env); +#endif #ifndef CONFIG_USER_ONLY if (kvm_enabled()) { -- 2.7.4