All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-3.2 v3 00/14] Generalize machine compatibility properties
@ 2018-11-07 12:36 ` Marc-André Lureau
  0 siblings, 0 replies; 67+ messages in thread
From: Marc-André Lureau @ 2018-11-07 12:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, dgilbert, Richard Henderson, Andreas Färber,
	Igor Mammedov, qemu-arm, xen-devel, Artyom Tarasenko,
	Anthony Perard, Mark Cave-Ayland, Eduardo Habkost, Amit Shah,
	Stefan Berger, Marcel Apfelbaum, Stefano Stabellini,
	Michael S. Tsirkin, qemu-ppc, Peter Maydell, Corey Minyard,
	Hervé Poussineau, Marc-André Lureau

Hi,

During "[PATCH v2 05/10] qom/globals: generalize
object_property_set_globals()" review, Eduardo suggested to rework the
GlobalProperty handling, so that -global is limited to QDev only and
we avoid mixing the machine compats and the user-provided -global
properties (instead of generalizing -global to various object kinds,
like I proposed in v2).

"qdev: do not mix compat props with global props" patch decouples a
bit user-provided -global from machine compat properties. This allows
to get rid of "user_provided" and "errp" fields in following patches.

Instead of explcitely calling object_apply_global_props() in the
various object post_init, I opted for creating a new TYPE_COMPAT_PROPS
interface. The interface approach gives a lot more flexibility on
which objects can have compat props. This requires some interface
improvments in "qom: teach interfaces to implement post-init".

A new compat property "x-use-canonical-path-for-ramblock-id" is added
to hostmem for legacy canonical path names, set to true for -file and
-memfd with qemu < 3.2.

(this series was initially titled "[PATCH v2 00/10] hostmem: use
object "id" for memory region name with >= 3.1", but its focus is more
in refactoring the global and compatilibity properties handling now)

v3:
- GlobalProperties improvements/cleanups
- drop generalizing the -global idea
- "replace" the set_globals flag with a TYPE_COMPAT_PROPS interface
- update hw/i386 machine version to 3.2
- add "qom: make interface types abstract" interface cleanup

v2:
- replace "qom/user-creatable: add a few helper macros" patch for a
  more optimized "qom: make user_creatable_complete() specific to
  UserCreatable"
- rename register_global_list() to register_global_properties()
- call object_property_set_globals() after post-init
- add and use a ObjectClass.set_globals flag, instead of dynamically
  check object class in object_property_set_globals()
- use object "id" in >= 3.1 instead of canonical path, add compat
  property "x-use-canonical-path-for-ramblock-id" in base hostmem
  class.

Marc-André Lureau (14):
  tests: qdev_prop_check_globals() doesn't return "all_used"
  qom: make interface types abstract
  qom: make user_creatable_complete() specific to UserCreatable
  accel: register global_props like machine globals
  qdev: move qdev_prop_register_global_list() to tests
  qdev: do not mix compat props with global props
  qdev: all globals are now user-provided
  qdev-props: convert global_props to GArray
  qdev-props: remove errp from GlobalProperty
  qdev-props: call object_apply_global_props()
  qom: teach interfaces to implement post-init
  machine: add compat-props interface
  hw/i386: add pc-i440fx-3.2 & pc-q35-3.2
  hostmem: use object id for memory region name with >= 3.1

 include/hw/acpi/acpi_dev_interface.h |  6 +--
 include/hw/arm/linux-boot-if.h       |  5 +-
 include/hw/boards.h                  |  3 +-
 include/hw/compat.h                  | 11 ++++
 include/hw/fw-path-provider.h        |  4 +-
 include/hw/hotplug.h                 |  6 +--
 include/hw/i386/pc.h                 |  3 ++
 include/hw/intc/intc.h               |  4 +-
 include/hw/ipmi/ipmi.h               |  4 +-
 include/hw/isa/isa.h                 |  4 --
 include/hw/mem/memory-device.h       |  4 +-
 include/hw/nmi.h                     |  4 +-
 include/hw/qdev-core.h               |  9 ----
 include/hw/qdev-properties.h         | 30 -----------
 include/hw/stream.h                  |  4 +-
 include/hw/timer/m48t59.h            |  4 +-
 include/qom/object.h                 |  2 +
 include/qom/object_interfaces.h      | 10 ++--
 include/sysemu/accel.h               |  4 +-
 include/sysemu/hostmem.h             |  3 +-
 include/sysemu/tpm.h                 |  4 +-
 target/arm/idau.h                    |  4 +-
 accel/accel.c                        |  7 +--
 backends/hostmem-file.c              |  8 +--
 backends/hostmem-memfd.c             |  2 +-
 backends/hostmem-ram.c               |  9 ++--
 backends/hostmem.c                   | 31 +++++++++++
 hw/core/compat-props.c               | 43 +++++++++++++++
 hw/core/machine.c                    | 18 -------
 hw/core/qdev-properties.c            | 73 ++++++-------------------
 hw/core/qdev.c                       |  4 ++
 hw/i386/pc_piix.c                    | 21 ++++++--
 hw/i386/pc_q35.c                     | 19 ++++++-
 hw/misc/ivshmem.c                    |  2 +-
 hw/virtio/virtio-rng.c               |  2 +-
 hw/xen/xen-common.c                  |  9 +++-
 qom/cpu.c                            |  1 -
 qom/object.c                         | 49 +++++++++++++++--
 qom/object_interfaces.c              | 14 ++---
 stubs/machine.c                      |  4 ++
 target/i386/cpu.c                    |  1 -
 target/sparc/cpu.c                   |  1 -
 tests/check-qom-interface.c          | 27 ++++++++--
 tests/test-qdev-global-props.c       | 80 ++++++++--------------------
 vl.c                                 |  4 --
 MAINTAINERS                          |  1 +
 hw/core/Makefile.objs                |  1 +
 stubs/Makefile.objs                  |  1 +
 tests/Makefile.include               |  1 +
 49 files changed, 283 insertions(+), 282 deletions(-)
 create mode 100644 hw/core/compat-props.c
 create mode 100644 stubs/machine.c

-- 
2.19.1.708.g4ede3d42df

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

end of thread, other threads:[~2018-11-27 14:12 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 12:36 [Qemu-devel] [PATCH for-3.2 v3 00/14] Generalize machine compatibility properties Marc-André Lureau
2018-11-07 12:36 ` Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 01/14] tests: qdev_prop_check_globals() doesn't return "all_used" Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-20 15:33   ` [Qemu-devel] " Igor Mammedov
2018-11-20 15:33     ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 02/14] qom: make interface types abstract Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-20 16:33   ` [Qemu-devel] " Igor Mammedov
2018-11-20 16:33     ` Igor Mammedov
2018-11-20 17:42     ` Eduardo Habkost
2018-11-20 17:42       ` Eduardo Habkost
2018-11-20 18:54     ` Laszlo Ersek
2018-11-20 18:54       ` Laszlo Ersek
2018-11-21  9:10       ` Igor Mammedov
2018-11-21  9:10         ` Igor Mammedov
2018-11-23 14:03   ` Igor Mammedov
2018-11-23 14:03     ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 03/14] qom: make user_creatable_complete() specific to UserCreatable Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-20 16:39   ` [Qemu-devel] " Igor Mammedov
2018-11-20 16:39     ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 04/14] accel: register global_props like machine globals Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 05/14] qdev: move qdev_prop_register_global_list() to tests Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-11 23:46   ` [Qemu-devel] " Philippe Mathieu-Daudé
2018-11-11 23:46     ` Philippe Mathieu-Daudé
2018-11-20 16:40   ` Igor Mammedov
2018-11-20 16:40     ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 06/14] qdev: do not mix compat props with global props Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-23 14:02   ` [Qemu-devel] " Igor Mammedov
2018-11-23 14:02     ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 07/14] qdev: all globals are now user-provided Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-23 14:20   ` [Qemu-devel] " Igor Mammedov
2018-11-23 14:20     ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 08/14] qdev-props: convert global_props to GArray Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-23 14:26   ` [Qemu-devel] " Igor Mammedov
2018-11-23 14:26     ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 09/14] qdev-props: remove errp from GlobalProperty Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 10/14] qdev-props: call object_apply_global_props() Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-26 13:20   ` [Qemu-devel] " Igor Mammedov
2018-11-26 13:20     ` Igor Mammedov
2018-11-26 20:02     ` [Qemu-devel] " Marc-André Lureau
2018-11-26 20:02       ` Marc-André Lureau
2018-11-27 14:12       ` Igor Mammedov
2018-11-27 14:12         ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 11/14] qom: teach interfaces to implement post-init Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-26 13:46   ` [Qemu-devel] " Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 12/14] machine: add compat-props interface Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 13/14] hw/i386: add pc-i440fx-3.2 & pc-q35-3.2 Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-07 15:49   ` [Qemu-devel] " Marc-André Lureau
2018-11-07 19:01     ` Eduardo Habkost
2018-11-07 19:01       ` Eduardo Habkost
2018-11-07 15:49   ` Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 14/14] hostmem: use object id for memory region name with >= 3.1 Marc-André Lureau
2018-11-07 12:36   ` Marc-André Lureau
2018-11-26 13:55 ` [Qemu-devel] [PATCH for-3.2 v3 00/14] Generalize machine compatibility properties Igor Mammedov
2018-11-26 13:55   ` 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.