mbox series

[v6,0/5] Enable plugin support on msys2/mingw

Message ID 20201013002806.1447-1-luoyonggang@gmail.com
Headers show
Series Enable plugin support on msys2/mingw | expand

Message

罗勇刚(Yonggang Luo) Oct. 13, 2020, 12:28 a.m. UTC
V5-V6
Skip merged patches

V3-V4
Split  plugin: Fixes typo in qemu-plugin.h out
Trying to explain the design of
plugin: Getting qemu-plugin works under win32.

V1-V2
1. Fixes review comments
2. Increase QEMU_PLUGIN_VERSION to 1 for compat  QEMU_PLUGIN_VERSION 0
3. Revise the loader to support for version 0 and 1
4. By export function qemu_plugin_initialize in plugin, and call it in loader=
, so
  we have no need call it in every plugin. And also provide a standard implem=
entation,
  anyway, use can also override it.

Add this feature on msys2/mingw by using glib provided cross-platform dlsym f=
unctional.

Yonggang Luo (5):
  plugins: getting qemu_plugin_get_hwaddr only expose one function
    prototype
  plugins: Fixes typo in qemu-plugin.h
  plugins: Getting qemu-plugin works under win32.
  plugins: Getting qemu-plugin.h can be included in multiple source file
  cirrus: Enable plugins in cirrus for windows

 .cirrus.yml                  |   1 +
 Makefile                     |   1 -
 configure                    |  71 ------------
 contrib/plugins/hotblocks.c  |   1 +
 contrib/plugins/hotpages.c   |   1 +
 contrib/plugins/howvec.c     |   1 +
 contrib/plugins/lockstep.c   |   1 +
 include/qemu/qemu-plugin.h   | 208 +++++++++++++++++++++++++++--------
 meson.build                  |   6 +-
 plugins/api.c                | 113 ++++++++++---------
 plugins/core.c               |  16 ++-
 plugins/loader.c             |  50 ++++++++-
 plugins/meson.build          |  10 +-
 plugins/plugin.h             |   1 +
 plugins/qemu-plugins.symbols |  40 -------
 tests/plugin/bb.c            |   1 +
 tests/plugin/empty.c         |   1 +
 tests/plugin/insn.c          |   1 +
 tests/plugin/mem.c           |   1 +
 19 files changed, 298 insertions(+), 227 deletions(-)
 delete mode 100644 plugins/qemu-plugins.symbols

--=20
2.28.0.windows.1

Comments

no-reply@patchew.org Oct. 13, 2020, 12:39 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20201013002806.1447-1-luoyonggang@gmail.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20201013002806.1447-1-luoyonggang@gmail.com
Subject: [PATCH v6 0/5] Enable plugin support on msys2/mingw

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20201013002806.1447-1-luoyonggang@gmail.com -> patchew/20201013002806.1447-1-luoyonggang@gmail.com
Switched to a new branch 'test'
70470d0 cirrus: Enable plugins in cirrus for windows
8d493d6 plugins: Getting qemu-plugin.h can be included in multiple source file
728de07 plugins: Getting qemu-plugin works under win32.
95ea169 plugins: Fixes typo in qemu-plugin.h
23c6540 plugins: getting qemu_plugin_get_hwaddr only expose one function prototype

=== OUTPUT BEGIN ===
1/5 Checking commit 23c6540f9fec (plugins: getting qemu_plugin_get_hwaddr only expose one function prototype)
2/5 Checking commit 95ea16957956 (plugins: Fixes typo in qemu-plugin.h)
3/5 Checking commit 728de07059e4 (plugins: Getting qemu-plugin works under win32.)
WARNING: line over 80 characters
#179: FILE: include/qemu/qemu-plugin.h:137:
+typedef void (*qemu_plugin_uninstall_t)(qemu_plugin_id_t id, qemu_plugin_simple_cb_t cb);

WARNING: line over 80 characters
#188: FILE: include/qemu/qemu-plugin.h:150:
+typedef void (*qemu_plugin_reset_t)(qemu_plugin_id_t id, qemu_plugin_simple_cb_t cb);

