<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/plugins, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/plugins?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/plugins?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-08-16T13:13:07Z</updated>
<entry>
<title>plugins: fix race condition with scoreboards</title>
<updated>2024-08-16T13:13:07Z</updated>
<author>
<name>Pierrick Bouvier</name>
<email>pierrick.bouvier@linaro.org</email>
</author>
<published>2024-08-13T20:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=278035fc81510bd88501afb78bd5ab652beffa76'/>
<id>urn:sha1:278035fc81510bd88501afb78bd5ab652beffa76</id>
<content type='text'>
A deadlock can be created if a new vcpu (a) triggers a scoreboard
reallocation, and another vcpu (b) wants to create a new scoreboard at
the same time.

In this case, (a) holds the plugin lock, and starts an exclusive
section, waiting for (b). But at the same time, (b) is waiting for
plugin lock.

The solution is to drop the lock before entering the exclusive section.

This bug can be easily reproduced by creating a callback for any tb
exec, that allocates a new scoreboard. In this case, as soon as we reach
more than 16 vcpus, the deadlock occurs.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2344
Signed-off-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Message-Id: &lt;20240812220748.95167-2-pierrick.bouvier@linaro.org&gt;
[AJB: tweak var position to meet coding style]
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240813202329.1237572-22-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>buildsys: Fix building without plugins on Darwin</title>
<updated>2024-08-16T13:04:19Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2024-08-13T20:23:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=20fdd01e51a2799f8185bc0ae0e3e000fb2ced7d'/>
<id>urn:sha1:20fdd01e51a2799f8185bc0ae0e3e000fb2ced7d</id>
<content type='text'>
Since commit 0082475e26 the plugin symbol list is unconditionally
added to the linker flags, leading to a build failure:

  Undefined symbols for architecture arm64:
    "_qemu_plugin_entry_code", referenced from:
        &lt;initial-undefines&gt;
  ...
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

Fix by restricting the whole meson file to the --enable-plugins
configure argument.

Fixes: 0082475e26 ("meson: merge plugin_ldflags into emulator_link_args")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2476
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Acked-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240813112457.92560-1-philmd@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240813202329.1237572-9-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugin/loader: handle basic help query</title>
<updated>2024-07-30T10:44:21Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2024-07-29T14:44:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=7b690fd3d039211a5bdde6a74b0ff95cb8b872b0'/>
<id>urn:sha1:7b690fd3d039211a5bdde6a74b0ff95cb8b872b0</id>
<content type='text'>
As the list of options isn't fixed we do all the parsing by hand.
Without any named arguments we automatically fill the "file" option
with the value give so check if it is requesting help and dump some
basic usage text.

Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240729144414.830369-15-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>accel/tcg: Move qemu_plugin_vcpu_init__async() to plugins/</title>
<updated>2024-07-05T11:34:55Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2024-07-05T08:40:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0f3974b64c7dd56e98ebcb98575932eadde421c6'/>
<id>urn:sha1:0f3974b64c7dd56e98ebcb98575932eadde421c6</id>
<content type='text'>
Calling qemu_plugin_vcpu_init__async() on the vCPU thread
is a detail of plugins, not relevant to TCG vCPU management.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Message-Id: &lt;20240606124010.2460-4-philmd@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240705084047.857176-30-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins: Ensure vCPU index is assigned in init/exit hooks</title>
<updated>2024-07-05T11:34:48Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2024-07-05T08:40:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=2089a2e5bb81a258b7d30bf51a2ab7447ecc4e7f'/>
<id>urn:sha1:2089a2e5bb81a258b7d30bf51a2ab7447ecc4e7f</id>
<content type='text'>
Since vCPUs are hashed by their index, this index can't
be uninitialized (UNASSIGNED_CPU_INDEX).

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Message-Id: &lt;20240606124010.2460-2-philmd@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240705084047.857176-28-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>meson: merge plugin_ldflags into emulator_link_args</title>
<updated>2024-07-03T16:41:25Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2024-06-06T13:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0082475e26430297ef65e598db5b67c8ac182620'/>
<id>urn:sha1:0082475e26430297ef65e598db5b67c8ac182620</id>
<content type='text'>
These serve the same purpose, except plugin_ldflags ends up in the linker
command line in a more roundabout way (through specific_ss).  Simplify.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>plugins: fix inject_mem_cb rw masking</title>
<updated>2024-06-24T09:15:16Z</updated>
<author>
<name>Pierrick Bouvier</name>
<email>pierrick.bouvier@linaro.org</email>
</author>
<published>2024-06-20T15:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=ca7d7f4276d4fd4711b693a78fec79652cf2ffc5'/>
<id>urn:sha1:ca7d7f4276d4fd4711b693a78fec79652cf2ffc5</id>
<content type='text'>
These are not booleans, but masks.
Issue found by Richard Henderson.

Fixes: f86fd4d8721 ("plugins: distinct types for callbacks")
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Signed-off-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Message-Id: &lt;20240612195147.93121-3-pierrick.bouvier@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240620152220.2192768-12-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins: add migration blocker</title>
<updated>2024-06-24T09:15:10Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2024-06-20T15:22:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=508036532c5ee1c72896f6b950e8629cf334e485'/>
<id>urn:sha1:508036532c5ee1c72896f6b950e8629cf334e485</id>
<content type='text'>
If the plugin in controlling time there is some state that might be
missing from the plugin tracking it. Migration is unlikely to work in
this case so lets put a migration blocker in to let the user know if
they try.

Suggested-by: Dr. David Alan Gilbert &lt;dave@treblig.org&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240620152220.2192768-10-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins: add time control API</title>
<updated>2024-06-24T09:15:04Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2024-06-20T15:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=847a65dd76bf1868c7966a2b2608dcd00cb68dc7'/>
<id>urn:sha1:847a65dd76bf1868c7966a2b2608dcd00cb68dc7</id>
<content type='text'>
Expose the ability to control time through the plugin API. Only one
plugin can control time so it has to request control when loaded.
There are probably more corner cases to catch here.

Signed-off-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
[AJB: tweaked user-mode handling, merged QEMU_PLUGIN_API fix]
Message-Id: &lt;20240530220610.1245424-6-pierrick.bouvier@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240620152220.2192768-9-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins: Ensure register handles are not NULL</title>
<updated>2024-06-24T09:14:22Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@daynix.com</email>
</author>
<published>2024-06-20T15:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=ad59d5caee26178b6719a2f38e931c89840b7350'/>
<id>urn:sha1:ad59d5caee26178b6719a2f38e931c89840b7350</id>
<content type='text'>
Ensure register handles are not NULL so that a plugin can assume NULL is
invalid as a register handle.

Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Reviewed-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Message-Id: &lt;20240229-null-v1-1-e716501d981e@daynix.com&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240620152220.2192768-4-alex.bennee@linaro.org&gt;
</content>
</entry>
</feed>
