[PATCH v10 00/32] i386 cleanup

Claudio Fontana posted 32 patches 3 years, 4 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201210121226.19822-1-cfontana@suse.de
Maintainers: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Anthony Green <green@moxielogic.com>, Colin Xu <colin.xu@intel.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Laurent Vivier <laurent@vivier.eu>, Thomas Huth <thuth@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Roman Bolshakov <r.bolshakov@yadro.com>, Eduardo Habkost <ehabkost@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Cornelia Huck <cohuck@redhat.com>, Marek Vasut <marex@denx.de>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Paul Durrant <paul@xen.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Sarah Harris <S.E.Harris@kent.ac.uk>, Stafford Horne <shorne@gmail.com>, Alistair Francis <Alistair.Francis@wdc.com>, Anthony Perard <anthony.perard@citrix.com>, Michael Rolnik <mrolnik@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, David Hildenbrand <david@redhat.com>, Wenchao Wang <wenchao.wang@intel.com>, David Gibson <david@gibson.dropbear.id.au>, Michael Walle <michael@walle.cc>, Max Filippov <jcmvbkbc@gmail.com>, Laurent Vivier <lvivier@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Yoshinori Sato <ysato@users.sourceforge.jp>, Chris Wulff <crwulff@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Sunil Muthuswamy <sunilmut@microsoft.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Stefano Stabellini <sstabellini@kernel.org>, Cameron Esfahani <dirty@apple.com>, Palmer Dabbelt <palmer@dabbelt.com>
meson.build                                   |   1 +
accel/accel-softmmu.h                         |  15 +
accel/kvm/kvm-cpus.h                          |   2 -
accel/tcg/tcg-accel-ops-icount.h              |  19 +
accel/tcg/tcg-accel-ops-mttcg.h               |  19 +
accel/tcg/tcg-accel-ops-rr.h                  |  21 +
accel/tcg/{tcg-cpus.h => tcg-accel-ops.h}     |   8 +-
include/hw/boards.h                           |   2 +-
include/hw/core/accel-cpu.h                   |  25 +
include/hw/core/cpu.h                         |  92 ++-
include/hw/core/tcg-cpu-ops.h                 |  77 +++
include/{sysemu => qemu}/accel.h              |  16 +-
include/sysemu/accel-ops.h                    |  45 ++
include/sysemu/cpus.h                         |  26 +-
include/sysemu/hvf.h                          |   2 +-
include/sysemu/kvm.h                          |   2 +-
include/sysemu/kvm_int.h                      |   2 +-
target/i386/cpu.h                             | 120 +---
.../i386/{hax-cpus.h => hax/hax-accel-ops.h}  |   2 -
target/i386/{ => hax}/hax-i386.h              |   6 +-
target/i386/{ => hax}/hax-interface.h         |   0
target/i386/{ => hax}/hax-posix.h             |   0
target/i386/{ => hax}/hax-windows.h           |   2 +-
target/i386/host-cpu.h                        |  19 +
.../i386/hvf/{hvf-cpus.h => hvf-accel-ops.h}  |   2 -
target/i386/hvf/hvf-i386.h                    |   2 +-
target/i386/{ => kvm}/hyperv-proto.h          |   0
target/i386/{ => kvm}/hyperv.h                |   0
target/i386/kvm/kvm-cpu.h                     |  41 ++
target/i386/{ => kvm}/kvm_i386.h              |   0
target/i386/kvm/trace.h                       |   1 +
target/i386/tcg/helper-tcg.h                  | 112 ++++
target/i386/{ => whpx}/whp-dispatch.h         |   0
.../{whpx-cpus.h => whpx/whpx-accel-ops.h}    |   2 -
accel/accel-common.c                          | 105 ++++
accel/{accel.c => accel-softmmu.c}            |  60 +-
accel/accel-user.c                            |  24 +
accel/kvm/{kvm-cpus.c => kvm-accel-ops.c}     |  26 +-
accel/kvm/kvm-all.c                           |   2 -
accel/qtest/qtest.c                           |  25 +-
accel/tcg/cpu-exec.c                          |  70 ++-
accel/tcg/cputlb.c                            |   6 +-
accel/tcg/tcg-accel-ops-icount.c              | 138 +++++
accel/tcg/tcg-accel-ops-mttcg.c               | 134 ++++
accel/tcg/tcg-accel-ops-rr.c                  | 298 +++++++++
accel/tcg/tcg-accel-ops.c                     | 125 ++++
accel/tcg/tcg-all.c                           |  14 +-
accel/tcg/tcg-cpus.c                          | 570 ------------------
accel/tcg/user-exec.c                         |   6 +-
accel/xen/xen-all.c                           |  24 +-
bsd-user/main.c                               |  11 +-
cpu.c                                         |  71 ++-
hw/core/cpu.c                                 |  30 +-
hw/i386/fw_cfg.c                              |   2 +-
hw/i386/intel_iommu.c                         |   2 +-
hw/i386/kvm/apic.c                            |   2 +-
hw/i386/kvm/clock.c                           |   2 +-
hw/i386/microvm.c                             |   2 +-
hw/i386/pc.c                                  |   2 +-
hw/i386/pc_piix.c                             |   1 +
hw/i386/x86.c                                 |   2 +-
hw/mips/jazz.c                                |   9 +-
linux-user/main.c                             |   7 +-
softmmu/cpus.c                                |  12 +-
softmmu/icount.c                              |   2 +-
softmmu/memory.c                              |   2 +-
softmmu/qtest.c                               |   2 +-
softmmu/vl.c                                  |   8 +-
target/alpha/cpu.c                            |  18 +-
target/arm/cpu.c                              |  26 +-
target/arm/cpu64.c                            |   5 +-
target/arm/cpu_tcg.c                          |   8 +-
target/arm/helper.c                           |   4 +
target/arm/kvm64.c                            |   6 +-
target/avr/cpu.c                              |  13 +-
target/avr/helper.c                           |   4 +-
target/cris/cpu.c                             |  30 +-
target/cris/helper.c                          |   4 +-
target/hppa/cpu.c                             |  15 +-
target/i386/cpu-dump.c                        | 537 +++++++++++++++++
target/i386/cpu.c                             | 418 ++-----------
.../i386/{hax-cpus.c => hax/hax-accel-ops.c}  |  31 +-
target/i386/{ => hax}/hax-all.c               |   7 +-
target/i386/{ => hax}/hax-mem.c               |   2 +-
target/i386/{ => hax}/hax-posix.c             |   2 +-
target/i386/{ => hax}/hax-windows.c           |   2 +-
target/i386/helper.c                          | 539 +----------------
target/i386/host-cpu.c                        | 198 ++++++
.../i386/hvf/{hvf-cpus.c => hvf-accel-ops.c}  |  29 +-
target/i386/hvf/hvf-cpu.c                     |  65 ++
target/i386/hvf/hvf.c                         |   5 +-
target/i386/hvf/x86_task.c                    |   2 +-
target/i386/hvf/x86hvf.c                      |   2 +-
target/i386/{ => kvm}/hyperv-stub.c           |   0
target/i386/{ => kvm}/hyperv.c                |   0
target/i386/kvm/kvm-cpu.c                     | 148 +++++
target/i386/{ => kvm}/kvm-stub.c              |   0
target/i386/{ => kvm}/kvm.c                   |   3 +-
target/i386/machine.c                         |   4 +-
target/i386/{ => tcg}/bpt_helper.c            |   1 +
target/i386/{ => tcg}/cc_helper.c             |   1 +
target/i386/{ => tcg}/excp_helper.c           |   1 +
target/i386/{ => tcg}/fpu_helper.c            |  33 +-
target/i386/{ => tcg}/int_helper.c            |   1 +
target/i386/{ => tcg}/mem_helper.c            |   1 +
target/i386/{ => tcg}/misc_helper.c           |   1 +
target/i386/{ => tcg}/mpx_helper.c            |   1 +
target/i386/{ => tcg}/seg_helper.c            |   1 +
target/i386/{ => tcg}/smm_helper.c            |   2 +
target/i386/{ => tcg}/svm_helper.c            |   1 +
target/i386/tcg/tcg-cpu.c                     | 173 ++++++
target/i386/{ => tcg}/tcg-stub.c              |   0
target/i386/{ => tcg}/translate.c             |   1 +
.../{whpx-cpus.c => whpx/whpx-accel-ops.c}    |  31 +-
target/i386/{ => whpx}/whpx-all.c             |   6 +-
target/lm32/cpu.c                             |  13 +-
target/m68k/cpu.c                             |  12 +-
target/microblaze/cpu.c                       |  23 +-
target/mips/cpu.c                             |  21 +-
target/moxie/cpu.c                            |  10 +-
target/nios2/cpu.c                            |  14 +-
target/openrisc/cpu.c                         |  12 +-
target/riscv/cpu.c                            |  25 +-
target/rx/cpu.c                               |  18 +-
target/s390x/cpu.c                            |  15 +-
target/sh4/cpu.c                              |  14 +-
target/sparc/cpu.c                            |  18 +-
target/tilegx/cpu.c                           |  10 +-
target/tricore/cpu.c                          |   8 +-
target/unicore32/cpu.c                        |  14 +-
target/xtensa/cpu.c                           |  16 +-
MAINTAINERS                                   |  19 +-
accel/kvm/meson.build                         |   2 +-
accel/meson.build                             |   4 +-
accel/tcg/meson.build                         |   9 +-
target/i386/hax/meson.build                   |   7 +
target/i386/hvf/meson.build                   |   3 +-
target/i386/kvm/meson.build                   |   8 +
target/i386/kvm/trace-events                  |   7 +
target/i386/meson.build                       |  38 +-
target/i386/tcg/meson.build                   |  14 +
target/i386/trace-events                      |   6 -
target/i386/whpx/meson.build                  |   4 +
target/ppc/translate_init.c.inc               |  23 +-
144 files changed, 3104 insertions(+), 2144 deletions(-)
create mode 100644 accel/accel-softmmu.h
create mode 100644 accel/tcg/tcg-accel-ops-icount.h
create mode 100644 accel/tcg/tcg-accel-ops-mttcg.h
create mode 100644 accel/tcg/tcg-accel-ops-rr.h
rename accel/tcg/{tcg-cpus.h => tcg-accel-ops.h} (52%)
create mode 100644 include/hw/core/accel-cpu.h
create mode 100644 include/hw/core/tcg-cpu-ops.h
rename include/{sysemu => qemu}/accel.h (94%)
create mode 100644 include/sysemu/accel-ops.h
rename target/i386/{hax-cpus.h => hax/hax-accel-ops.h} (95%)
rename target/i386/{ => hax}/hax-i386.h (95%)
rename target/i386/{ => hax}/hax-interface.h (100%)
rename target/i386/{ => hax}/hax-posix.h (100%)
rename target/i386/{ => hax}/hax-windows.h (99%)
create mode 100644 target/i386/host-cpu.h
rename target/i386/hvf/{hvf-cpus.h => hvf-accel-ops.h} (94%)
rename target/i386/{ => kvm}/hyperv-proto.h (100%)
rename target/i386/{ => kvm}/hyperv.h (100%)
create mode 100644 target/i386/kvm/kvm-cpu.h
rename target/i386/{ => kvm}/kvm_i386.h (100%)
create mode 100644 target/i386/kvm/trace.h
create mode 100644 target/i386/tcg/helper-tcg.h
rename target/i386/{ => whpx}/whp-dispatch.h (100%)
rename target/i386/{whpx-cpus.h => whpx/whpx-accel-ops.h} (96%)
create mode 100644 accel/accel-common.c
rename accel/{accel.c => accel-softmmu.c} (64%)
create mode 100644 accel/accel-user.c
rename accel/kvm/{kvm-cpus.c => kvm-accel-ops.c} (72%)
create mode 100644 accel/tcg/tcg-accel-ops-icount.c
create mode 100644 accel/tcg/tcg-accel-ops-mttcg.c
create mode 100644 accel/tcg/tcg-accel-ops-rr.c
create mode 100644 accel/tcg/tcg-accel-ops.c
delete mode 100644 accel/tcg/tcg-cpus.c
create mode 100644 target/i386/cpu-dump.c
rename target/i386/{hax-cpus.c => hax/hax-accel-ops.c} (69%)
rename target/i386/{ => hax}/hax-all.c (99%)
rename target/i386/{ => hax}/hax-mem.c (99%)
rename target/i386/{ => hax}/hax-posix.c (99%)
rename target/i386/{ => hax}/hax-windows.c (99%)
create mode 100644 target/i386/host-cpu.c
rename target/i386/hvf/{hvf-cpus.c => hvf-accel-ops.c} (84%)
create mode 100644 target/i386/hvf/hvf-cpu.c
rename target/i386/{ => kvm}/hyperv-stub.c (100%)
rename target/i386/{ => kvm}/hyperv.c (100%)
create mode 100644 target/i386/kvm/kvm-cpu.c
rename target/i386/{ => kvm}/kvm-stub.c (100%)
rename target/i386/{ => kvm}/kvm.c (99%)
rename target/i386/{ => tcg}/bpt_helper.c (99%)
rename target/i386/{ => tcg}/cc_helper.c (99%)
rename target/i386/{ => tcg}/excp_helper.c (99%)
rename target/i386/{ => tcg}/fpu_helper.c (99%)
rename target/i386/{ => tcg}/int_helper.c (99%)
rename target/i386/{ => tcg}/mem_helper.c (99%)
rename target/i386/{ => tcg}/misc_helper.c (99%)
rename target/i386/{ => tcg}/mpx_helper.c (99%)
rename target/i386/{ => tcg}/seg_helper.c (99%)
rename target/i386/{ => tcg}/smm_helper.c (99%)
rename target/i386/{ => tcg}/svm_helper.c (99%)
create mode 100644 target/i386/tcg/tcg-cpu.c
rename target/i386/{ => tcg}/tcg-stub.c (100%)
rename target/i386/{ => tcg}/translate.c (99%)
rename target/i386/{whpx-cpus.c => whpx/whpx-accel-ops.c} (72%)
rename target/i386/{ => whpx}/whpx-all.c (99%)
create mode 100644 target/i386/hax/meson.build
create mode 100644 target/i386/kvm/meson.build
create mode 100644 target/i386/kvm/trace-events
create mode 100644 target/i386/tcg/meson.build
create mode 100644 target/i386/whpx/meson.build
[PATCH v10 00/32] i386 cleanup
Posted by Claudio Fontana 3 years, 4 months ago
Hello, this is version 10 of the cleanup, changed from RFC to PATCH.