WARNING: line over 80 characters
#242: FILE: include/qemu/qemu-plugin.h:242:
+typedef void (*qemu_plugin_register_vcpu_tb_exec_cb_t)(struct qemu_plugin_tb *tb,

WARNING: line over 80 characters
#251: FILE: include/qemu/qemu-plugin.h:262:
+typedef void (*qemu_plugin_register_vcpu_tb_exec_inline_t)(struct qemu_plugin_tb *tb,

WARNING: line over 80 characters
#260: FILE: include/qemu/qemu-plugin.h:275:
+typedef void (*qemu_plugin_register_vcpu_insn_exec_cb_t)(struct qemu_plugin_insn *insn,

WARNING: line over 80 characters
#290: FILE: include/qemu/qemu-plugin.h:305:
+typedef const void *(*qemu_plugin_insn_data_t)(const struct qemu_plugin_insn *insn);

WARNING: line over 80 characters
#297: FILE: include/qemu/qemu-plugin.h:309:
+typedef uint64_t (*qemu_plugin_insn_vaddr_t)(const struct qemu_plugin_insn *insn);

WARNING: line over 80 characters
#310: FILE: include/qemu/qemu-plugin.h:323:
+typedef unsigned int (*qemu_plugin_mem_size_shift_t)(qemu_plugin_meminfo_t info);

WARNING: line over 80 characters
#322: FILE: include/qemu/qemu-plugin.h:340:
+typedef struct qemu_plugin_hwaddr *(*qemu_plugin_get_hwaddr_t)(qemu_plugin_meminfo_t info,

WARNING: line over 80 characters
#332: FILE: include/qemu/qemu-plugin.h:348:
+typedef bool (*qemu_plugin_hwaddr_is_io_t)(const struct qemu_plugin_hwaddr *haddr);

WARNING: line over 80 characters
#342: FILE: include/qemu/qemu-plugin.h:357:
+typedef void (*qemu_plugin_register_vcpu_mem_cb_t)(struct qemu_plugin_insn *insn,

WARNING: line over 80 characters
#349: FILE: include/qemu/qemu-plugin.h:363:
+typedef void (*qemu_plugin_register_vcpu_mem_inline_t)(struct qemu_plugin_insn *insn,

WARNING: line over 80 characters
#551: FILE: plugins/api.c:63:
+QEMU_PLUGIN_EXPORT void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin_simple_cb_t cb)

WARNING: line over 80 characters
#574: FILE: plugins/api.c:87:
+QEMU_PLUGIN_EXPORT void qemu_plugin_register_vcpu_tb_exec_cb(struct qemu_plugin_tb *tb,

WARNING: line over 80 characters
#652: FILE: plugins/api.c:146:
+QEMU_PLUGIN_EXPORT void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin_id_t id,

WARNING: line over 80 characters
#659: FILE: plugins/api.c:152:
+QEMU_PLUGIN_EXPORT void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_id_t id,

WARNING: line over 80 characters
#675: FILE: plugins/api.c:181:
+QEMU_PLUGIN_EXPORT size_t qemu_plugin_tb_n_insns(const struct qemu_plugin_tb *tb)

WARNING: line over 80 characters
#681: FILE: plugins/api.c:186:
+QEMU_PLUGIN_EXPORT uint64_t qemu_plugin_tb_vaddr(const struct qemu_plugin_tb *tb)

WARNING: line over 80 characters
#696: FILE: plugins/api.c:207:
+QEMU_PLUGIN_EXPORT const void *qemu_plugin_insn_data(const struct qemu_plugin_insn *insn)

WARNING: line over 80 characters
#702: FILE: plugins/api.c:212:
+QEMU_PLUGIN_EXPORT size_t qemu_plugin_insn_size(const struct qemu_plugin_insn *insn)

WARNING: line over 80 characters
#708: FILE: plugins/api.c:217:
+QEMU_PLUGIN_EXPORT uint64_t qemu_plugin_insn_vaddr(const struct qemu_plugin_insn *insn)

WARNING: line over 80 characters
#714: FILE: plugins/api.c:222:
+QEMU_PLUGIN_EXPORT void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn)

WARNING: line over 80 characters
#720: FILE: plugins/api.c:227:
+QEMU_PLUGIN_EXPORT char *qemu_plugin_insn_disas(const struct qemu_plugin_insn *insn)

WARNING: line over 80 characters
#729: FILE: plugins/api.c:238:
+QEMU_PLUGIN_EXPORT unsigned qemu_plugin_mem_size_shift(qemu_plugin_meminfo_t info)

WARNING: line over 80 characters
#735: FILE: plugins/api.c:243:
+QEMU_PLUGIN_EXPORT bool qemu_plugin_mem_is_sign_extended(qemu_plugin_meminfo_t info)

WARNING: line over 80 characters
#741: FILE: plugins/api.c:248:
+QEMU_PLUGIN_EXPORT bool qemu_plugin_mem_is_big_endian(qemu_plugin_meminfo_t info)

WARNING: line over 80 characters
#767: FILE: plugins/api.c:286:
+QEMU_PLUGIN_EXPORT bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr)

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#1024: 
deleted file mode 100644

total: 0 errors, 28 warnings, 913 lines checked

Patch 3/5 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
4/5 Checking commit 8d493d69367f (plugins: Getting qemu-plugin.h can be included in multiple source file)
ERROR: storage class should be at the beginning of the declaration
#75: FILE: include/qemu/qemu-plugin.h:432:
+#define qemu_plugin_decl_symbol(symbol_name) extern symbol_name##_t symbol_name

total: 1 errors, 0 warnings, 88 lines checked

Patch 4/5 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/5 Checking commit 70470d0d686a (cirrus: Enable plugins in cirrus for windows)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20201013002806.1447-1-luoyonggang@gmail.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Alex Bennée March 12, 2021, 5:15 p.m. UTC | #2
Yonggang Luo <luoyonggang@gmail.com> writes:

> V5-V6=0D

> Skip merged patches=0D


Queued to 1 and 2 into plugins/next, thanks.

> =0D

> V3-V4=0D

> Split  plugin: Fixes typo in qemu-plugin.h out=0D

> Trying to explain the design of=0D

> plugin: Getting qemu-plugin works under win32.=0D

> =0D

> V1-V2=0D

> 1. Fixes review comments=0D

> 2. Increase QEMU_PLUGIN_VERSION to 1 for compat  QEMU_PLUGIN_VERSION 0=0D

> 3. Revise the loader to support for version 0 and 1=0D

> 4. By export function qemu_plugin_initialize in plugin, and call it in load=

> er=3D=0D

> , so=0D

>   we have no need call it in every plugin. And also provide a standard impl=

> em=3D=0D

> entation,=0D

>   anyway, use can also override it.=0D

> =0D

> Add this feature on msys2/mingw by using glib provided cross-platform dlsym=

>  f=3D=0D

> unctional.=0D

> =0D

> Yonggang Luo (5):=0D

>   plugins: getting qemu_plugin_get_hwaddr only expose one function=0D

>     prototype=0D

>   plugins: Fixes typo in qemu-plugin.h=0D

>   plugins: Getting qemu-plugin works under win32.=0D

>   plugins: Getting qemu-plugin.h can be included in multiple source file=0D

>   cirrus: Enable plugins in cirrus for windows=0D

> =0D

>  .cirrus.yml                  |   1 +=0D

>  Makefile                     |   1 -=0D

>  configure                    |  71 ------------=0D

>  contrib/plugins/hotblocks.c  |   1 +=0D

>  contrib/plugins/hotpages.c   |   1 +=0D

>  contrib/plugins/howvec.c     |   1 +=0D

>  contrib/plugins/lockstep.c   |   1 +=0D

>  include/qemu/qemu-plugin.h   | 208 +++++++++++++++++++++++++++--------=0D

>  meson.build                  |   6 +-=0D

>  plugins/api.c                | 113 ++++++++++---------=0D

>  plugins/core.c               |  16 ++-=0D

>  plugins/loader.c             |  50 ++++++++-=0D

>  plugins/meson.build          |  10 +-=0D

>  plugins/plugin.h             |   1 +=0D

>  plugins/qemu-plugins.symbols |  40 -------=0D

>  tests/plugin/bb.c            |   1 +=0D

>  tests/plugin/empty.c         |   1 +=0D

>  tests/plugin/insn.c          |   1 +=0D

>  tests/plugin/mem.c           |   1 +=0D

>  19 files changed, 298 insertions(+), 227 deletions(-)=0D

>  delete mode 100644 plugins/qemu-plugins.symbols=0D

> =0D

> --=3D20=0D

> 2.28.0.windows.1=0D

> =0D



-- 
Alex Bennée