[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 22/38] cpu: update interrupt_request atomically
From: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [RFC 22/38] cpu: update interrupt_request atomically |
Date: |
Tue, 25 Aug 2015 16:36:12 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> > ---
> > 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
- Re: [Qemu-devel] [RFC 26/38] cpu: protect tb_jmp_cache with seqlock, (continued)
[Qemu-devel] [RFC 36/38] cputlb: use tcg_sched_work for tlb_flush_page_all, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 35/38] cputlb: use cpu_tcg_sched_work for tlb_flush_all, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 34/38] translate-all: use tcg_sched_work for tb_flush, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 19/38] tcg: add tcg_gen_smp_rmb(), Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 22/38] cpu: update interrupt_request atomically, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 31/38] cpu: protect l1_map with tb_lock in full-system mode, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 27/38] cpu-exec: convert tb_invalidated_flag into a per-TB flag, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 33/38] cpu: introduce cpu_tcg_sched_work to run work while other CPUs sleep, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 21/38] target-i386: emulate atomic instructions + barriers using AIE, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 38/38] Revert "target-i386: yield to another VCPU on PAUSE", Emilio G. Cota, 2015/08/23