All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v3 0/9] i386 cleanup
@ 2020-11-18 10:29 Claudio Fontana
  2020-11-18 10:29 ` [RFC v3 1/9] i386: move kvm accel files into kvm/ Claudio Fontana
                   ` (9 more replies)
  0 siblings, 10 replies; 41+ messages in thread
From: Claudio Fontana @ 2020-11-18 10:29 UTC (permalink / raw)
  To: Paolo Bonzini, Thomas Huth, Richard Henderson,
	Stefano Stabellini, Wenchao Wang, Roman Bolshakov,
	Sunil Muthuswamy, Philippe Mathieu-Daudé
  Cc: Laurent Vivier, Eduardo Habkost, Paul Durrant, Jason Wang,
	Marcelo Tosatti, qemu-devel, Peter Xu, Dario Faggioli,
	Cameron Esfahani, haxm-team, Claudio Fontana, Anthony Perard,
	Bruce Rogers, Olaf Hering, Colin Xu

Hi all, in this cleanup series we are back at RFC,
and back at providing the whole series together.

The last patch in particular contains a different way to provide
the accelerator-specific i386 CPU functionality,
compared with RFCv1.

In this series I start by moving all i386-specific accelerators
into subdirs of target/i386/ away from the main target directory.

Btw do we have any minimal testing coverage for HAX? Also Xen?

After the code move I go on and strip away all the cpu dump code
out of helper.c into a new file.
There is a large amount of checkpatch warnings
and errors, but this is due to the copy paste of the old code.

After that I take out tcg-specific stuff from cpu.h and from
helper.c and put it in helper-tcg.h and in a new temporary
tcg-cpu module.

After this I considered and implemented a few options.

Like in RFCv1, I introduced a new MODULE_INIT phase,

MODULE_INIT_ACCEL_CPU

that will trigger the registration of the cpu accel-specific
functionality.

Differently than in RFCv1, the class hierarchy of TYPE_X86_CPUs
has been left untouched, and the registration of cpu models
has again been left untouched,

instead describing the specialized functionality in a struct.

The existing "accel" class hierarchy, which is basically used
to contain machine accelerator-specific initializations,
has also been left untouched, as it cannot be used in user mode.

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 (9):
  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
  module: introduce MODULE_INIT_ACCEL_CPU
  i386: split cpu accelerators from cpu.c

 MAINTAINERS                           |  12 +-
 accel/kvm/kvm-all.c                   |  11 +-
 accel/qtest/qtest.c                   |  10 +-
 accel/tcg/tcg-all.c                   |  11 +-
 accel/xen/xen-all.c                   |  12 +-
 bsd-user/main.c                       |   1 +
 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 +-
 include/qemu/module.h                 |   2 +
 linux-user/main.c                     |   1 +
 meson.build                           |   1 +
 softmmu/vl.c                          |   6 +
 target/i386/cpu-dump.c                | 538 +++++++++++++++++++++++++
 target/i386/cpu-qom.h                 |  23 ++
 target/i386/cpu.c                     | 420 +++-----------------
 target/i386/cpu.h                     | 120 +-----
 target/i386/{ => hax}/hax-all.c       |  12 +-
 target/i386/{ => hax}/hax-cpus.c      |   0
 target/i386/{ => hax}/hax-cpus.h      |   0
 target/i386/{ => hax}/hax-i386.h      |   6 +-
 target/i386/{ => hax}/hax-interface.h |   0
 target/i386/{ => hax}/hax-mem.c       |   0
 target/i386/{ => hax}/hax-posix.c     |   0
 target/i386/{ => hax}/hax-posix.h     |   0
 target/i386/{ => hax}/hax-windows.c   |   0
 target/i386/{ => hax}/hax-windows.h   |   0
 target/i386/hax/meson.build           |   7 +
 target/i386/helper-tcg.h              | 112 ++++++
 target/i386/helper.c                  | 539 +-------------------------
 target/i386/host-cpu.c                | 196 ++++++++++
 target/i386/host-cpu.h                |  20 +
 target/i386/hvf/cpu.c                 |  64 +++
 target/i386/hvf/hvf.c                 |  10 +-
 target/i386/hvf/meson.build           |   1 +
 target/i386/kvm/cpu.c                 | 145 +++++++
 target/i386/{ => kvm}/hyperv-proto.h  |   0
 target/i386/{ => kvm}/hyperv-stub.c   |   0
 target/i386/{ => kvm}/hyperv.c        |   0
 target/i386/{ => kvm}/hyperv.h        |   0
 target/i386/kvm/kvm-cpu.h             |  41 ++
 target/i386/{ => kvm}/kvm-stub.c      |   0
 target/i386/{ => kvm}/kvm.c           |   3 +-
 target/i386/{ => kvm}/kvm_i386.h      |   0
 target/i386/kvm/meson.build           |   8 +
 target/i386/kvm/trace-events          |   7 +
 target/i386/kvm/trace.h               |   1 +
 target/i386/machine.c                 |   4 +-
 target/i386/meson.build               |  39 +-
 target/i386/{ => tcg}/bpt_helper.c    |   1 +
 target/i386/{ => tcg}/cc_helper.c     |   1 +
 target/i386/tcg/cpu.c                 | 168 ++++++++
 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/meson.build           |  14 +
 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-stub.c      |   0
 target/i386/{ => tcg}/translate.c     |   1 +
 target/i386/trace-events              |   6 -
 target/i386/whpx/meson.build          |   4 +
 target/i386/{ => whpx}/whp-dispatch.h |   0
 target/i386/{ => whpx}/whpx-all.c     |  11 +-
 target/i386/{ => whpx}/whpx-cpus.c    |   0
 target/i386/{ => whpx}/whpx-cpus.h    |   0
 75 files changed, 1555 insertions(+), 1091 deletions(-)
 create mode 100644 target/i386/cpu-dump.c
 rename target/i386/{ => hax}/hax-all.c (99%)
 rename target/i386/{ => hax}/hax-cpus.c (100%)
 rename target/i386/{ => hax}/hax-cpus.h (100%)
 rename target/i386/{ => hax}/hax-i386.h (95%)
 rename target/i386/{ => hax}/hax-interface.h (100%)
 rename target/i386/{ => hax}/hax-mem.c (100%)
 rename target/i386/{ => hax}/hax-posix.c (100%)
 rename target/i386/{ => hax}/hax-posix.h (100%)
 rename target/i386/{ => hax}/hax-windows.c (100%)
 rename target/i386/{ => hax}/hax-windows.h (100%)
 create mode 100644 target/i386/hax/meson.build
 create mode 100644 target/i386/helper-tcg.h
 create mode 100644 target/i386/host-cpu.c
 create mode 100644 target/i386/host-cpu.h
 create mode 100644 target/i386/hvf/cpu.c
 create mode 100644 target/i386/kvm/cpu.c
 rename target/i386/{ => kvm}/hyperv-proto.h (100%)
 rename target/i386/{ => kvm}/hyperv-stub.c (100%)
 rename target/i386/{ => kvm}/hyperv.c (100%)
 rename target/i386/{ => kvm}/hyperv.h (100%)
 create mode 100644 target/i386/kvm/kvm-cpu.h
 rename target/i386/{ => kvm}/kvm-stub.c (100%)
 rename target/i386/{ => kvm}/kvm.c (99%)
 rename target/i386/{ => kvm}/kvm_i386.h (100%)
 create mode 100644 target/i386/kvm/meson.build
 create mode 100644 target/i386/kvm/trace-events
 create mode 100644 target/i386/kvm/trace.h
 rename target/i386/{ => tcg}/bpt_helper.c (99%)
 rename target/i386/{ => tcg}/cc_helper.c (99%)
 create mode 100644 target/i386/tcg/cpu.c
 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%)
 create mode 100644 target/i386/tcg/meson.build
 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%)
 rename target/i386/{ => tcg}/tcg-stub.c (100%)
 rename target/i386/{ => tcg}/translate.c (99%)
 create mode 100644 target/i386/whpx/meson.build
 rename target/i386/{ => whpx}/whp-dispatch.h (100%)
 rename target/i386/{ => whpx}/whpx-all.c (99%)
 rename target/i386/{ => whpx}/whpx-cpus.c (100%)
 rename target/i386/{ => whpx}/whpx-cpus.h (100%)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2020-11-23 18:36 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 10:29 [RFC v3 0/9] i386 cleanup Claudio Fontana
