[PATCH for 4.2 v5 00/55] Support for TCG plugins

Alex Bennée posted 55 patches 4 years, 6 months ago
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test asan passed
Test checkpatch failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191014104948.4291-1-alex.bennee@linaro.org
There is a newer version of this series
.travis.yml                               |  15 +
Makefile                                  |  16 +-
Makefile.target                           |   2 +
accel/stubs/tcg-stub.c                    |   1 -
accel/tcg/Makefile.objs                   |   1 +
accel/tcg/atomic_common.inc.c             |  54 ++
accel/tcg/atomic_template.h               |  94 ++-
accel/tcg/cpu-exec.c                      |   8 +-
accel/tcg/cputlb.c                        |  53 +-
accel/tcg/plugin-gen.c                    | 932 ++++++++++++++++++++++
accel/tcg/plugin-helpers.h                |   5 +
accel/tcg/translate-all.c                 |  15 +-
accel/tcg/translator.c                    |  20 +
accel/tcg/user-exec.c                     |   3 +
bsd-user/syscall.c                        |  24 +-
configure                                 |  86 ++
cpus-common.c                             |   4 +
cpus.c                                    |  10 +
disas.c                                   | 110 +++
docs/devel/index.rst                      |   1 +
docs/devel/plugins.rst                    | 112 +++
exec.c                                    |   2 +
hw/core/cpu.c                             |   2 +
include/disas/disas.h                     |   2 +
include/exec/cpu-defs.h                   |   1 +
include/exec/cpu_ldst.h                   |  11 +
include/exec/cpu_ldst_template.h          |  37 +-
include/exec/cpu_ldst_useronly_template.h |  29 +-
include/exec/exec-all.h                   |  84 +-
include/exec/helper-gen.h                 |   1 +
include/exec/helper-proto.h               |   1 +
include/exec/helper-tcg.h                 |   1 +
include/exec/plugin-gen.h                 |  71 ++
include/exec/translator.h                 |  58 +-
include/hw/core/cpu.h                     |  19 +
include/qemu/bswap.h                      |   5 +
include/qemu/log.h                        |   1 +
include/qemu/plugin.h                     | 261 ++++++
include/qemu/qemu-plugin.h                | 388 +++++++++
include/qemu/queue.h                      |  10 +
include/user/syscall-trace.h              |  40 +
linux-user/exit.c                         |   1 +
linux-user/main.c                         |  18 +
linux-user/syscall.c                      |   7 +-
plugins/.gitignore                        |   2 +
plugins/Makefile.objs                     |  21 +
plugins/api.c                             | 334 ++++++++
plugins/core.c                            | 504 ++++++++++++
plugins/loader.c                          | 384 +++++++++
plugins/plugin.h                          |  95 +++
plugins/qemu-plugins.symbols              |  40 +
qemu-options.hx                           |  17 +
scripts/tracetool/transform.py            |   1 +
target/alpha/translate.c                  |   2 +-
target/arm/arm_ldst.h                     |  15 +-
target/hppa/translate.c                   |   2 +-
target/i386/translate.c                   |  10 +-
target/m68k/translate.c                   |   2 +-
target/openrisc/translate.c               |   2 +-
target/ppc/translate.c                    |   8 +-
target/riscv/translate.c                  |   2 +-
target/sh4/translate.c                    |   4 +-
target/sparc/translate.c                  |   2 +-
target/xtensa/translate.c                 |   4 +-
tcg/tcg-op.c                              |  40 +-
tcg/tcg-op.h                              |  16 +
tcg/tcg-opc.h                             |   3 +
tcg/tcg.c                                 |  22 +
tcg/tcg.h                                 |  23 +
tests/Makefile.include                    |  11 +-
tests/plugin/Makefile                     |  31 +
tests/plugin/bb.c                         |  64 ++
tests/plugin/empty.c                      |  30 +
tests/plugin/hotblocks.c                  | 143 ++++
tests/plugin/hotpages.c                   | 174 ++++
tests/plugin/howvec.c                     | 351 ++++++++
tests/plugin/insn.c                       |  61 ++
tests/plugin/mem.c                        |  97 +++
tests/tcg/Makefile.target                 |  43 +-
tests/tcg/aarch64/Makefile.softmmu-target |   2 +-
tests/tcg/aarch64/Makefile.target         |   6 +
tests/tcg/arm/Makefile.softmmu-target     |   1 +
tests/tcg/arm/Makefile.target             |   6 +
tests/tcg/cris/Makefile.target            |   2 +-
tests/tcg/i386/Makefile.target            |  11 +-
trace-events                              |   8 +-
trace/mem-internal.h                      |  39 +-
trace/mem.h                               |   7 +-
util/log.c                                |   3 +
vl.c                                      |  11 +
90 files changed, 5111 insertions(+), 161 deletions(-)
create mode 100644 accel/tcg/atomic_common.inc.c
create mode 100644 accel/tcg/plugin-gen.c
create mode 100644 accel/tcg/plugin-helpers.h
create mode 100644 docs/devel/plugins.rst
create mode 100644 include/exec/plugin-gen.h
create mode 100644 include/qemu/plugin.h
create mode 100644 include/qemu/qemu-plugin.h
create mode 100644 include/user/syscall-trace.h
create mode 100644 plugins/.gitignore
create mode 100644 plugins/Makefile.objs
create mode 100644 plugins/api.c
create mode 100644 plugins/core.c
create mode 100644 plugins/loader.c
create mode 100644 plugins/plugin.h
create mode 100644 plugins/qemu-plugins.symbols
create mode 100644 tests/plugin/Makefile
create mode 100644 tests/plugin/bb.c
create mode 100644 tests/plugin/empty.c
create mode 100644 tests/plugin/hotblocks.c
create mode 100644 tests/plugin/hotpages.c
create mode 100644 tests/plugin/howvec.c
create mode 100644 tests/plugin/insn.c
create mode 100644 tests/plugin/mem.c
[PATCH for 4.2 v5 00/55] Support for TCG plugins
Posted by Alex Bennée 4 years, 6 months ago
Hi,

