diff options
author | Alex Bennée | 2022-10-04 13:52:21 +0200 |
---|---|---|
committer | Alex Bennée | 2022-10-06 12:53:41 +0200 |
commit | f7e15affa8e574a800180de3bde1a6462aec7241 (patch) | |
tree | c759a5deb49756097f301652837b14ffc91ef6b2 /linux-user | |
parent | contrib/gitdm: add Université Grenoble Alpes (diff) | |
download | qemu-f7e15affa8e574a800180de3bde1a6462aec7241.tar.gz qemu-f7e15affa8e574a800180de3bde1a6462aec7241.tar.xz qemu-f7e15affa8e574a800180de3bde1a6462aec7241.zip |
plugins: add [pre|post]fork helpers to linux-user
Special care needs to be taken in ensuring locks are in a consistent
state across fork events. Add helpers so the plugin system can ensure
that.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/358
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221004115221.2174499-1-alex.bennee@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 88fccfe261..a17fed045b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -142,10 +142,12 @@ void fork_start(void) start_exclusive(); mmap_fork_start(); cpu_list_lock(); + qemu_plugin_user_prefork_lock(); } void fork_end(int child) { + qemu_plugin_user_postfork(child); mmap_fork_end(child); if (child) { CPUState *cpu, *next_cpu; |