Re: [PATCH v2 1/1] plugins: Move the windows linking function to qemu

2023-11-10 Thread Greg Manning
> Previously, a plugin author needed an implementation of the > __pfnDliFailureHook2 or __pfnDliNotifyHook2 hook in the plugin. Now all > they need is a null exported pointer with the right name (as in > win32_linker.c). If QEMU finds this, it will set it to the hook > function, which has now moved

Re: [PATCH v3 0/1] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
Alex Bennée writes: > Greg Manning writes: > > v1-v2: Added the signed-off-by line. > > v2-v3: Fixed the issue reference. > > > > Greg Manning (1): > > plugins: fix win plugin tests on cross compile > > > > .gitlab-ci.d/crossbuilds.yml

[PATCH v3 0/1] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
v1-v2: Added the signed-off-by line. v2-v3: Fixed the issue reference. Greg Manning (1): plugins: fix win plugin tests on cross compile .gitlab-ci.d/crossbuilds.yml | 2 +- contrib/plugins/Makefile | 2 +- plugins/meson.build | 2 +- tests/plugin/meson.build | 3 ++- 4 files

[PATCH v3 1/1] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
gcc commands Reenable plugins on crossbuilds Signed-off-by: Greg Manning --- .gitlab-ci.d/crossbuilds.yml | 2 +- contrib/plugins/Makefile | 2 +- plugins/meson.build | 2 +- tests/plugin/meson.build | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab

Re: [PATCH v2 1/1] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
> On 11/9/23 10:24, Greg Manning wrote: > >t += shared_module(i, files(i + '.c') + > > '../../contrib/plugins/win32_linker.c', > > include_directories: '../../include/qemu', > > -

[PATCH v2 0/1] plugins: Move the windows linking function to qemu

2023-11-09 Thread Greg Manning
v1-v2: Added signed-off-by line. Greg Manning (1): plugins: Move the windows linking function to qemu contrib/plugins/win32_linker.c | 23 +++ include/sysemu/os-win32.h | 25 + os-win32.c | 33

[PATCH v2 1/1] plugins: Move the windows linking function to qemu

2023-11-09 Thread Greg Manning
qemu (os-win32.c). Signed-off-by: Greg Manning --- contrib/plugins/win32_linker.c | 23 +++ include/sysemu/os-win32.h | 25 + os-win32.c | 33 + plugins/loader.c | 3 +++ 4 files

[PATCH v2 1/1] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
Signed-off-by: Greg Manning --- .gitlab-ci.d/crossbuilds.yml | 2 +- contrib/plugins/Makefile | 2 +- plugins/meson.build | 2 +- tests/plugin/meson.build | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d

[PATCH v2 0/1] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
v1-v2: Added the signed-off-by line. Greg Manning (1): plugins: fix win plugin tests on cross compile .gitlab-ci.d/crossbuilds.yml | 2 +- contrib/plugins/Makefile | 2 +- plugins/meson.build | 2 +- tests/plugin/meson.build | 3 ++- 4 files changed, 5 insertions(+), 4

[PATCH] plugins: fix win plugin tests on cross compile

2023-11-09 Thread Greg Manning
fixes #1927. 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 ---

[PATCH] plugins: Move the windows linking function to qemu

2023-11-09 Thread Greg Manning
Previously, a plugin author needed an implementation of the __pfnDliFailureHook2 or __pfnDliNotifyHook2 hook in the plugin. Now all they need is a null exported pointer with the right name (win32_common.c). If QEMU finds this, it will set it to the hook function, which has now moved into qemu (os-w

Re: [PATCH 14/22] plugins: make test/example plugins work on windows

2023-11-07 Thread Greg Manning
> > A bit more important: would it make sense to include the hook *in the > > QEMU executable itself*, rather than in the DLL? If it works, it would > > be much preferrable. You still would have to add the .lib file to the > > compilation, but win32_linker.c could simply be placed in os-win32.c >

Re: [PATCH 14/22] plugins: make test/example plugins work on windows

2023-11-07 Thread Greg Manning
From: Paolo Bonzini One important remark below that Greg can answer; the others are nits. > ... > I think this could also use the notification hook and dliNotePreLoadLibrary. That's a little more tidy but it's okay either way. I don't really mind. I had in mind that there might someday be a sin

[PATCH v2 1/4] plugins: add dllexport and dllimport to api funcs

2023-11-02 Thread Greg Manning
In qemu-plugin.h, mark all API functions as __declspec(dllexport) when compiling the executables, and as __declspec(dllimport) when being used to compile plugins against. Signed-off-by: Greg Manning --- include/qemu/qemu-plugin.h | 50 +++--- 1 file changed, 47

[PATCH v2 3/4] plugins: disable lockstep plugin on windows

2023-11-02 Thread Greg Manning
The lockstep plugin uses unix sockets and would require a different communication mechanism to work on Windows. Signed-off-by: Greg Manning --- contrib/plugins/Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 751fa38619

[PATCH v2 0/4] Enable plugin support for windows

2023-11-02 Thread Greg Manning
V1-2: * Break up commit into separate commits * tidy up contrib/plugins/Makefile so the "if windows" and "if macos" conditions are symmetric. Greg Manning (4): plugins: add dllexport and dllimport to api funcs plugins: make test/example plugins work on window

[PATCH v2 4/4] plugins: allow plugins to be enabled on windows

2023-11-02 Thread Greg Manning
allow plugins to be enabled in the configure script on windows. Also, add the qemu_plugin_api.lib to the installer. Signed-off-by: Greg Manning --- configure | 6 -- meson.build | 5 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/configure b/configure index

[PATCH v2 2/4] plugins: make test/example plugins work on windows

2023-11-02 Thread Greg Manning
. Signed-off-by: Greg Manning --- configure | 3 +++ contrib/plugins/Makefile | 20 contrib/plugins/win32_linker.c | 34 ++ plugins/meson.build| 17 + tests/plugin/meson.build | 14

[PATCH 0/1] Enable plugin support for windows

2023-11-02 Thread Greg Manning
le, which I think I've added to the set of installed files. * License for win32_linker.c - I'm happy to put this under whatever license seems most convenient. Given qemu-plugin.h is already GPL, all plugins will be GPL anyway. Greg Manning (1): plugins: enable plugins for windows

[PATCH 1/1] plugins: enable plugins for windows

2023-11-02 Thread Greg Manning
test/plugin to compile correctly on windows Signed-off-by: Greg Manning --- configure | 9 ++ contrib/plugins/Makefile | 27 -- contrib/plugins/win32_linker.c | 34 +++ include/qemu/qemu-plugin.h | 50

Getting qemu plugins working on windows

2023-10-30 Thread Greg Manning
ut how to solve this? [1]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg744980.html [2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg749982.html Regards, Greg Manning -- Follow Rapita Systems on LinkedIn<https://www.linkedin.com/company/rapita-systems?utm_source=rs_email_sig>