diff options
author | Akihiko Odaki | 2022-08-19 15:27:54 +0200 |
---|---|---|
committer | Gerd Hoffmann | 2022-09-23 14:36:33 +0200 |
commit | bab6a301c58286229ca8fbc36728d1469f243260 (patch) | |
tree | 82377727d84f3d0a6c8348fe9073d530d1b4c3d9 /docs | |
parent | ui/console: Get tab completion working again in the SDL monitor vc (diff) | |
download | qemu-bab6a301c58286229ca8fbc36728d1469f243260.tar.gz qemu-bab6a301c58286229ca8fbc36728d1469f243260.tar.xz qemu-bab6a301c58286229ca8fbc36728d1469f243260.zip |
ui/cocoa: Run qemu_init in the main thread
This work is based on:
https://patchew.org/QEMU/20220317125534.38706-1-philippe.mathieu.daude@gmail.com/
Simplify the initialization dance by running qemu_init() in the main
thread before the Cocoa event loop starts. The secondary thread only
runs only qemu_main_loop() and qemu_cleanup().
This fixes a case where addRemovableDevicesMenuItems() calls
qmp_query_block() while expecting the main thread to still hold
the BQL.
Overriding the code after calling qemu_init() is done by dynamically
replacing a function pointer variable, qemu_main when initializing
ui/cocoa, which unifies the static implementation of main() for
builds with ui/cocoa and ones without ui/cocoa.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220819132756.74641-2-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/devel/fuzzing.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst index 784ecb99e6..715330c856 100644 --- a/docs/devel/fuzzing.rst +++ b/docs/devel/fuzzing.rst @@ -287,8 +287,8 @@ select the fuzz target. Then, the qtest client is initialized. If the target requires qos, qgraph is set up and the QOM/LIBQOS modules are initialized. Then the QGraph is walked and the QEMU cmd_line is determined and saved. -After this, the ``vl.c:qemu_main`` is called to set up the guest. There are -target-specific hooks that can be called before and after qemu_main, for +After this, the ``vl.c:main`` is called to set up the guest. There are +target-specific hooks that can be called before and after main, for additional setup(e.g. PCI setup, or VM snapshotting). ``LLVMFuzzerTestOneInput``: Uses qtest/qos functions to act based on the fuzz |