On Sun, Aug 23, 2015 at 18:09:48 -0700, Paolo Bonzini wrote: > On 23/08/2015 17:23, Emilio G. Cota wrote: > > Signed-off-by: Emilio G. Cota <c...@braap.org> > > --- > > cpu-exec.c | 9 ++++++--- > > exec.c | 2 +- > > hw/openrisc/cputimer.c | 2 +- > > qom/cpu.c | 4 ++-- > > target-arm/helper-a64.c | 2 +- > > target-arm/helper.c | 2 +- > > target-i386/helper.c | 2 +- > > target-i386/seg_helper.c | 14 +++++++------- > > target-i386/svm_helper.c | 4 ++-- > > target-openrisc/interrupt_helper.c | 2 +- > > target-openrisc/sys_helper.c | 2 +- > > target-ppc/excp_helper.c | 8 ++++---- > > target-ppc/helper_regs.h | 2 +- > > target-s390x/helper.c | 2 +- > > target-unicore32/softmmu.c | 2 +- > > translate-all.c | 4 ++-- > > 16 files changed, 33 insertions(+), 30 deletions(-) > > Is this needed if you have patch 23 anyway?
Sorry, this should have been in the commit log. This patch is needed as is. One real risk this is protecting against is the call of cpu_interrupt(cpu_foo) when the calling thread is not cpu_foo's thread--this write to interrupt_request might race with other writes, e.g. another call to cpu_interrupt from another thread, or the clearing of interrupt_request by cpu_foo. Patch 23 fixes another issue--bootup hangs without it. The amount of code wrapped by the iothread lock can be reduced, though. Will fix. Thanks, Emilio