v9 -> v10: minor tweaks and fixes

* in "i386: split cpu accelerators from cpu.c",

use kvm/kvm-cpu.c, hvf/hvf-cpu.c, tcg/tcg-cpu.c.
Easier to understand compared to editing multiple cpu.c files,
and matches the header files if needed (kvm-cpu.h).

* in "accel: replace struct CpusAccel with AccelOpsClass",

make it a bit more consistent, by naming the files defining
the AccelOpsClass types "...-accel-ops.c" instead of the old
naming "...-cpus.c".

* in "cpu: move cc->transaction_failed to tcg_ops",

protect with CONFIG_TCG the use of tcg_ops for hw/misc/jazz.c,

 #include "exec/memattrs.h" (Philippe, Eduardo)

* in "cpu: Move synchronize_from_tb() to tcg_ops",

 #include "hw/core/cpu.h" (Philippe, Eduardo)

do not remove the comment about struct TcgCpuOperations (Philippe)

* in "accel/tcg: split TCG-only code from cpu_exec_realizefn",

invert tcg_target_initialized set order (Alex)

* in "i386: move TCG cpu class initialization out of helper.c",

extract helper-tcg.h, tcg-cpu.c, and tcg-cpu.h directly into
tcg/, avoiding the extra move later to tcg/ (Alex)