2020-11-18 10:29 ` [RFC v3 1/9] i386: move kvm accel files into kvm/ Claudio Fontana
2020-11-18 10:29 ` [RFC v3 2/9] i386: move whpx accel files into whpx/ Claudio Fontana
2020-11-18 10:29 ` [RFC v3 3/9] i386: move hax accel files into hax/ Claudio Fontana
2020-11-18 10:29 ` [RFC v3 4/9] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs Claudio Fontana
2020-11-18 16:09   ` Roman Bolshakov
2020-11-18 10:29 ` [RFC v3 5/9] i386: move TCG accel files into tcg/ Claudio Fontana
2020-11-18 10:29 ` [RFC v3 6/9] i386: move cpu dump out of helper.c into cpu-dump.c Claudio Fontana
2020-11-18 10:29 ` [RFC v3 7/9] i386: move TCG cpu class initialization out of helper.c Claudio Fontana
2020-11-18 10:29 ` [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU Claudio Fontana
2020-11-18 12:38   ` Claudio Fontana
2020-11-18 12:48   ` Eduardo Habkost
2020-11-18 13:48     ` Claudio Fontana
2020-11-18 14:05       ` Paolo Bonzini
2020-11-18 14:36         ` Eduardo Habkost
2020-11-18 14:51           ` Paolo Bonzini
2020-11-18 15:25             ` Eduardo Habkost
2020-11-18 15:43               ` Paolo Bonzini
2020-11-18 16:11                 ` Eduardo Habkost
2020-11-18 16:22                   ` Paolo Bonzini
2020-11-18 17:30                     ` Eduardo Habkost
2020-11-18 19:13                       ` Paolo Bonzini
2020-11-18 22:07                         ` Eduardo Habkost
2020-11-20 12:13                           ` Claudio Fontana
2020-11-20 17:19                             ` Eduardo Habkost
2020-11-20 17:41                               ` Claudio Fontana
2020-11-20 18:09                                 ` Eduardo Habkost
2020-11-23  9:29                                   ` Claudio Fontana
2020-11-23  9:55                                     ` Claudio Fontana
2020-11-23 13:18                                       ` Paolo Bonzini
2020-11-23 15:02                                         ` Claudio Fontana
2020-11-23 15:14                                           ` Paolo Bonzini
2020-11-23 18:20                                           ` Eduardo Habkost
2020-11-18 10:29 ` [RFC v3 9/9] i386: split cpu accelerators from cpu.c Claudio Fontana
2020-11-18 18:28   ` Eduardo Habkost
2020-11-19  8:53     ` Claudio Fontana
2020-11-19 19:23       ` Eduardo Habkost
2020-11-20  9:08         ` Claudio Fontana
2020-11-23 18:24           ` Eduardo Habkost
2020-11-23 18:34             ` Claudio Fontana
2020-11-18 11:00 ` [RFC v3 0/9] i386 cleanup no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.