This is the latest iteration of the TCG plugins series. From the documentation:

  QEMU TCG plugins provide a way for users to run experiments taking
  advantage of the total system control emulation can have over a guest.
  It provides a mechanism for plugins to subscribe to events during
  translation and execution and optionally callback into the plugin
  during these events. TCG plugins are unable to change the system state
  only monitor it passively. However they can do this down to an
  individual instruction granularity including potentially subscribing
  to all load and store operations.

I think I've addressed most of the comments from the v4 posting. I've
made a couple of changes to API which I intend to keep as separate
patches in the series to aid review. They are:

  qemu_plugin_install - new info block
  qemu_plugin_outs - output a string via QEMU's log system

The first allows plugins to know about the guest architecture - in a
fairly simple way by exposing TARGET_NAME. Its enough that a plugin
could decide not to install anything if it is not what it is expecting
but not so much that it has detailed information about the target. For
that sort of subtly you will have to pass details down via the plugin
options. I did briefly look at exposing ElfMachine information but
that got too gnarly. The only user in the examples is the howvec
plugin which will now run on all architectures although it can only
classify aarch64 and sparc64 instructions into groups.

The ability of the plugins to be fully "multiarch" aware meant I could
enable check-tcg to run most tests with each available plugin. This
proved very effective at exposing some bugs in the code that didn't
show up on my main test architecture (ARM). I can still trigger
crashes in sparc64-linux-user but rth informs me it is currently quite
broken so I skip it for now in the CI config.

The qemu_plugin_outs patch is mostly mechanical but it does neaten up
the output of plugins and prevent them just spamming stdout. Currently
the output goes via the logging system but I can envisage future
tweaks for system emulation which could push the output via a chardev
and allow nicer integration with test harnesses.

One requested feature that didn't make it in was a way to introspect
the state of the registers. It's not a deal breaker as the plugin can
always decode the instruction itself and has access to all
loads/stores so could track the data itself. I didn't want to hold up
the merging of what we have given softfreeze is so close so I think
this is something to think about for the next cycle. I'm open to ideas
of the best way to do this. One idle thought I had was giving the
plugin the ability to trigger a debug exception which would then punt
the problem to the gdbstub. I'm not sure if triggering a non-guest
visible exception violates the passive monitoring contract of TCG
plugins.

I've added some more words to the documentation to hopefully ally
fears about TCG plugins being used to end-run around the GPL.

The only other change of note is fixing a bunch of races by using
__thread for per-CPU data structures. There are more details bellow
the --- comments in each patch.

I'm hoping to get it merged this cycle so please review:

  02 - trace add mmu_index to mem_info
  17 - plugins implement helpers for resolving hwaddr
  40 - tests tcg Makefile.target fix path to config host
  41 - tests tcg set QEMU_OPTS for all cris runs
  42 - tests tcg move virtual tests to EXTRA_TESTS
  43 - tests tcg drop test i386 fprem from TESTS when no
  44 - tests tcg enable plugin testing
  45 - tests plugin add a hotblocks plugin
  47 - tests plugin add instruction execution breakdown
  48 - tests plugin add hotpages plugin to breakdown mem
  51 - plugins expand the plugin_init function to includ
  52 - plugins make howvec plugin more generic
  53 - plugins add sparc64 instruction classification ta
  54 - plugins add qemu_plugin_outs and use it
  55 - .travis.yml add enable plugins tests