v8 -> v9: move additional methods to CPUClass->tcg_ops

do_unaligned_access, transaction_failed and do_interrupt.

do_interrupt is a bit tricky, as the same code is reused
(albeit not usually directly) for KVM under certain odd conditions.

Change arm, as the only user of do_interrupt callback for KVM,
to instead call the target function directly arm_do_interrupt.

v7 -> v8: add missing CONFIG_TCGs, fix bugs

* add the prerequisite patches for "3 tcg" at the beginning of the
  series for convenience (already reviewed, queued by RH).

* add CONFIG_TCG to TCGCpuOperations and tcg_ops variable use

* reduce the scope of the realizefn refactoring, do not
  introduce a separate cpu_accel_realize, and instead use the
  existing cpu_exec_realizefn, there is not enough benefit
  to introduce a new function.

* fix bugs in user mode due to attempt to move the tcg_region_init()
  early, so it could be done just once in tcg_init() for both
  softmmu and user mode. Unfortunately it needs to remain deferred
  for user mode, as it needs to be done after prologue init and
  after the GUEST_BASE has been set.

v6 -> v7: integrate TCGCpuOperations, refactored cpu_exec_realizefn

* integrate TCGCpuOperations (Eduardo)

Taken some refactoring from Eduardo for Tcg-only operations on
CPUClass.

* refactored cpu_exec_realizefn

The other main change is a refactoring of cpu_exec_realizefn,
directly linked to the effort of making many cpu_exec operations
TCG-only (Eduardo series above):

cpu_exec_realizefn is actually a TCG-only thing, with the
exception of a couple things that can be done in base cpu code.

This changes all targets realizefn, so I guess I have to Cc:
the Multiverse? (Universe was already CCed for all accelerators).


v5 -> v6: remove MODULE_INIT_ACCEL_CPU


instead, use a call to accel_init_interfaces().

* The class lookups are now general and performed in accel/

  new AccelCPUClass for new archs are supported as new
  ones appear in the class hierarchy, no need for stubs.

* Split the code a bit better


v4 -> v5: centralized and simplified initializations

I put in Cc: Emilio G. Cota, specifically because in patch 8
I (re)moved for user-mode the call to tcg_regions_init().

The call happens now inside the tcg AccelClass machine_init,
(so earlier). This seems to work fine, but thought to get the
author opinion on this.

Rebased on "tcg-cpus: split into 3 tcg variants" series
(queued by Richard), to avoid some code churn:


https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg04356.html


* Extended AccelClass to user-mode.

user-mode now does not call tcg_exec_init directly,
instead it uses the tcg accel class, and its init_machine method.

Since user-mode does not define or use a machine state,
the machine is just passed as NULL.

The immediate advantage is that now we can call current_accel()
from both user mode and softmmu, so we can work out the correct
class to use for accelerator initializations.

* QOMification of CpusAccelOps

simple QOMification of CpusAccelOps abstract class.

* Centralized all accel_cpu_init, so only one per cpu-arch,
  plus one for all accels will remain.

  So we can expect accel_cpu_init() to be limited to:
  
  softmmu/cpus.c - initializes the chosen softmmu accel ops for the cpus module.
  target/ARCH/cpu.c - initializes the chosen arch-specific cpu accelerator.
  
These changes are meant to address concerns/issues (Paolo):

1) the use of if (tcg_enabled()) and similar in the module_init call path

2) the excessive number of accel_cpu_init() to hunt down in the codebase.


* Fixed wrong use of host_cpu_class_init (Eduardo)


v3 -> v4: QOMification of X86CPUAccelClass


In this version I basically QOMified X86CPUAccel, taking the
suggestions from Eduardo as the starting point,
but stopping just short of making it an actual QOM interface,
using a plain abstract class, and then subclasses for the
actual objects.

Initialization is still using the existing qemu initialization
framework (module_call_init), which is I still think is better
than the alternatives proposed, in the current state.

Possibly some improvements could be developed in the future here.
In this case, effort should be put in keeping things extendible,
in order not to be blocked once accelerators also become modules.

Motivation and higher level steps:

https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg04628.html

Looking forward to your comments on this proposal,

Ciao,

Claudio


Claudio Fontana (23):
  accel/tcg: split CpusAccel into three TCG variants
  accel/tcg: split tcg_start_vcpu_thread
  accel/tcg: rename tcg-cpus functions to match module name
  i386: move kvm accel files into kvm/
  i386: move whpx accel files into whpx/
  i386: move hax accel files into hax/
  i386: hvf: remove stale MAINTAINERS entry for old hvf stubs
  i386: move TCG accel files into tcg/
  i386: move cpu dump out of helper.c into cpu-dump.c
  i386: move TCG cpu class initialization out of helper.c
  target/riscv: remove CONFIG_TCG, as it is always TCG
  accel/tcg: split TCG-only code from cpu_exec_realizefn
  target/arm: do not use cc->do_interrupt for KVM directly
  cpu: move cc->do_interrupt to tcg_ops
  cpu: move cc->transaction_failed to tcg_ops
  cpu: move do_unaligned_access to tcg_ops
  accel: extend AccelState and AccelClass to user-mode
  accel: replace struct CpusAccel with AccelOpsClass
  accel: introduce AccelCPUClass extending CPUClass
  i386: split cpu accelerators from cpu.c, using AccelCPUClass
  cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn
  hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn
  cpu: introduce cpu_accel_instance_init

