diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 15:29:12 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 15:29:12 +0000 |
commit | 6bc56d317f7b5004ea2d89d264bddc8b4d081700 (patch) | |
tree | f046a973cf61a16137ce7aa86f1edef2222e1637 /linux-user | |
parent | 0bb1137930f51a89fb1bfeb0c46aa68af0395167 (diff) | |
parent | ba051fb5e56d5ff5e4fa672d37954452e58543b2 (diff) | |
download | qemu-6bc56d317f7b5004ea2d89d264bddc8b4d081700.zip qemu-6bc56d317f7b5004ea2d89d264bddc8b4d081700.tar.gz qemu-6bc56d317f7b5004ea2d89d264bddc8b4d081700.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-mttcg' into staging
Base patches for MTTCG enablement.
# gpg: Signature made Mon 31 Oct 2016 14:01:41 GMT
# gpg: using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream-mttcg:
tcg: move locking for tb_invalidate_phys_page_range up
*_run_on_cpu: introduce run_on_cpu_data type
cpus: re-factor out handle_icount_deadline
tcg: cpus rm tcg_exec_all()
tcg: move tcg_exec_all and helpers above thread fn
target-arm/arm-powerctl: wake up sleeping CPUs
tcg: protect translation related stuff with tb_lock.
translate-all: Add assert_(memory|tb)_lock annotations
linux-user/elfload: ensure mmap_lock() held while setting up
tcg: comment on which functions have to be called with tb_lock held
cpu-exec: include cpu_index in CPU_LOG_EXEC messages
translate-all: add DEBUG_LOCKING asserts
translate_all: DEBUG_FLUSH -> DEBUG_TB_FLUSH
cpus: make all_vcpus_paused() return bool
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 4 | ||||
-rw-r--r-- | linux-user/mmap.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 816272a..547053c 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1842,6 +1842,8 @@ static void load_elf_image(const char *image_name, int image_fd, info->pt_dynamic_addr = 0; #endif + mmap_lock(); + /* Find the maximum size of the image and allocate an appropriate amount of memory to handle that. */ loaddr = -1, hiaddr = 0; @@ -2002,6 +2004,8 @@ static void load_elf_image(const char *image_name, int image_fd, load_symbols(ehdr, image_fd, load_bias); } + mmap_unlock(); + close(image_fd); return; diff --git a/linux-user/mmap.c b/linux-user/mmap.c index ffd099d..61685bf 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -41,6 +41,11 @@ void mmap_unlock(void) } } +bool have_mmap_lock(void) +{ + return mmap_lock_count > 0 ? true : false; +} + /* Grab lock to make sure things are in a consistent state after fork(). */ void mmap_fork_start(void) { |