Alex Bennée (21):
  trace: add mmu_index to mem_info
  docs/devel: add plugins.rst design document
  configure: add --enable-plugins (MOVE TO END)
  plugin: add implementation of the api
  plugins: implement helpers for resolving hwaddr
  tests/tcg/Makefile.target: fix path to config-host.mak
  tests/tcg: set QEMU_OPTS for all cris runs
  tests/tcg: move "virtual" tests to EXTRA_TESTS
  tests/tcg: drop test-i386-fprem from TESTS when not SLOW
  tests/tcg: enable plugin testing
  tests/plugin: add a hotblocks plugin
  plugin: add qemu_plugin_insn_disas helper
  tests/plugin: add instruction execution breakdown
  tests/plugin: add hotpages plugin to breakdown memory access patterns
  accel/stubs: reduce headers from tcg-stub
  include/exec: wrap cpu_ldst.h in CONFIG_TCG
  plugins: expand the plugin_init function to include an info block
  plugins: make howvec plugin more generic
  plugins: add sparc64 instruction classification table
  plugins: add qemu_plugin_outs and use it
  .travis.yml: add --enable-plugins tests

Emilio G. Cota (32):
  trace: expand mem_info:size_shift to 4 bits
  cpu: introduce cpu_in_exclusive_context()
  translate-all: use cpu_in_exclusive_work_context() in tb_flush
  plugin: add user-facing API
  plugin: add core code
  queue: add QTAILQ_REMOVE_SEVERAL
  cputlb: document get_page_addr_code
  cputlb: introduce get_page_addr_code_hostp
  tcg: add tcg_gen_st_ptr
  plugin-gen: add module for TCG-related code
  atomic_template: add inline trace/plugin helpers
  tcg: let plugins instrument virtual memory accesses
  translate-all: notify plugin code of tb_flush
  *-user: notify plugin of exit
  *-user: plugin syscalls
  cpu: hook plugin vcpu events
  plugin-gen: add plugin_insn_append
  translator: add translator_ld{ub,sw,uw,l,q}
  target/arm: fetch code with translator_ld
  target/ppc: fetch code with translator_ld
  target/sh4: fetch code with translator_ld
  target/i386: fetch code with translator_ld
  target/hppa: fetch code with translator_ld
  target/m68k: fetch code with translator_ld
  target/alpha: fetch code with translator_ld
  target/riscv: fetch code with translator_ld
  target/sparc: fetch code with translator_ld
  target/xtensa: fetch code with translator_ld
  target/openrisc: fetch code with translator_ld
  translator: inject instrumentation from plugins
  plugin: add API symbols to qemu-plugins.symbols
  tests/plugin: add sample plugins