Eduardo Habkost (9):
  tcg: cpu_exec_{enter,exit} helpers
  tcg: make CPUClass.cpu_exec_* optional
  tcg: Make CPUClass.debug_excp_handler optional
  cpu: Remove unnecessary noop methods
  cpu: Introduce TCGCpuOperations struct
  cpu: Move synchronize_from_tb() to tcg_ops
  cpu: Move cpu_exec_* to tcg_ops
  cpu: Move tlb_fill to tcg_ops
  cpu: Move debug_excp_handler to tcg_ops

 meson.build                                   |   1 +
 accel/accel-softmmu.h                         |  15 +
 accel/kvm/kvm-cpus.h                          |   2 -
 accel/tcg/tcg-accel-ops-icount.h              |  19 +
 accel/tcg/tcg-accel-ops-mttcg.h               |  19 +
 accel/tcg/tcg-accel-ops-rr.h                  |  21 +
 accel/tcg/{tcg-cpus.h => tcg-accel-ops.h}     |   8 +-
 include/hw/boards.h                           |   2 +-
 include/hw/core/accel-cpu.h                   |  25 +
 include/hw/core/cpu.h                         |  92 ++-
 include/hw/core/tcg-cpu-ops.h                 |  77 +++
 include/{sysemu => qemu}/accel.h              |  16 +-
 include/sysemu/accel-ops.h                    |  45 ++
 include/sysemu/cpus.h                         |  26 +-
 include/sysemu/hvf.h                          |   2 +-
 include/sysemu/kvm.h                          |   2 +-
 include/sysemu/kvm_int.h                      |   2 +-
 target/i386/cpu.h                             | 120 +---
 .../i386/{hax-cpus.h => hax/hax-accel-ops.h}  |   2 -
 target/i386/{ => hax}/hax-i386.h              |   6 +-
 target/i386/{ => hax}/hax-interface.h         |   0
 target/i386/{ => hax}/hax-posix.h             |   0
 target/i386/{ => hax}/hax-windows.h           |   2 +-
 target/i386/host-cpu.h                        |  19 +
 .../i386/hvf/{hvf-cpus.h => hvf-accel-ops.h}  |   2 -
 target/i386/hvf/hvf-i386.h                    |   2 +-
 target/i386/{ => kvm}/hyperv-proto.h          |   0
 target/i386/{ => kvm}/hyperv.h                |   0
 target/i386/kvm/kvm-cpu.h                     |  41 ++
 target/i386/{ => kvm}/kvm_i386.h              |   0
 target/i386/kvm/trace.h                       |   1 +
 target/i386/tcg/helper-tcg.h                  | 112 ++++
 target/i386/{ => whpx}/whp-dispatch.h         |   0
 .../{whpx-cpus.h => whpx/whpx-accel-ops.h}    |   2 -
 accel/accel-common.c                          | 105 ++++
 accel/{accel.c => accel-softmmu.c}            |  60 +-
 accel/accel-user.c                            |  24 +
 accel/kvm/{kvm-cpus.c => kvm-accel-ops.c}     |  26 +-
 accel/kvm/kvm-all.c                           |   2 -
 accel/qtest/qtest.c                           |  25 +-
 accel/tcg/cpu-exec.c                          |  70 ++-
 accel/tcg/cputlb.c                            |   6 +-
 accel/tcg/tcg-accel-ops-icount.c              | 138 +++++
 accel/tcg/tcg-accel-ops-mttcg.c               | 134 ++++
 accel/tcg/tcg-accel-ops-rr.c                  | 298 +++++++++
 accel/tcg/tcg-accel-ops.c                     | 125 ++++
 accel/tcg/tcg-all.c                           |  14 +-
 accel/tcg/tcg-cpus.c                          | 570 ------------------
 accel/tcg/user-exec.c                         |   6 +-
 accel/xen/xen-all.c                           |  24 +-
 bsd-user/main.c                               |  11 +-
 cpu.c                                         |  71 ++-
 hw/core/cpu.c                                 |  30 +-
 hw/i386/fw_cfg.c                              |   2 +-
 hw/i386/intel_iommu.c                         |   2 +-
 hw/i386/kvm/apic.c                            |   2 +-
 hw/i386/kvm/clock.c                           |   2 +-
 hw/i386/microvm.c                             |   2 +-
 hw/i386/pc.c                                  |   2 +-
 hw/i386/pc_piix.c                             |   1 +
 hw/i386/x86.c                                 |   2 +-
 hw/mips/jazz.c                                |   9 +-
 linux-user/main.c                             |   7 +-
 softmmu/cpus.c                                |  12 +-
 softmmu/icount.c                              |   2 +-
 softmmu/memory.c                              |   2 +-
 softmmu/qtest.c                               |   2 +-
 softmmu/vl.c                                  |   8 +-
 target/alpha/cpu.c                            |  18 +-
 target/arm/cpu.c                              |  26 +-
 target/arm/cpu64.c                            |   5 +-
 target/arm/cpu_tcg.c                          |   8 +-
 target/arm/helper.c                           |   4 +
 target/arm/kvm64.c                            |   6 +-
 target/avr/cpu.c                              |  13 +-
 target/avr/helper.c                           |   4 +-
 target/cris/cpu.c                             |  30 +-
 target/cris/helper.c                          |   4 +-
 target/hppa/cpu.c                             |  15 +-
 target/i386/cpu-dump.c                        | 537 +++++++++++++++++
 target/i386/cpu.c                             | 418 ++-----------
 .../i386/{hax-cpus.c => hax/hax-accel-ops.c}  |  31 +-
 target/i386/{ => hax}/hax-all.c               |   7 +-
 target/i386/{ => hax}/hax-mem.c               |   2 +-
 target/i386/{ => hax}/hax-posix.c             |   2 +-
 target/i386/{ => hax}/hax-windows.c           |   2 +-
 target/i386/helper.c                          | 539 +----------------
 target/i386/host-cpu.c                        | 198 ++++++
 .../i386/hvf/{hvf-cpus.c => hvf-accel-ops.c}  |  29 +-
 target/i386/hvf/hvf-cpu.c                     |  65 ++
 target/i386/hvf/hvf.c                         |   5 +-
 target/i386/hvf/x86_task.c                    |   2 +-
 target/i386/hvf/x86hvf.c                      |   2 +-
 target/i386/{ => kvm}/hyperv-stub.c           |   0
 target/i386/{ => kvm}/hyperv.c                |   0
 target/i386/kvm/kvm-cpu.c                     | 148 +++++
 target/i386/{ => kvm}/kvm-stub.c              |   0
 target/i386/{ => kvm}/kvm.c                   |   3 +-
 target/i386/machine.c                         |   4 +-
 target/i386/{ => tcg}/bpt_helper.c            |   1 +
 target/i386/{ => tcg}/cc_helper.c             |   1 +
 target/i386/{ => tcg}/excp_helper.c           |   1 +
 target/i386/{ => tcg}/fpu_helper.c            |  33 +-
 target/i386/{ => tcg}/int_helper.c            |   1 +
 target/i386/{ => tcg}/mem_helper.c            |   1 +
 target/i386/{ => tcg}/misc_helper.c           |   1 +
 target/i386/{ => tcg}/mpx_helper.c            |   1 +
 target/i386/{ => tcg}/seg_helper.c            |   1 +
 target/i386/{ => tcg}/smm_helper.c            |   2 +
 target/i386/{ => tcg}/svm_helper.c            |   1 +
 target/i386/tcg/tcg-cpu.c                     | 173 ++++++
 target/i386/{ => tcg}/tcg-stub.c              |   0
 target/i386/{ => tcg}/translate.c             |   1 +
 .../{whpx-cpus.c => whpx/whpx-accel-ops.c}    |  31 +-
 target/i386/{ => whpx}/whpx-all.c             |   6 +-
 target/lm32/cpu.c                             |  13 +-
 target/m68k/cpu.c                             |  12 +-
 target/microblaze/cpu.c                       |  23 +-
 target/mips/cpu.c                             |  21 +-
 target/moxie/cpu.c                            |  10 +-
 target/nios2/cpu.c                            |  14 +-
 target/openrisc/cpu.c                         |  12 +-
 target/riscv/cpu.c                            |  25 +-
 target/rx/cpu.c                               |  18 +-
 target/s390x/cpu.c                            |  15 +-
 target/sh4/cpu.c                              |  14 +-
 target/sparc/cpu.c                            |  18 +-
 target/tilegx/cpu.c                           |  10 +-
 target/tricore/cpu.c                          |   8 +-
 target/unicore32/cpu.c                        |  14 +-
 target/xtensa/cpu.c                           |  16 +-
 MAINTAINERS                                   |  19 +-
 accel/kvm/meson.build                         |   2 +-
 accel/meson.build                             |   4 +-
 accel/tcg/meson.build                         |   9 +-
 target/i386/hax/meson.build                   |   7 +
 target/i386/hvf/meson.build                   |   3 +-
 target/i386/kvm/meson.build                   |   8 +
 target/i386/kvm/trace-events                  |   7 +
 target/i386/meson.build                       |  38 +-
 target/i386/tcg/meson.build                   |  14 +
 target/i386/trace-events                      |   6 -
 target/i386/whpx/meson.build                  |   4 +
 target/ppc/translate_init.c.inc               |  23 +-
 144 files changed, 3104 insertions(+), 2144 deletions(-)
 create mode 100644 accel/accel-softmmu.h
 create mode 100644 accel/tcg/tcg-accel-ops-icount.h
 create mode 100644 accel/tcg/tcg-accel-ops-mttcg.h
 create mode 100644 accel/tcg/tcg-accel-ops-rr.h
 rename accel/tcg/{tcg-cpus.h => tcg-accel-ops.h} (52%)
 create mode 100644 include/hw/core/accel-cpu.h
 create mode 100644 include/hw/core/tcg-cpu-ops.h
 rename include/{sysemu => qemu}/accel.h (94%)
 create mode 100644 include/sysemu/accel-ops.h
 rename target/i386/{hax-cpus.h => hax/hax-accel-ops.h} (95%)
 rename target/i386/{ => hax}/hax-i386.h (95%)
 rename target/i386/{ => hax}/hax-interface.h (100%)
 rename target/i386/{ => hax}/hax-posix.h (100%)
 rename target/i386/{ => hax}/hax-windows.h (99%)
 create mode 100644 target/i386/host-cpu.h
 rename target/i386/hvf/{hvf-cpus.h => hvf-accel-ops.h} (94%)
 rename target/i386/{ => kvm}/hyperv-proto.h (100%)
 rename target/i386/{ => kvm}/hyperv.h (100%)
 create mode 100644 target/i386/kvm/kvm-cpu.h
 rename target/i386/{ => kvm}/kvm_i386.h (100%)
 create mode 100644 target/i386/kvm/trace.h
 create mode 100644 target/i386/tcg/helper-tcg.h
 rename target/i386/{ => whpx}/whp-dispatch.h (100%)
 rename target/i386/{whpx-cpus.h => whpx/whpx-accel-ops.h} (96%)
 create mode 100644 accel/accel-common.c
 rename accel/{accel.c => accel-softmmu.c} (64%)
 create mode 100644 accel/accel-user.c
 rename accel/kvm/{kvm-cpus.c => kvm-accel-ops.c} (72%)
 create mode 100644 accel/tcg/tcg-accel-ops-icount.c
 create mode 100644 accel/tcg/tcg-accel-ops-mttcg.c
 create mode 100644 accel/tcg/tcg-accel-ops-rr.c
 create mode 100644 accel/tcg/tcg-accel-ops.c
 delete mode 100644 accel/tcg/tcg-cpus.c
 create mode 100644 target/i386/cpu-dump.c
 rename target/i386/{hax-cpus.c => hax/hax-accel-ops.c} (69%)
 rename target/i386/{ => hax}/hax-all.c (99%)
 rename target/i386/{ => hax}/hax-mem.c (99%)
 rename target/i386/{ => hax}/hax-posix.c (99%)
 rename target/i386/{ => hax}/hax-windows.c (99%)
 create mode 100644 target/i386/host-cpu.c
 rename target/i386/hvf/{hvf-cpus.c => hvf-accel-ops.c} (84%)
 create mode 100644 target/i386/hvf/hvf-cpu.c
 rename target/i386/{ => kvm}/hyperv-stub.c (100%)
 rename target/i386/{ => kvm}/hyperv.c (100%)
 create mode 100644 target/i386/kvm/kvm-cpu.c
 rename target/i386/{ => kvm}/kvm-stub.c (100%)
 rename target/i386/{ => kvm}/kvm.c (99%)
 rename target/i386/{ => tcg}/bpt_helper.c (99%)
 rename target/i386/{ => tcg}/cc_helper.c (99%)
 rename target/i386/{ => tcg}/excp_helper.c (99%)
 rename target/i386/{ => tcg}/fpu_helper.c (99%)
 rename target/i386/{ => tcg}/int_helper.c (99%)
 rename target/i386/{ => tcg}/mem_helper.c (99%)
 rename target/i386/{ => tcg}/misc_helper.c (99%)
 rename target/i386/{ => tcg}/mpx_helper.c (99%)
 rename target/i386/{ => tcg}/seg_helper.c (99%)
 rename target/i386/{ => tcg}/smm_helper.c (99%)
 rename target/i386/{ => tcg}/svm_helper.c (99%)
 create mode 100644 target/i386/tcg/tcg-cpu.c
 rename target/i386/{ => tcg}/tcg-stub.c (100%)
 rename target/i386/{ => tcg}/translate.c (99%)
 rename target/i386/{whpx-cpus.c => whpx/whpx-accel-ops.c} (72%)
 rename target/i386/{ => whpx}/whpx-all.c (99%)
 create mode 100644 target/i386/hax/meson.build
 create mode 100644 target/i386/kvm/meson.build
 create mode 100644 target/i386/kvm/trace-events
 create mode 100644 target/i386/tcg/meson.build
 create mode 100644 target/i386/whpx/meson.build

