All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.11 00/27] complete cpu QOMification and remove cpu_FOO_init() helpers
@ 2017-08-18 10:08 Igor Mammedov
  2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 01/27] sparc: convert cpu models to SPARC cpu subclasses Igor Mammedov
                   ` (26 more replies)
  0 siblings, 27 replies; 56+ messages in thread
From: Igor Mammedov @ 2017-08-18 10:08 UTC (permalink / raw)
  To: qemu-devel


ChangeLog:
  * rebase on top of rc3 
  * drop MIPS CPU QOMifying patches as it's superseeded
    by another series: "[PATCH 0/8] QOMify MIPS cpu"
    https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg03041.html
  * new patch to hide plus/minus features handling inside of feature parsing:
     "target-i386: cpu: convert plus/minus properties to global properties"
  * SPARC: make base CPU class abstract

While looking at ways to to get rid of ad-hoc cpu_model
parsing in every machine/*-user and unifying -cpu option
parsing, making it generic, I've noticed that most of
the targets have cpu_FOO_init() helper that does nothing
except of calling cpu_generic_init() and a few that do
additional ad-hoc cpu initialization outside of QOM model.

The most of the later could be easily fixed and
the 2 remaining mips/sparc targets are missing proper
conversion of cpu models to cpu subclasses and/or
cpu features to properties, with that fixed it's
possible get rid of custom cpu_FOO_init() helpers and
reuse cpu_generic_init() instead (which reduces code
size quite a bit).

That's what this series (1st part of cpu_model unification) does.
Patches:
 * 1-8: complete QOMifying SPARC cpu including features into properties
        conversion and cpu models into classes so it could use
        cpu_generic_init() to create cpus.

above patches care only about completing CPU QOMinfication and
might be not pretty or clean as they could be,
but leave cleanups and follow up code simplification is way out of scope 
and (might|should) be done on top by respective maintainers or someone
who cares about it.

 * the rest of the patches are just replacing custom cpu_FOO_init()
   with cpu_generic_init() and sometimes dealing with target 
   specific oddities in handling cpu name to typename conversion

git tree for testing/viewing:
https://github.com/imammedo/qemu.git cpu_init_def_target_cpu_V2
https://github.com/imammedo/qemu/commits/cpu_init_def_target_cpu_V2

Ref to v1:
https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg04414.html

PS:

SPARC are the only targets that received 'heavy' refactoring
so I've treated them with more manual testing the rest of series if
slightly tested /make check for softmmu targets and running busybox for
the most of *-linux targets /, and not regressions were noticed.

And now about follow up series, as end result of unificathion,
I'm looking for:

   - replacing many ad-hoc ways of specifying default cpu with
     a one generic way
   - cpu_model parsing done with common cpu_model_helper that
     will be called from 3 places: generic machine code and [linux|bsd]-user
   - cpu_model_helper returning cpu type name that
     the rest of the code will deal with
   - get rid of cpu_init() and leave only cpu_generic_init() throughout the tree
   - make cpu_model_helper usable at pre machine_init() time
     so that commands like hotplugable-cpus could be used
     in with HMP/QMP preconfiguration interface I'm working on.
     (it's the real reason why I'm doing all of of this)


Igor Mammedov (27):
  sparc: convert cpu models to SPARC cpu subclasses
  sparc: embed sparc_def_t into CPUSPARCState
  sparc: convert cpu features to qdev properties
  sparc: move adhoc CPUSPARCState initialization to realize time
  target-i386: cpu: convert plus/minus properties to global properties
  x86: extract legacy cpu features format parser
  sparc: replace custom cpu feature parsing with
    cpu_legacy_parse_featurestr()
  sparc: replace cpu_sparc_init() with cpu_generic_init()
  s390x: replace cpu_s390x_init() with cpu_generic_init()
  alpha: replace cpu_alpha_init() with cpu_generic_init()
  hppa: replace cpu_hppa_init() with cpu_generic_init()
  m68k: replace cpu_m68k_init() with cpu_generic_init()
  microblaze: replace cpu_mb_init() with cpu_generic_init()
  nios2: replace cpu_nios2_init() with cpu_generic_init()
  tilegx: replace cpu_tilegx_init() with cpu_generic_init()
  xtensa: replace cpu_xtensa_init() with cpu_generic_init()
  tricore: replace cpu_tricore_init() with cpu_generic_init()
  sh4: replace cpu_sh4_init() with cpu_generic_init()
  arm: replace cpu_arm_init() with cpu_generic_init()
  cris: replace cpu_cris_init() with cpu_generic_init()
  x86: replace cpu_x86_init() with cpu_generic_init()
  lm32: replace cpu_lm32_init() with cpu_generic_init()
  moxie: replace cpu_moxie_init() with cpu_generic_init()
  openrisc: replace cpu_openrisc_init() with cpu_generic_init()
  unicore32: replace uc32_cpu_init() with cpu_generic_init()
  ppc: replace cpu_ppc_init() with cpu_generic_init()
  fix build failure in nbd_read_reply_entry()

 include/qom/cpu.h                          |   2 +
 linux-user/sparc/target_syscall.h          |   2 +-
 target/alpha/cpu.h                         |   4 +-
 target/arm/cpu.h                           |   3 +-
 target/cris/cpu.h                          |   3 +-
 target/hppa/cpu.h                          |   4 +-
 target/i386/cpu.h                          |   3 +-
 target/lm32/cpu.h                          |   3 +-
 target/m68k/cpu.h                          |   3 +-
 target/microblaze/cpu.h                    |   3 +-
 target/moxie/cpu.h                         |   3 +-
 target/nios2/cpu.h                         |   3 +-
 target/openrisc/cpu.h                      |   4 +-
 target/ppc/cpu.h                           |   3 +-
 target/s390x/cpu.h                         |   3 +-
 target/sh4/cpu.h                           |   3 +-
 target/sparc/cpu-qom.h                     |   2 +
 target/sparc/cpu.h                         |  11 +-
 target/tilegx/cpu.h                        |   4 +-
 target/tricore/cpu.h                       |   4 +-
 target/unicore32/cpu.h                     |   4 +-
 target/xtensa/cpu.h                        |   4 +-
 block/nbd-client.c                         |   2 +-
 default-configs/i386-bsd-user.mak          |   1 +
 default-configs/i386-linux-user.mak        |   1 +
 default-configs/i386-softmmu.mak           |   1 +
 default-configs/sparc-bsd-user.mak         |   1 +
 default-configs/sparc-linux-user.mak       |   1 +
 default-configs/sparc-softmmu.mak          |   1 +
 default-configs/sparc32plus-linux-user.mak |   1 +
 default-configs/sparc64-bsd-user.mak       |   1 +
 default-configs/sparc64-linux-user.mak     |   1 +
 default-configs/sparc64-softmmu.mak        |   1 +
 default-configs/x86_64-bsd-user.mak        |   1 +
 default-configs/x86_64-linux-user.mak      |   1 +
 default-configs/x86_64-softmmu.mak         |   1 +
 hw/alpha/dp264.c                           |   8 +-
 hw/arm/musicpal.c                          |   2 +-
 hw/arm/omap1.c                             |   2 +-
 hw/arm/omap2.c                             |   2 +-
 hw/arm/pxa2xx.c                            |   4 +-
 hw/arm/strongarm.c                         |   2 +-
 hw/cris/axis_dev88.c                       |   2 +-
 hw/lm32/lm32_boards.c                      |   4 +-
 hw/lm32/milkymist.c                        |   2 +-
 hw/m68k/an5206.c                           |   2 +-
 hw/m68k/mcf5208.c                          |   2 +-
 hw/moxie/moxiesim.c                        |   2 +-
 hw/nios2/10m50_devboard.c                  |   2 +-
 hw/openrisc/openrisc_sim.c                 |   2 +-
 hw/ppc/e500.c                              |   3 +-
 hw/ppc/mac_newworld.c                      |   3 +-
 hw/ppc/mac_oldworld.c                      |   3 +-
 hw/ppc/ppc440_bamboo.c                     |   2 +-
 hw/ppc/ppc4xx_devs.c                       |   2 +-
 hw/ppc/prep.c                              |   5 +-
 hw/ppc/virtex_ml507.c                      |   2 +-
 hw/sh4/r2d.c                               |   2 +-
 hw/sh4/shix.c                              |   2 +-
 hw/sparc/leon3.c                           |   2 +-
 hw/sparc/sun4m.c                           |   2 +-
 hw/sparc64/sparc64.c                       |   2 +-
 hw/tricore/tricore_testboard.c             |   2 +-
 hw/unicore32/puv3.c                        |   2 +-
 hw/xtensa/sim.c                            |   2 +-
 hw/xtensa/xtfpga.c                         |   2 +-
 target/alpha/cpu.c                         |  20 +-
 target/arm/helper.c                        |   5 -
 target/cris/cpu.c                          |   5 -
 target/hppa/cpu.c                          |  11 +-
 target/i386/cpu.c                          | 170 +--------------
 target/lm32/helper.c                       |   5 -
 target/m68k/cpu.c                          |   2 +
 target/m68k/helper.c                       |  20 --
 target/microblaze/cpu.c                    |   6 +
 target/microblaze/translate.c              |  11 -
 target/moxie/cpu.c                         |   5 -
 target/nios2/cpu.c                         |   9 +-
 target/openrisc/cpu.c                      |   5 -
 target/ppc/translate_init.c                |   5 -
 target/s390x/cpu.c                         |   7 +
 target/s390x/helper.c                      |  14 --
 target/sh4/cpu.c                           |   5 -
 target/sparc/cpu.c                         | 329 +++++++++++++----------------
 target/sparc/int32_helper.c                |   2 +-
 target/sparc/int64_helper.c                |   2 +-
 target/sparc/ldst_helper.c                 |  14 +-
 target/sparc/mmu_helper.c                  |   2 +-
 target/sparc/translate.c                   |   2 +-
 target/sparc/win_helper.c                  |   4 +-
 target/tilegx/cpu.c                        |  11 +-
 target/tricore/helper.c                    |   5 -
 target/unicore32/helper.c                  |   5 -
 target/xtensa/cpu.c                        |   3 +
 target/xtensa/helper.c                     |  22 --
 util/Makefile.objs                         |   1 +
 util/legacy_cpu_features_parser.c          | 161 ++++++++++++++
 97 files changed, 443 insertions(+), 594 deletions(-)
 create mode 100644 util/legacy_cpu_features_parser.c

-- 
2.7.4

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

end of thread, other threads:[~2017-08-24 13:45 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-18 10:08 [Qemu-devel] [PATCH for-2.11 00/27] complete cpu QOMification and remove cpu_FOO_init() helpers Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 01/27] sparc: convert cpu models to SPARC cpu subclasses Igor Mammedov
2017-08-18 19:00   ` Philippe Mathieu-Daudé
2017-08-21 10:55     ` Igor Mammedov
2017-08-23  1:12       ` Philippe Mathieu-Daudé
2017-08-24  2:40         ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 02/27] sparc: embed sparc_def_t into CPUSPARCState Igor Mammedov
2017-08-24  2:45   ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 03/27] sparc: convert cpu features to qdev properties Igor Mammedov
2017-08-18 18:24   ` Eduardo Habkost
2017-08-21 11:03     ` Igor Mammedov
2017-08-23 13:07       ` Eduardo Habkost
2017-08-23 14:17         ` Igor Mammedov
2017-08-24 13:32   ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 04/27] sparc: move adhoc CPUSPARCState initialization to realize time Igor Mammedov
2017-08-24  2:47   ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 05/27] target-i386: cpu: convert plus/minus properties to global properties Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 06/27] x86: extract legacy cpu features format parser Igor Mammedov
2017-08-18 18:08   ` Eduardo Habkost
2017-08-21 11:06     ` Igor Mammedov
2017-08-23 14:34   ` Eduardo Habkost
2017-08-23 16:29     ` Igor Mammedov
2017-08-23 16:46       ` Eduardo Habkost
2017-08-23 17:37         ` Igor Mammedov
2017-08-23 17:58           ` Eduardo Habkost
2017-08-24  9:18             ` Igor Mammedov
2017-08-24 13:43               ` Igor Mammedov
2017-08-24 13:45               ` Eduardo Habkost
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 07/27] sparc: replace custom cpu feature parsing with cpu_legacy_parse_featurestr() Igor Mammedov
2017-08-24 13:27   ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 08/27] sparc: replace cpu_sparc_init() with cpu_generic_init() Igor Mammedov
2017-08-18 19:57   ` Philippe Mathieu-Daudé
2017-08-21 11:11     ` Igor Mammedov
2017-08-24  2:51       ` Philippe Mathieu-Daudé
2017-08-24  2:49   ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 09/27] s390x: replace cpu_s390x_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 10/27] alpha: replace cpu_alpha_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 11/27] hppa: replace cpu_hppa_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 12/27] m68k: replace cpu_m68k_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 13/27] microblaze: replace cpu_mb_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 14/27] nios2: replace cpu_nios2_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 15/27] tilegx: replace cpu_tilegx_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 16/27] xtensa: replace cpu_xtensa_init() " Igor Mammedov
2017-08-24 13:21   ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 17/27] tricore: replace cpu_tricore_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 18/27] sh4: replace cpu_sh4_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 19/27] arm: replace cpu_arm_init() " Igor Mammedov
2017-08-24 13:26   ` Philippe Mathieu-Daudé
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 20/27] cris: replace cpu_cris_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 21/27] x86: replace cpu_x86_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 22/27] lm32: replace cpu_lm32_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 23/27] moxie: replace cpu_moxie_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 24/27] openrisc: replace cpu_openrisc_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 25/27] unicore32: replace uc32_cpu_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 26/27] ppc: replace cpu_ppc_init() " Igor Mammedov
2017-08-18 10:08 ` [Qemu-devel] [PATCH for-2.11 27/27] fix build failure in nbd_read_reply_entry() Igor Mammedov

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.