[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/10] tcg: code_bitmap is not used by user-mode
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 06/10] tcg: code_bitmap is not used by user-mode emulation |
Date: |
Sat, 29 Aug 2015 09:13:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 28/08/2015 16:57, Peter Maydell wrote:
>> > More #ifdefs are not nice, but this clarifies why its usage is not
>> > protected by tb_lock.
> Does it? I thought the idea of this series was to add locking
> which we needed for adding multi-threading to softmmu, in
> which case presumably we need to protect this with a lock
> of some kind whether we're using softmmu or usermode.
No, the idea of the series was to base softmmu multi-threading on
user-mode multi-threading, and document what else needs to be done with
respect to common code.
Adding the necessary locks for softmmu only comes in the "extra" patches
11 and 12, and protecting code_bitmap with a lock (presumably tb_lock,
or its own lock, I don't know) would belong there. However I left this
job to Fred, and similarly for breakpoints.
I'm not sure if it makes sense to add locking (like patches 11 and 12)
in the absence of actual multi-threading. On one hand it would make it
simpler to commit the MTTCG work in steps. On the other hand it risks
bitrotting. The possibility of bitrot is another point in favor of
making more code #ifdef CONFIG_SOFTMMU; it would clearly identify areas
where locking correctness never matters in practice, and thus bugs may
be hidden.
Paolo
- Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses, (continued)
- [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header., Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PATCH 06/10] tcg: code_bitmap is not used by user-mode emulation, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PATCH 09/10] exec: make mmap_lock/mmap_unlock globally available, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/12
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Frederic Konrad, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Frederic Konrad, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Peter Maydell, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/13
- [Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation, Paolo Bonzini, 2015/08/12