-- 
2.26.2


Re: [PATCH v10 00/32] i386 cleanup
Posted by Philippe Mathieu-Daudé 3 years, 4 months ago
Hi Claudio,

On 12/10/20 1:11 PM, Claudio Fontana wrote:
> Hello, this is version 10 of the cleanup, changed from RFC to PATCH.
> 
> v9 -> v10: minor tweaks and fixes
> 
> * in "i386: split cpu accelerators from cpu.c",
> 
> use kvm/kvm-cpu.c, hvf/hvf-cpu.c, tcg/tcg-cpu.c.
> Easier to understand compared to editing multiple cpu.c files,
> and matches the header files if needed (kvm-cpu.h).
> 
> * in "accel: replace struct CpusAccel with AccelOpsClass",
> 
> make it a bit more consistent, by naming the files defining
> the AccelOpsClass types "...-accel-ops.c" instead of the old
> naming "...-cpus.c".
> 
> * in "cpu: move cc->transaction_failed to tcg_ops",
> 
> protect with CONFIG_TCG the use of tcg_ops for hw/misc/jazz.c,
> 
>  #include "exec/memattrs.h" (Philippe, Eduardo)
> 
> * in "cpu: Move synchronize_from_tb() to tcg_ops",
> 
>  #include "hw/core/cpu.h" (Philippe, Eduardo)
> 
> do not remove the comment about struct TcgCpuOperations (Philippe)
> 
> * in "accel/tcg: split TCG-only code from cpu_exec_realizefn",
> 
> invert tcg_target_initialized set order (Alex)
> 
> * in "i386: move TCG cpu class initialization out of helper.c",
> 
> extract helper-tcg.h, tcg-cpu.c, and tcg-cpu.h directly into
> tcg/, avoiding the extra move later to tcg/ (Alex)
> 
...