Lluís Vilanova (2):
  vl: support -plugin option
  linux-user: support -plugin option

 .travis.yml                               |  15 +
 Makefile                                  |  16 +-
 Makefile.target                           |   2 +
 accel/stubs/tcg-stub.c                    |   1 -
 accel/tcg/Makefile.objs                   |   1 +
 accel/tcg/atomic_common.inc.c             |  54 ++
 accel/tcg/atomic_template.h               |  94 ++-
 accel/tcg/cpu-exec.c                      |   8 +-
 accel/tcg/cputlb.c                        |  53 +-
 accel/tcg/plugin-gen.c                    | 932 ++++++++++++++++++++++
 accel/tcg/plugin-helpers.h                |   5 +
 accel/tcg/translate-all.c                 |  15 +-
 accel/tcg/translator.c                    |  20 +
 accel/tcg/user-exec.c                     |   3 +
 bsd-user/syscall.c                        |  24 +-
 configure                                 |  86 ++
 cpus-common.c                             |   4 +
 cpus.c                                    |  10 +
 disas.c                                   | 110 +++
 docs/devel/index.rst                      |   1 +
 docs/devel/plugins.rst                    | 112 +++
 exec.c                                    |   2 +
 hw/core/cpu.c                             |   2 +
 include/disas/disas.h                     |   2 +
 include/exec/cpu-defs.h                   |   1 +
 include/exec/cpu_ldst.h                   |  11 +
 include/exec/cpu_ldst_template.h          |  37 +-
 include/exec/cpu_ldst_useronly_template.h |  29 +-
 include/exec/exec-all.h                   |  84 +-
 include/exec/helper-gen.h                 |   1 +
 include/exec/helper-proto.h               |   1 +
 include/exec/helper-tcg.h                 |   1 +
 include/exec/plugin-gen.h                 |  71 ++
 include/exec/translator.h                 |  58 +-
 include/hw/core/cpu.h                     |  19 +
 include/qemu/bswap.h                      |   5 +
 include/qemu/log.h                        |   1 +
 include/qemu/plugin.h                     | 261 ++++++
 include/qemu/qemu-plugin.h                | 388 +++++++++
 include/qemu/queue.h                      |  10 +
 include/user/syscall-trace.h              |  40 +
 linux-user/exit.c                         |   1 +
 linux-user/main.c                         |  18 +
 linux-user/syscall.c                      |   7 +-
 plugins/.gitignore                        |   2 +
 plugins/Makefile.objs                     |  21 +
 plugins/api.c                             | 334 ++++++++
 plugins/core.c                            | 504 ++++++++++++
 plugins/loader.c                          | 384 +++++++++
 plugins/plugin.h                          |  95 +++
 plugins/qemu-plugins.symbols              |  40 +
 qemu-options.hx                           |  17 +
 scripts/tracetool/transform.py            |   1 +
 target/alpha/translate.c                  |   2 +-
 target/arm/arm_ldst.h                     |  15 +-
 target/hppa/translate.c                   |   2 +-
 target/i386/translate.c                   |  10 +-
 target/m68k/translate.c                   |   2 +-
 target/openrisc/translate.c               |   2 +-
 target/ppc/translate.c                    |   8 +-
 target/riscv/translate.c                  |   2 +-
 target/sh4/translate.c                    |   4 +-
 target/sparc/translate.c                  |   2 +-
 target/xtensa/translate.c                 |   4 +-
 tcg/tcg-op.c                              |  40 +-
 tcg/tcg-op.h                              |  16 +
 tcg/tcg-opc.h                             |   3 +
 tcg/tcg.c                                 |  22 +
 tcg/tcg.h                                 |  23 +
 tests/Makefile.include                    |  11 +-
 tests/plugin/Makefile                     |  31 +
 tests/plugin/bb.c                         |  64 ++
 tests/plugin/empty.c                      |  30 +
 tests/plugin/hotblocks.c                  | 143 ++++
 tests/plugin/hotpages.c                   | 174 ++++
 tests/plugin/howvec.c                     | 351 ++++++++
 tests/plugin/insn.c                       |  61 ++
 tests/plugin/mem.c                        |  97 +++
 tests/tcg/Makefile.target                 |  43 +-
 tests/tcg/aarch64/Makefile.softmmu-target |   2 +-
 tests/tcg/aarch64/Makefile.target         |   6 +
 tests/tcg/arm/Makefile.softmmu-target     |   1 +
 tests/tcg/arm/Makefile.target             |   6 +
 tests/tcg/cris/Makefile.target            |   2 +-
 tests/tcg/i386/Makefile.target            |  11 +-
 trace-events                              |   8 +-
 trace/mem-internal.h                      |  39 +-
 trace/mem.h                               |   7 +-
 util/log.c                                |   3 +
 vl.c                                      |  11 +
 90 files changed, 5111 insertions(+), 161 deletions(-)
 create mode 100644 accel/tcg/atomic_common.inc.c
 create mode 100644 accel/tcg/plugin-gen.c
 create mode 100644 accel/tcg/plugin-helpers.h
 create mode 100644 docs/devel/plugins.rst
 create mode 100644 include/exec/plugin-gen.h
 create mode 100644 include/qemu/plugin.h
 create mode 100644 include/qemu/qemu-plugin.h
 create mode 100644 include/user/syscall-trace.h
 create mode 100644 plugins/.gitignore
 create mode 100644 plugins/Makefile.objs
 create mode 100644 plugins/api.c
 create mode 100644 plugins/core.c
 create mode 100644 plugins/loader.c
 create mode 100644 plugins/plugin.h
 create mode 100644 plugins/qemu-plugins.symbols
 create mode 100644 tests/plugin/Makefile
 create mode 100644 tests/plugin/bb.c
 create mode 100644 tests/plugin/empty.c
 create mode 100644 tests/plugin/hotblocks.c
 create mode 100644 tests/plugin/hotpages.c
 create mode 100644 tests/plugin/howvec.c
 create mode 100644 tests/plugin/insn.c
 create mode 100644 tests/plugin/mem.c

-- 
2.20.1


