diff mbox

[Bug,1694998] Re: PPC: msgsnd instruction leads to assertion

Message ID 149735024413.7917.7058297931800314045.malone@gac.canonical.com
State New
Headers show

Commit Message

Thomas Huth June 13, 2017, 10:37 a.m. UTC
Could you please check whether this patch fixes the issue for you:
diff mbox

Patch

diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -17,6 +17,7 @@ 
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include "qemu/main-loop.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/exec-all.h"
@@ -1132,6 +1133,7 @@  void helper_msgsnd(target_ulong rb)
         return;
     }
 
+    qemu_mutex_lock_iothread();
     CPU_FOREACH(cs) {
         PowerPCCPU *cpu = POWERPC_CPU(cs);
         CPUPPCState *cenv = &cpu->env;
@@ -1141,5 +1143,6 @@  void helper_msgsnd(target_ulong rb)
             cpu_interrupt(cs, CPU_INTERRUPT_HARD);
         }
     }
+    qemu_mutex_unlock_iothread();
 }
 #endif