> Claudio Fontana (23):
>   accel/tcg: split CpusAccel into three TCG variants
>   accel/tcg: split tcg_start_vcpu_thread
>   accel/tcg: rename tcg-cpus functions to match module name
>   i386: move kvm accel files into kvm/
>   i386: move whpx accel files into whpx/
>   i386: move hax accel files into hax/
>   i386: hvf: remove stale MAINTAINERS entry for old hvf stubs
>   i386: move TCG accel files into tcg/
>   i386: move cpu dump out of helper.c into cpu-dump.c
>   i386: move TCG cpu class initialization out of helper.c
>   target/riscv: remove CONFIG_TCG, as it is always TCG
>   accel/tcg: split TCG-only code from cpu_exec_realizefn
>   target/arm: do not use cc->do_interrupt for KVM directly
>   cpu: move cc->do_interrupt to tcg_ops
>   cpu: move cc->transaction_failed to tcg_ops
>   cpu: move do_unaligned_access to tcg_ops

To be honest this is a lot to digest... I'd split your
series in 2, the first part until here, almost ready;

And this second part, the accel refactor:

>   accel: extend AccelState and AccelClass to user-mode
>   accel: replace struct CpusAccel with AccelOpsClass
>   accel: introduce AccelCPUClass extending CPUClass
>   i386: split cpu accelerators from cpu.c, using AccelCPUClass
>   cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn
>   hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn
>   cpu: introduce cpu_accel_instance_init


Re: [PATCH v10 00/32] i386 cleanup
Posted by Claudio Fontana 3 years, 4 months ago
On 12/10/20 2:05 PM, Philippe Mathieu-Daudé wrote:
> Hi Claudio,
> 
> On 12/10/20 1:11 PM, Claudio Fontana wrote:
>> Hello, this is version 10 of the cleanup, changed from RFC to PATCH.
>>
>> v9 -> v10: minor tweaks and fixes
>>
>> * in "i386: split cpu accelerators from cpu.c",
>>
>> use kvm/kvm-cpu.c, hvf/hvf-cpu.c, tcg/tcg-cpu.c.
>> Easier to understand compared to editing multiple cpu.c files,
>> and matches the header files if needed (kvm-cpu.h).
>>
>> * in "accel: replace struct CpusAccel with AccelOpsClass",
>>
>> make it a bit more consistent, by naming the files defining
>> the AccelOpsClass types "...-accel-ops.c" instead of the old
>> naming "...-cpus.c".
>>
>> * in "cpu: move cc->transaction_failed to tcg_ops",
>>
>> protect with CONFIG_TCG the use of tcg_ops for hw/misc/jazz.c,
>>
>>  #include "exec/memattrs.h" (Philippe, Eduardo)
>>
>> * in "cpu: Move synchronize_from_tb() to tcg_ops",
>>
>>  #include "hw/core/cpu.h" (Philippe, Eduardo)
>>
>> do not remove the comment about struct TcgCpuOperations (Philippe)
>>
>> * in "accel/tcg: split TCG-only code from cpu_exec_realizefn",
>>
>> invert tcg_target_initialized set order (Alex)
>>
>> * in "i386: move TCG cpu class initialization out of helper.c",
>>
>> extract helper-tcg.h, tcg-cpu.c, and tcg-cpu.h directly into
>> tcg/, avoiding the extra move later to tcg/ (Alex)
>>
> ...
> 
>> Claudio Fontana (23):
>>   accel/tcg: split CpusAccel into three TCG variants
>>   accel/tcg: split tcg_start_vcpu_thread
>>   accel/tcg: rename tcg-cpus functions to match module name
>>   i386: move kvm accel files into kvm/
>>   i386: move whpx accel files into whpx/
>>   i386: move hax accel files into hax/
>>   i386: hvf: remove stale MAINTAINERS entry for old hvf stubs
>>   i386: move TCG accel files into tcg/
>>   i386: move cpu dump out of helper.c into cpu-dump.c
>>   i386: move TCG cpu class initialization out of helper.c
>>   target/riscv: remove CONFIG_TCG, as it is always TCG
>>   accel/tcg: split TCG-only code from cpu_exec_realizefn
>>   target/arm: do not use cc->do_interrupt for KVM directly
>>   cpu: move cc->do_interrupt to tcg_ops
>>   cpu: move cc->transaction_failed to tcg_ops
>>   cpu: move do_unaligned_access to tcg_ops
> 
> To be honest this is a lot to digest... I'd split your
> series in 2, the first part until here, almost ready;
> 
> And this second part, the accel refactor:
> 
>>   accel: extend AccelState and AccelClass to user-mode
>>   accel: replace struct CpusAccel with AccelOpsClass
>>   accel: introduce AccelCPUClass extending CPUClass
>>   i386: split cpu accelerators from cpu.c, using AccelCPUClass
>>   cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn
>>   hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn
>>   cpu: introduce cpu_accel_instance_init
> 