Re: [PATCH for 4.2 v5 00/55] Support for TCG plugins
Posted by no-reply@patchew.org 4 years, 6 months ago
Patchew URL: https://patchew.org/QEMU/20191014104948.4291-1-alex.bennee@linaro.org/



Hi,

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

Subject: [PATCH for 4.2 v5 00/55] Support for TCG plugins
Type: series
Message-id: 20191014104948.4291-1-alex.bennee@linaro.org

=== 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 ===

Switched to a new branch 'test'
3c4538d .travis.yml: add --enable-plugins tests
52d40be plugins: add qemu_plugin_outs and use it
173764d plugins: add sparc64 instruction classification table
984bf57 plugins: make howvec plugin more generic
8d5b793 plugins: expand the plugin_init function to include an info block
d9fde51 include/exec: wrap cpu_ldst.h in CONFIG_TCG
c968fc4 accel/stubs: reduce headers from tcg-stub
277050d tests/plugin: add hotpages plugin to breakdown memory access patterns
09bc325 tests/plugin: add instruction execution breakdown
3504de4 plugin: add qemu_plugin_insn_disas helper
28695ed tests/plugin: add a hotblocks plugin
2c35bc8 tests/tcg: enable plugin testing
4e61a46 tests/tcg: drop test-i386-fprem from TESTS when not SLOW
e7cbabb tests/tcg: move "virtual" tests to EXTRA_TESTS
71e2c9a tests/tcg: set QEMU_OPTS for all cris runs
19cc0a9 tests/tcg/Makefile.target: fix path to config-host.mak
32a7520 tests/plugin: add sample plugins
fdc50ab linux-user: support -plugin option
4502888 vl: support -plugin option
557ab9f plugin: add API symbols to qemu-plugins.symbols
452fc4f translator: inject instrumentation from plugins
ef58223 target/openrisc: fetch code with translator_ld
322a6e2 target/xtensa: fetch code with translator_ld
7746583 target/sparc: fetch code with translator_ld
20a99e5 target/riscv: fetch code with translator_ld
e456086 target/alpha: fetch code with translator_ld
dc5cd57 target/m68k: fetch code with translator_ld
3c933f4 target/hppa: fetch code with translator_ld
788ef4b target/i386: fetch code with translator_ld
756d7ac target/sh4: fetch code with translator_ld
96a68ab target/ppc: fetch code with translator_ld
8579c0a target/arm: fetch code with translator_ld
58d5ac3 translator: add translator_ld{ub,sw,uw,l,q}
9447806 plugin-gen: add plugin_insn_append
6c45871 cpu: hook plugin vcpu events
f35ce99 *-user: plugin syscalls
b464131 *-user: notify plugin of exit
5f45de7 translate-all: notify plugin code of tb_flush
90bebf1 plugins: implement helpers for resolving hwaddr
fd4c2fe tcg: let plugins instrument virtual memory accesses
b8e5c38 atomic_template: add inline trace/plugin helpers
cc9eeaa plugin-gen: add module for TCG-related code
6d95ee8 tcg: add tcg_gen_st_ptr
d0544ab cputlb: introduce get_page_addr_code_hostp
e337afd cputlb: document get_page_addr_code
d181e35 queue: add QTAILQ_REMOVE_SEVERAL
b5a5805 plugin: add implementation of the api
38dbddf plugin: add core code
dc6c029 plugin: add user-facing API
ce651ea configure: add --enable-plugins (MOVE TO END)
87ba90a docs/devel: add plugins.rst design document
a180702 translate-all: use cpu_in_exclusive_work_context() in tb_flush
de0849f cpu: introduce cpu_in_exclusive_context()
d8f88ce trace: add mmu_index to mem_info
03da1d4 trace: expand mem_info:size_shift to 4 bits

=== OUTPUT BEGIN ===
1/55 Checking commit 03da1d48f815 (trace: expand mem_info:size_shift to 4 bits)
2/55 Checking commit d8f88ceb4132 (trace: add mmu_index to mem_info)
ERROR: line over 90 characters
#25: FILE: accel/tcg/atomic_template.h:63:
+        uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, false, ATOMIC_MMU_IDX); \

ERROR: line over 90 characters
#34: FILE: accel/tcg/atomic_template.h:71:
+        uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, false, ATOMIC_MMU_IDX); \

ERROR: line over 90 characters
#41: FILE: accel/tcg/atomic_template.h:77:
+        uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, true, ATOMIC_MMU_IDX); \

total: 3 errors, 0 warnings, 261 lines checked

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

