<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/contrib/plugins/Makefile, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/contrib/plugins/Makefile?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/contrib/plugins/Makefile?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-07-30T10:44:21Z</updated>
<entry>
<title>contrib/plugins: be more vocal building</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:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=f0220d747a8b437d043d9344774cbeeb0b31be25'/>
<id>urn:sha1:f0220d747a8b437d043d9344774cbeeb0b31be25</id>
<content type='text'>
With the conversion to meson and removing the old QEMU Makefile
baggage we became very silent when building the plugins. Bring in a
copy of the quiet-command logic (and some magic COMMAs) so we can at
least assure developers we are building them.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2457
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240729144414.830369-13-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins/stoptrigger: TCG plugin to stop execution under conditions</title>
<updated>2024-07-22T08:37:56Z</updated>
<author>
<name>Simon Hamelin</name>
<email>simon.hamelin@grenoble-inp.org</email>
</author>
<published>2024-07-18T09:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=58fc249d9ebd7c6ed979cbf039ccfa93d1bae2b9'/>
<id>urn:sha1:58fc249d9ebd7c6ed979cbf039ccfa93d1bae2b9</id>
<content type='text'>
This new plugin allows to stop emulation using conditions on the
emulation state. By setting this plugin arguments, it is possible
to set an instruction count limit and/or trigger address(es) to stop at.
The code returned at emulation exit can be customized.

This plugin demonstrates how someone could stop QEMU execution.
It could be used for research purposes to launch some code and
deterministically stop it and understand where its execution flow went.

Co-authored-by: Alexandre Iooss &lt;erdnaxe@crans.org&gt;
Signed-off-by: Simon Hamelin &lt;simon.hamelin@grenoble-inp.org&gt;
Signed-off-by: Alexandre Iooss &lt;erdnaxe@crans.org&gt;
Reviewed-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Message-Id: &lt;20240715081521.19122-2-simon.hamelin@grenoble-inp.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240718094523.1198645-5-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>contrib/plugins: add Instructions Per Second (IPS) example for cost modeling</title>
<updated>2024-06-24T09:15:10Z</updated>
<author>
<name>Pierrick Bouvier</name>
<email>pierrick.bouvier@linaro.org</email>
</author>
<published>2024-06-20T15:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=72db6d54a4a9203736261fc63f32f6cd3486b7e4'/>
<id>urn:sha1:72db6d54a4a9203736261fc63f32f6cd3486b7e4</id>
<content type='text'>
This plugin uses the new time control interface to make decisions
about the state of time during the emulation. The algorithm is
currently very simple. The user specifies an ips rate which applies
per core. If the core runs ahead of its allocated execution time the
plugin sleeps for a bit to let real time catch up. Either way time is
updated for the emulation as a function of total executed instructions
with some adjustments for cores that idle.

Examples
--------

Slow down execution of /bin/true:
$ num_insn=$(./build/qemu-x86_64 -plugin ./build/tests/plugin/libinsn.so -d plugin /bin/true |&amp; grep total | sed -e 's/.*: //')
$ time ./build/qemu-x86_64 -plugin ./build/contrib/plugins/libips.so,ips=$(($num_insn/4)) /bin/true
real 4.000s

Boot a Linux kernel simulating a 250MHz cpu:
$ /build/qemu-system-x86_64 -kernel /boot/vmlinuz-6.1.0-21-amd64 -append "console=ttyS0" -plugin ./build/contrib/plugins/libips.so,ips=$((250*1000*1000)) -smp 1 -m 512
check time until kernel panic on serial0

Tested in system mode by booting a full debian system, and using:
$ sysbench cpu run
Performance decrease linearly with the given number of ips.

Signed-off-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Message-Id: &lt;20240530220610.1245424-7-pierrick.bouvier@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240620152220.2192768-11-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins: fix win plugin tests on cross compile</title>
<updated>2023-11-23T14:10:04Z</updated>
<author>
<name>Greg Manning</name>
<email>gmanning@rapitasystems.com</email>
</author>
<published>2023-11-20T15:08:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=4789f9d3a16dbd8139d935ec3c5008d0fbd40f88'/>
<id>urn:sha1:4789f9d3a16dbd8139d935ec3c5008d0fbd40f88</id>
<content type='text'>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1972

Cross compile gcc is more picky about argument order than msys. Changed
the meson command to take the (now renamed) libqemu_plugin_api.a as a
lib, rather than an object. This puts it in the right place on both
native and cross compile gcc commands

Reenable plugins on crossbuilds