Ok, will do for the next spin

Ciao,

Claudio

Re: [PATCH v10 00/32] i386 cleanup
Posted by no-reply@patchew.org 3 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/20201210121226.19822-1-cfontana@suse.de/



Hi,

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

Type: series
Message-id: 20201210121226.19822-1-cfontana@suse.de
Subject: [PATCH v10 00/32] i386 cleanup

=== 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/20201210121226.19822-1-cfontana@suse.de -> patchew/20201210121226.19822-1-cfontana@suse.de
Switched to a new branch 'test'
1bcd971 cpu: introduce cpu_accel_instance_init
95e993b hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn
eb89e90 cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn
a2f3734 i386: split cpu accelerators from cpu.c, using AccelCPUClass
a40f023 accel: introduce AccelCPUClass extending CPUClass
d53721a accel: replace struct CpusAccel with AccelOpsClass
d2ae1b0 accel: extend AccelState and AccelClass to user-mode
ccc236f cpu: move do_unaligned_access to tcg_ops
acf874d cpu: move cc->transaction_failed to tcg_ops
47ef2ce cpu: move cc->do_interrupt to tcg_ops
6937842 target/arm: do not use cc->do_interrupt for KVM directly
b7c16fe cpu: Move debug_excp_handler to tcg_ops
2648f3c cpu: Move tlb_fill to tcg_ops
c0ecda2 cpu: Move cpu_exec_* to tcg_ops
c54ef21 cpu: Move synchronize_from_tb() to tcg_ops
9ba5153 accel/tcg: split TCG-only code from cpu_exec_realizefn
c981286 target/riscv: remove CONFIG_TCG, as it is always TCG
00e7acf cpu: Introduce TCGCpuOperations struct
9a97463 cpu: Remove unnecessary noop methods
6535aaa tcg: Make CPUClass.debug_excp_handler optional
6a0b105 tcg: make CPUClass.cpu_exec_* optional
b7c8ad4 tcg: cpu_exec_{enter,exit} helpers
30e1c48 i386: move TCG cpu class initialization out of helper.c
c1eaae4 i386: move cpu dump out of helper.c into cpu-dump.c
f740a09 i386: move TCG accel files into tcg/
88074e1 i386: hvf: remove stale MAINTAINERS entry for old hvf stubs
2289beb i386: move hax accel files into hax/
2a99707 i386: move whpx accel files into whpx/
c3dcbe4 i386: move kvm accel files into kvm/
4288994 accel/tcg: rename tcg-cpus functions to match module name
cd3c5fe accel/tcg: split tcg_start_vcpu_thread
0af862d accel/tcg: split CpusAccel into three TCG variants

=== OUTPUT BEGIN ===
1/32 Checking commit 0af862d5b32b (accel/tcg: split CpusAccel into three TCG variants)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#57: 
new file mode 100644

total: 0 errors, 1 warnings, 1156 lines checked

Patch 1/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/32 Checking commit cd3c5fe91905 (accel/tcg: split tcg_start_vcpu_thread)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#103: 
deleted file mode 100644

total: 0 errors, 1 warnings, 201 lines checked

Patch 2/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/32 Checking commit 4288994bd943 (accel/tcg: rename tcg-cpus functions to match module name)
4/32 Checking commit c3dcbe421f99 (i386: move kvm accel files into kvm/)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#168: 
rename from target/i386/hyperv-proto.h

total: 0 errors, 1 warnings, 150 lines checked

Patch 4/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/32 Checking commit 2a99707b0cf3 (i386: move whpx accel files into whpx/)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#51: 
new file mode 100644

total: 0 errors, 1 warnings, 32 lines checked

Patch 5/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/32 Checking commit 2289beb5ca9e (i386: move hax accel files into hax/)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#26: 
rename from target/i386/hax-all.c

total: 0 errors, 1 warnings, 47 lines checked

Patch 6/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
7/32 Checking commit 88074e1bc90a (i386: hvf: remove stale MAINTAINERS entry for old hvf stubs)
8/32 Checking commit f740a0915167 (i386: move TCG accel files into tcg/)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#45: 
rename from target/i386/bpt_helper.c

total: 0 errors, 1 warnings, 39 lines checked

Patch 8/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/32 Checking commit c1eaae4b18dc (i386: move cpu dump out of helper.c into cpu-dump.c)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#12: 
new file mode 100644

ERROR: braces {} are necessary for all arms of this statement
#129: FILE: target/i386/cpu-dump.c:113:
+    if (!(env->hflags & HF_PE_MASK) || !(sc->flags & DESC_P_MASK))
[...]