3/55 Checking commit de0849f5305b (cpu: introduce cpu_in_exclusive_context())
4/55 Checking commit a180702bc2c7 (translate-all: use cpu_in_exclusive_work_context() in tb_flush)
5/55 Checking commit 87ba90add578 (docs/devel: add plugins.rst design document)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#24: 
new file mode 100644

total: 0 errors, 1 warnings, 116 lines checked

Patch 5/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/55 Checking commit ce651eab7b66 (configure: add --enable-plugins (MOVE TO END))
7/55 Checking commit dc6c0292a53b (plugin: add user-facing API)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#15: 
new file mode 100644

WARNING: architecture specific defines should be avoided
#41: FILE: include/qemu/qemu-plugin.h:22:
+#if defined _WIN32 || defined __CYGWIN__

WARNING: architecture specific defines should be avoided
#49: FILE: include/qemu/qemu-plugin.h:30:
+  #if __GNUC__ >= 4

total: 0 errors, 3 warnings, 351 lines checked

Patch 7/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/55 Checking commit 38dbddf37d35 (plugin: add core code)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#85: 
new file mode 100644

ERROR: "foo * bar" should be "foo *bar"
#221: FILE: include/qemu/plugin.h:132:
+static inline struct qemu_plugin_insn * qemu_plugin_insn_alloc(void)

ERROR: named QLIST_HEAD should be typedefed separately
#404: FILE: plugins/core.c:42:
+QLIST_HEAD(qemu_plugin_cb_head, qemu_plugin_cb);

WARNING: line over 80 characters
#623: FILE: plugins/core.c:261:
+        cbs = g_array_sized_new(false, false, sizeof(struct qemu_plugin_dyn_cb), 1);

WARNING: Block comments use a leading /* on a separate line
#931: FILE: plugins/loader.c:59:
+        { /* end of list */ }

ERROR: externs should be avoided in .c files
#937: FILE: plugins/loader.c:65:
+extern struct qemu_plugin_state plugin;

total: 3 errors, 3 warnings, 1283 lines checked

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

9/55 Checking commit b5a580553858 (plugin: add implementation of the api)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#22: 
new file mode 100644

ERROR: "foo * bar" should be "foo *bar"
#291: FILE: plugins/api.c:265:
+static MachineState * get_ms(void)

total: 1 errors, 1 warnings, 291 lines checked

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

10/55 Checking commit d181e35fd957 (queue: add QTAILQ_REMOVE_SEVERAL)
WARNING: Block comments use a leading /* on a separate line
#32: FILE: include/qemu/queue.h:431:
+    } while (/*CONSTCOND*/0)

total: 0 errors, 1 warnings, 16 lines checked

Patch 10/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/55 Checking commit e337afd4f7ba (cputlb: document get_page_addr_code)
12/55 Checking commit d0544ab75fda (cputlb: introduce get_page_addr_code_hostp)
13/55 Checking commit 6d95ee8cb30d (tcg: add tcg_gen_st_ptr)
14/55 Checking commit cc9eeaa0a629 (plugin-gen: add module for TCG-related code)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#48: 
new file mode 100644

total: 0 errors, 1 warnings, 1123 lines checked

Patch 14/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/55 Checking commit b8e5c38572ae (atomic_template: add inline trace/plugin helpers)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#15: 
new file mode 100644

total: 0 errors, 1 warnings, 296 lines checked

Patch 15/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/55 Checking commit fd4c2fe3e305 (tcg: let plugins instrument virtual memory accesses)
WARNING: line over 80 characters
#111: FILE: include/exec/cpu_ldst_template.h:91:
+    uint16_t meminfo = trace_mem_build_info(SHIFT, false, MO_TE, false, mmu_idx);

total: 0 errors, 1 warnings, 322 lines checked

Patch 16/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/55 Checking commit 90bebf129835 (plugins: implement helpers for resolving hwaddr)
18/55 Checking commit 5f45de7bce60 (translate-all: notify plugin code of tb_flush)
19/55 Checking commit b464131a3109 (*-user: notify plugin of exit)
20/55 Checking commit f35ce994630e (*-user: plugin syscalls)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#93: 
new file mode 100644

total: 0 errors, 1 warnings, 127 lines checked

Patch 20/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/55 Checking commit 6c45871d214f (cpu: hook plugin vcpu events)
22/55 Checking commit 94478062431c (plugin-gen: add plugin_insn_append)
23/55 Checking commit 58d5ac329cb5 (translator: add translator_ld{ub,sw,uw,l,q})
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#81: FILE: include/exec/translator.h:161:
+#define DO_LOAD(type, name, shift)               \
+    set_helper_retaddr(1);                       \
+    ret = name ## _p(g2h(pc));                   \
+    clear_helper_retaddr();