Signed-off-by: Greg Manning &lt;gmanning@rapitasystems.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20231109124326.21106-2-gmanning@rapitasystems.com&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20231120150833.2552739-5-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins: disable lockstep plugin on windows</title>
<updated>2023-11-08T15:15:23Z</updated>
<author>
<name>Greg Manning</name>
<email>gmanning@rapitasystems.com</email>
</author>
<published>2023-11-06T18:51:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=d5f207ea47c19e8bb15df9e7a7c8543a1ed02095'/>
<id>urn:sha1:d5f207ea47c19e8bb15df9e7a7c8543a1ed02095</id>
<content type='text'>
The lockstep plugin uses unix sockets and would require a different
communication mechanism to work on Windows.

Signed-off-by: Greg Manning &lt;gmanning@rapitasystems.com&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20231102172053.17692-4-gmanning@rapitasystems.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20231106185112.2755262-16-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>plugins: make test/example plugins work on windows</title>
<updated>2023-11-08T15:15:23Z</updated>
<author>
<name>Greg Manning</name>
<email>gmanning@rapitasystems.com</email>
</author>
<published>2023-11-06T18:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=330fe3b03f6451889bec6f5c9f7e8bb5009c80c3'/>
<id>urn:sha1:330fe3b03f6451889bec6f5c9f7e8bb5009c80c3</id>
<content type='text'>
Generate a qemu_plugin_api.lib delay import lib on windows, for
windows qemu plugins to link against.

Implement an example dll load fail hook to link up the API functions
correctly when a plugin is loaded on windows.

Update the build scripts for the test and example plugins to use these
things.

Signed-off-by: Greg Manning &lt;gmanning@rapitasystems.com&gt;
Acked-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20231102172053.17692-3-gmanning@rapitasystems.com&gt;
[AJB: use find_program for dlltool, s/Windows/windows/]
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20231106185112.2755262-15-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>contrib/plugins: use an independent makefile</title>
<updated>2023-09-07T11:32:35Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-09-07T10:54:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=bafe78ad3bc4cef3a4d22e477c8940a7c955f1ea'/>
<id>urn:sha1:bafe78ad3bc4cef3a4d22e477c8940a7c955f1ea</id>
<content type='text'>
The initial reason to write this patch was to remove the last use of
CONFIG_DEBUG_TCG from the makefiles; the flags to use to build TCG
plugins are unrelated to --enable-debug-tcg, and instead they should
be the same as those used to build emulators (the plugins are not build
via meson for demonstration reasons only).

However, since contrib/plugins/Makefile is also the last case of doing
a compilation job using config-host.mak, go a step further and make it
use a completely separate configuration file, removing all references
to compilers from the toplevel config-host.mak.  Clean up references to
empty variables, and use .SECONDARY so that intermediate object files
are not deleted.

Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>contrib/plugins: add Darwin support</title>
<updated>2023-09-07T11:32:14Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-09-07T10:38:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=f6feb021e254054c2d50db5392c8b0dfbc932243'/>
<id>urn:sha1:f6feb021e254054c2d50db5392c8b0dfbc932243</id>
<content type='text'>
Under Darwin, using -shared makes it impossible to have undefined symbols
and -bundle has to be used instead; so detect the OS and use
different options.

Based-on: &lt;20230907101811.469236-1-pbonzini@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>contrib/plugins: remove -soname argument</title>
<updated>2023-09-07T10:17:54Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-09-07T10:17:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=07c4523c6c5049ebd952fc7b176f26f028d4851a'/>
<id>urn:sha1:07c4523c6c5049ebd952fc7b176f26f028d4851a</id>
<content type='text'>
-soname is not needed for runtime-loaded modules.  For example, Meson says:

            if not isinstance(target, build.SharedModule) or target.force_soname:
                # Add -Wl,-soname arguments on Linux, -install_name on OS X
                commands += linker.get_soname_args(
                    self.environment, target.prefix, target.name, target.suffix,
                    target.soversion, target.darwin_versions)

(force_soname is set is shared modules are linked into a build target, which is not
the case here.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>build: move warning flag selection to meson</title>
<updated>2023-05-18T11:35:28Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2022-12-22T08:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=95caf1fb4230d64f7b5e117c6ea988ae38f76aa0'/>
<id>urn:sha1:95caf1fb4230d64f7b5e117c6ea988ae38f76aa0</id>
<content type='text'>
Meson already knows to test with the positive form of the flag, which
simplifies the test.  Warnings are now tested explicitly for the C++
compiler, instead of hardcoding those that are only available for
the C language.

At this point all compiler flags in QEMU_CFLAGS are global and only
depend on the OS.  No feature tests are performed in configure.

Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