WARNING: Block comments use a leading /* on a separate line
#173: FILE: target/i386/cpu-dump.c:157:
+/* ARRAY_SIZE check is not required because

WARNING: Block comments use a leading /* on a separate line
#212: FILE: target/i386/cpu-dump.c:196:
+/* ARRAY_SIZE check is not required because

ERROR: line over 90 characters
#374: FILE: target/i386/cpu-dump.c:358:
+        qemu_fprintf(f, "RAX=%016" PRIx64 " RBX=%016" PRIx64 " RCX=%016" PRIx64 " RDX=%016" PRIx64 "\n"

ERROR: line over 90 characters
#375: FILE: target/i386/cpu-dump.c:359:
+                     "RSI=%016" PRIx64 " RDI=%016" PRIx64 " RBP=%016" PRIx64 " RSP=%016" PRIx64 "\n"

ERROR: line over 90 characters
#376: FILE: target/i386/cpu-dump.c:360:
+                     "R8 =%016" PRIx64 " R9 =%016" PRIx64 " R10=%016" PRIx64 " R11=%016" PRIx64 "\n"

ERROR: line over 90 characters
#377: FILE: target/i386/cpu-dump.c:361:
+                     "R12=%016" PRIx64 " R13=%016" PRIx64 " R14=%016" PRIx64 " R15=%016" PRIx64 "\n"

ERROR: line over 90 characters
#378: FILE: target/i386/cpu-dump.c:362:
+                     "RIP=%016" PRIx64 " RFL=%08x [%c%c%c%c%c%c%c] CPL=%d II=%d A20=%d SMM=%d HLT=%d\n",

ERROR: space required before the open parenthesis '('
#437: FILE: target/i386/cpu-dump.c:421:
+    for(i = 0; i < 6; i++) {

WARNING: line over 80 characters
#449: FILE: target/i386/cpu-dump.c:433:
+        qemu_fprintf(f, "CR0=%08x CR2=%016" PRIx64 " CR3=%016" PRIx64 " CR4=%08x\n",

ERROR: space required before the open parenthesis '('
#454: FILE: target/i386/cpu-dump.c:438:
+        for(i = 0; i < 4; i++)

ERROR: braces {} are necessary for all arms of this statement
#454: FILE: target/i386/cpu-dump.c:438:
+        for(i = 0; i < 4; i++)
[...]

ERROR: space required before the open parenthesis '('
#470: FILE: target/i386/cpu-dump.c:454:
+        for(i = 0; i < 4; i++) {

ERROR: braces {} are necessary for all arms of this statement
#477: FILE: target/i386/cpu-dump.c:461:
+        if ((unsigned)env->cc_op < CC_OP_NB)
[...]
+        else
[...]

WARNING: line over 80 characters
#478: FILE: target/i386/cpu-dump.c:462:
+            snprintf(cc_op_name, sizeof(cc_op_name), "%s", cc_op_str[env->cc_op]);

ERROR: space required before the open parenthesis '('
#498: FILE: target/i386/cpu-dump.c:482:
+        for(i = 0; i < 8; i++) {

ERROR: spaces required around that '=' (ctx:VxV)
#508: FILE: target/i386/cpu-dump.c:492:
+        for(i=0;i<8;i++) {
              ^

ERROR: space required after that ';' (ctx:VxV)
#508: FILE: target/i386/cpu-dump.c:492:
+        for(i=0;i<8;i++) {
                ^

ERROR: spaces required around that '<' (ctx:VxV)
#508: FILE: target/i386/cpu-dump.c:492:
+        for(i=0;i<8;i++) {
                  ^

ERROR: space required after that ';' (ctx:VxV)
#508: FILE: target/i386/cpu-dump.c:492:
+        for(i=0;i<8;i++) {
                    ^

ERROR: space required before the open parenthesis '('
#508: FILE: target/i386/cpu-dump.c:492:
+        for(i=0;i<8;i++) {

ERROR: braces {} are necessary for all arms of this statement
#513: FILE: target/i386/cpu-dump.c:497:
+            if ((i & 1) == 1)
[...]
+            else
[...]

ERROR: braces {} are necessary for all arms of this statement
#518: FILE: target/i386/cpu-dump.c:502:
+        if (env->hflags & HF_CS64_MASK)
[...]
+        else
[...]

ERROR: spaces required around that '=' (ctx:VxV)
#522: FILE: target/i386/cpu-dump.c:506:
+        for(i=0;i<nb;i++) {
              ^

ERROR: space required after that ';' (ctx:VxV)
#522: FILE: target/i386/cpu-dump.c:506:
+        for(i=0;i<nb;i++) {
                ^

ERROR: spaces required around that '<' (ctx:VxV)
#522: FILE: target/i386/cpu-dump.c:506:
+        for(i=0;i<nb;i++) {
                  ^

ERROR: space required after that ';' (ctx:VxV)
#522: FILE: target/i386/cpu-dump.c:506:
+        for(i=0;i<nb;i++) {
                     ^

ERROR: space required before the open parenthesis '('
#522: FILE: target/i386/cpu-dump.c:506:
+        for(i=0;i<nb;i++) {

ERROR: braces {} are necessary for all arms of this statement
#529: FILE: target/i386/cpu-dump.c:513:
+            if ((i & 1) == 1)
[...]
+            else
[...]

total: 25 errors, 5 warnings, 1077 lines checked

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

10/32 Checking commit 30e1c4878f0f (i386: move TCG cpu class initialization out of helper.c)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#412: 
new file mode 100644

total: 0 errors, 1 warnings, 608 lines checked

Patch 10/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/32 Checking commit b7c8ad4e5828 (tcg: cpu_exec_{enter,exit} helpers)
12/32 Checking commit 6a0b1053f6b2 (tcg: make CPUClass.cpu_exec_* optional)
13/32 Checking commit 6535aaab70c2 (tcg: Make CPUClass.debug_excp_handler optional)
14/32 Checking commit 9a97463bf2cc (cpu: Remove unnecessary noop methods)
15/32 Checking commit 00e7acfe8db6 (cpu: Introduce TCGCpuOperations struct)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#93: 
new file mode 100644

total: 0 errors, 1 warnings, 301 lines checked

Patch 15/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
16/32 Checking commit c9812860bc1c (target/riscv: remove CONFIG_TCG, as it is always TCG)
17/32 Checking commit 9ba515321a3c (accel/tcg: split TCG-only code from cpu_exec_realizefn)
18/32 Checking commit c54ef21375b3 (cpu: Move synchronize_from_tb() to tcg_ops)
19/32 Checking commit c0ecda22af8d (cpu: Move cpu_exec_* to tcg_ops)
20/32 Checking commit 2648f3c39867 (cpu: Move tlb_fill to tcg_ops)
WARNING: line over 80 characters
#23: FILE: accel/tcg/cputlb.c:1289:
+    ok = cc->tcg_ops.tlb_fill(cpu, addr, size, access_type, mmu_idx, false, retaddr);

total: 0 errors, 1 warnings, 259 lines checked

Patch 20/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
21/32 Checking commit b7c16fe8f339 (cpu: Move debug_excp_handler to tcg_ops)
22/32 Checking commit 6937842b12fd (target/arm: do not use cc->do_interrupt for KVM directly)
23/32 Checking commit 47ef2ce4ddf7 (cpu: move cc->do_interrupt to tcg_ops)
24/32 Checking commit acf874dd3fc0 (cpu: move cc->transaction_failed to tcg_ops)
WARNING: line over 80 characters
#87: FILE: include/hw/core/cpu.h:857:
+        cc->tcg_ops.do_transaction_failed(cpu, physaddr, addr, size, access_type,

total: 0 errors, 1 warnings, 168 lines checked

Patch 24/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
25/32 Checking commit ccc236fa232a (cpu: move do_unaligned_access to tcg_ops)
26/32 Checking commit d2ae1b01f812 (accel: extend AccelState and AccelClass to user-mode)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#25: 
new file mode 100644

total: 0 errors, 1 warnings, 359 lines checked

Patch 26/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
27/32 Checking commit d53721ae3d89 (accel: replace struct CpusAccel with AccelOpsClass)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#119: 
new file mode 100644

total: 0 errors, 1 warnings, 871 lines checked

Patch 27/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
28/32 Checking commit a40f023b29ec (accel: introduce AccelCPUClass extending CPUClass)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#99: 
new file mode 100644

total: 0 errors, 1 warnings, 123 lines checked

Patch 28/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
29/32 Checking commit a2f37349ca0b (i386: split cpu accelerators from cpu.c, using AccelCPUClass)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#664: 
new file mode 100644

WARNING: line over 80 characters
#1299: FILE: target/i386/tcg/tcg-cpu.c:104:
+    memory_region_add_subregion_overlap(cpu->cpu_as_root, 0, cpu->cpu_as_mem, 0);

total: 0 errors, 2 warnings, 1249 lines checked

Patch 29/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/32 Checking commit eb89e906358b (cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn)
31/32 Checking commit 95e993b2b19f (hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn)
32/32 Checking commit 1bcd9713e4e9 (cpu: introduce cpu_accel_instance_init)
=== OUTPUT END ===

Test command exited with code: 1


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