WARNING: Block comments use a leading /* on a separate line
#114: FILE: include/exec/translator.h:194:
+GEN_TRANSLATOR_LD(translator_ldub, ldb, uint8_t, 0, /* no swap needed */)

total: 1 errors, 1 warnings, 116 lines checked

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

24/55 Checking commit 8579c0acf750 (target/arm: fetch code with translator_ld)
25/55 Checking commit 96a68abee927 (target/ppc: fetch code with translator_ld)
26/55 Checking commit 756d7ac99834 (target/sh4: fetch code with translator_ld)
27/55 Checking commit 788ef4b5927e (target/i386: fetch code with translator_ld)
28/55 Checking commit 3c933f4f3faa (target/hppa: fetch code with translator_ld)
29/55 Checking commit dc5cd57c35c4 (target/m68k: fetch code with translator_ld)
30/55 Checking commit e456086d0d91 (target/alpha: fetch code with translator_ld)
31/55 Checking commit 20a99e55c877 (target/riscv: fetch code with translator_ld)
32/55 Checking commit 77465835e70b (target/sparc: fetch code with translator_ld)
33/55 Checking commit 322a6e272620 (target/xtensa: fetch code with translator_ld)
34/55 Checking commit ef58223c94ef (target/openrisc: fetch code with translator_ld)
35/55 Checking commit 452fc4f67497 (translator: inject instrumentation from plugins)
36/55 Checking commit 557ab9fcb99e (plugin: add API symbols to qemu-plugins.symbols)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#136: 
new file mode 100644

total: 0 errors, 1 warnings, 166 lines checked

Patch 36/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
37/55 Checking commit 4502888fd6b3 (vl: support -plugin option)
38/55 Checking commit fdc50ab64b57 (linux-user: support -plugin option)
39/55 Checking commit 32a75208b318 (tests/plugin: add sample plugins)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#27: 
new file mode 100644

total: 0 errors, 1 warnings, 287 lines checked

Patch 39/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/55 Checking commit 19cc0a9df50d (tests/tcg/Makefile.target: fix path to config-host.mak)
41/55 Checking commit 71e2c9a8f84f (tests/tcg: set QEMU_OPTS for all cris runs)
42/55 Checking commit e7cbabbbdda6 (tests/tcg: move "virtual" tests to EXTRA_TESTS)
43/55 Checking commit 4e61a46a42ec (tests/tcg: drop test-i386-fprem from TESTS when not SLOW)
44/55 Checking commit 2c35bc84f958 (tests/tcg: enable plugin testing)
45/55 Checking commit 28695ed94613 (tests/plugin: add a hotblocks plugin)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#33: 
new file mode 100644

WARNING: line over 80 characters
#102: FILE: tests/plugin/hotblocks.c:65:
+            g_string_append_printf(report, "%#016"PRIx64", %d, %ld, %"PRId64"\n",

total: 0 errors, 2 warnings, 155 lines checked

Patch 45/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
46/55 Checking commit 3504de4e1f94 (plugin: add qemu_plugin_insn_disas helper)
ERROR: "foo * bar" should be "foo *bar"
#93: FILE: disas.c:539:
+char * plugin_disas(CPUState *cpu, uint64_t addr, size_t size)

ERROR: Error messages should not contain newlines
#136: FILE: disas.c:582:
+        warn_report("%s: %zu bytes left over\n", __func__, size - count);

ERROR: "foo * bar" should be "foo *bar"
#153: FILE: include/disas/disas.h:17:
+char * plugin_disas(CPUState *cpu, uint64_t addr, size_t size);

ERROR: "foo * bar" should be "foo *bar"
#172: FILE: include/qemu/qemu-plugin.h:334:
+char * qemu_plugin_insn_disas(const struct qemu_plugin_insn *insn);

total: 4 errors, 0 warnings, 171 lines checked

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

47/55 Checking commit 09bc325b2af1 (tests/plugin: add instruction execution breakdown)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#27: 
new file mode 100644

ERROR: space required after that ',' (ctx:VxV)
#102: FILE: tests/plugin/howvec.c:71:
+    { "  Add/Sub (imm,tags)","asit",   0x1f800000, 0x11800000, COUNT_CLASS},
                             ^

ERROR: space required after that ',' (ctx:VxV)
#125: FILE: tests/plugin/howvec.c:94:
+    { "  AdvSimd ldstmult++","advlsmp",0xbfb00000, 0x0c800000, COUNT_CLASS},
                             ^

ERROR: space required after that ',' (ctx:VxV)
#125: FILE: tests/plugin/howvec.c:94:
+    { "  AdvSimd ldstmult++","advlsmp",0xbfb00000, 0x0c800000, COUNT_CLASS},
                                       ^

ERROR: space required after that ',' (ctx:VxV)
#127: FILE: tests/plugin/howvec.c:96:
+    { "  AdvSimd ldst++",    "advlssp",0xbf800000, 0x0d800000, COUNT_CLASS},
                                       ^

ERROR: space required after that ',' (ctx:VxV)
#131: FILE: tests/plugin/howvec.c:100:
+    { "  ldst noalloc pair", "ldstnap",0x3b800000, 0x28000000, COUNT_CLASS},
                                       ^

ERROR: space required after that ',' (ctx:VxV)
#135: FILE: tests/plugin/howvec.c:104:
+    { "  ldst reg (reg off)","ldstro", 0x3b200b00, 0x38200800, COUNT_CLASS},
                             ^

WARNING: line over 80 characters
#170: FILE: tests/plugin/howvec.c:139:
+            g_string_append_printf(report, "Class: %-24s\tcounted individually\n",

ERROR: space required after that ',' (ctx:VxV)
#186: FILE: tests/plugin/howvec.c:155:
+        g_string_append_printf(report,"Individual Instructions:\n");
                                      ^

WARNING: line over 80 characters
#192: FILE: tests/plugin/howvec.c:161:
+            g_string_append_printf(report, "Instr: %-24s\t(%ld hits)\t(op=%#08x/%s)\n",

ERROR: "foo * bar" should be "foo *bar"
#217: FILE: tests/plugin/howvec.c:186:
+static uint64_t * find_counter(struct qemu_plugin_insn *insn)

WARNING: line over 80 characters
#249: FILE: tests/plugin/howvec.c:218:
+                                                       GUINT_TO_POINTER(opcode));

total: 8 errors, 4 warnings, 310 lines checked

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

48/55 Checking commit 277050daf1db (tests/plugin: add hotpages plugin to breakdown memory access patterns)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26: 
new file mode 100644

total: 0 errors, 1 warnings, 186 lines checked

Patch 48/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/55 Checking commit c968fc46a5e0 (accel/stubs: reduce headers from tcg-stub)
50/55 Checking commit d9fde5180956 (include/exec: wrap cpu_ldst.h in CONFIG_TCG)
51/55 Checking commit 8d5b793b5566 (plugins: expand the plugin_init function to include an info block)
ERROR: line over 90 characters
#82: FILE: plugins/loader.c:66:
+typedef int (*qemu_plugin_install_func_t)(qemu_plugin_id_t, const qemu_info_t *, int, char **);

ERROR: "foo * bar" should be "foo *bar"
#112: FILE: plugins/loader.c:259:
+    MachineState * ms = MACHINE(qdev_get_machine());

total: 2 errors, 0 warnings, 176 lines checked

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

52/55 Checking commit 984bf57ce9d8 (plugins: make howvec plugin more generic)
WARNING: line over 80 characters
#49: FILE: tests/plugin/howvec.c:117:
+    { "Unclassified",        "unclas", 0x00000000, 0x00000000, COUNT_INDIVIDUAL},

ERROR: that open brace { should be on the previous line
#59: FILE: tests/plugin/howvec.c:127:
+ClassSelector class_tables[] =
+{

total: 1 errors, 1 warnings, 132 lines checked

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

53/55 Checking commit 173764dcb67b (plugins: add sparc64 instruction classification table)
WARNING: line over 80 characters
#29: FILE: tests/plugin/howvec.c:124:
+    { "Unclassified",        "unclas", 0x00000000, 0x00000000, COUNT_INDIVIDUAL},

WARNING: line over 80 characters
#38: FILE: tests/plugin/howvec.c:133:
+    { "Unclassified",        "unclas", 0x00000000, 0x00000000, COUNT_INDIVIDUAL},

total: 0 errors, 2 warnings, 34 lines checked

Patch 53/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
54/55 Checking commit 52d40be360ad (plugins: add qemu_plugin_outs and use it)
WARNING: line over 80 characters
#170: FILE: tests/plugin/hotpages.c:71:
+    g_autoptr(GString) report = g_string_new("Addr, RCPUs, Reads, WCPUs, Writes\n");

total: 0 errors, 1 warnings, 278 lines checked

Patch 54/55 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
55/55 Checking commit 3c4538dc4aa7 (.travis.yml: add --enable-plugins tests)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20191014104948.4291-1-alex.bennee@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com