public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [PATCH v2 00/21] qom: introduce property flags to track external user input
@ 2026-02-10  3:23 Zhao Liu
  2026-02-10  3:23 ` [PATCH v2 01/21] qom/object: use BIT macro for ObjectPropertyFlags Zhao Liu
                   ` (22 more replies)
  0 siblings, 23 replies; 68+ messages in thread
From: Zhao Liu @ 2026-02-10  3:23 UTC (permalink / raw)
  To: Paolo Bonzini, Daniel P . Berrangé, Eduardo Habkost,
	Markus Armbruster, Thomas Huth, Igor Mammedov,
	Philippe Mathieu-Daudé
  Cc: Richard Henderson, Peter Maydell, Michael S . Tsirkin,
	BALATON Zoltan, Mark Cave-Ayland, Pierrick Bouvier, Zide Chen,
	Dapeng Mi, Zhao Liu, qemu-devel, devel

Hi,

This is the v2 trying to introduce property flags to detect user's
property setting (from CLI/QMP/HMP). I dropped RFC tag since previous
RFC v1 [1].

Though this work the follow-up of v2.6 & v2.7 machines' removal [2],
now it is decoupled from [2] totally since v2 doesn't detect compat
property and only focuses on external user setting, so this series is
based on master branch at the commit 28a6ca268c2c ("Merge tag 'single-
binary-20260203' of https://github.com/philmd/qemu into staging"). And
you can also find the code here:

https://gitlab.com/zhao.liu/qemu/-/tree/prop-flags-v2.3-02-08-2026

This series introduces 3 property flags:
 * USER_SET:
   Any external user property setting (from CLI/HMP/QMP) is marked as
   USER_SET.
 * DEPRECATED:
   Once a property is marked as DEPRECATED, any external user property
   setting will trigger a warning.
 * INTERNAL:
   Once a  property is marked as INTERNAL, any external user property
   setting will cause an error.

More details or document for these 3 flags, you can refer patch 7.


Compared with RFC v1, v2 mainly:
 * introduce USER_SET property flag to identify all user's setting.
   - patch 7 for document.
 * construct DEPRECATED & INTERNAL flag on USER_SET.
   - patch 7 for document.
 * cover more comprehensive user set cases.
   - patch 8-13.
 * provide examples about new flags (USER_SET/DEPRECATED/INTELNAL).
   - patch 15/16/17 are examples for DEPRECATED flag.
   - patch 18 is the example for INTERNAL flag.
   - patch 20 is the example for USER_SET flag.

I think v2 should now cover "nearly" all cases (patch 8-13) where users
set properties: one approach is to trace the call chain of
object_property_set().

Even if there are cases that were missed, they can be easily addressed
based on this series:

  object_property_set(obj, ...);
  /* Insert this call after object_property_set(). */
  object_property_set_flags(obj, ..., OBJ_PROP_FLAG_USER_SET, ...);

[1]: RFC v1:
     https://lore.kernel.org/qemu-devel/20251202170502.3228625-1-zhao1.liu@intel.com/
[2]: hw/i386/pc: Remove deprecated 2.6 and 2.7 PC machines
     https://lore.kernel.org/qemu-devel/20260108033051.777361-1-zhao1.liu@intel.com/

Thanks and Best Regards,
Zhao
---
Zhao Liu (21):
  qom/object: use BIT macro for ObjectPropertyFlags
  qom/object: cache ObjectPropertyFlags in ObjectProperty
  qom/object: factor out object_class_property_try_add()
  qom/object: add flags argument in object_{class_}property_try_add()
  qom/object: rename object_{class_}property_try_add() to
    object_{class_}property_add_full()
  qom/object: add helpers to set/get/clear property flags
  qom/object: introduce user interaction flags for properties
  qom/object: add from_user argument in object_property_parse()
  qom/object: mark global property set from CLI as USER_SET
  qom/qom-hmp-cmd: mark properties set from HMP (non-JSON) "qom-set" as
    USER_SET
  qom/qom-qmp-cmd: mark properties set from QMP/HMP (JSON) "qom-set" as
    USER_SET
  qom/object_interfaces: mark properties set from qdict & keyval as
    USER_SET
  system/vl: mark property set in object_parse_property_opt() as
    USER_SET
  hw/core/qdev-properties: allow qdev properties accept flags
  target/i386: deprecate fill-mtrr-mask property
  target/i386: deprecate cpuid-0xb property
  hw/intc/ioapic: deprecate version property
  target/i386: mark x-consistent-cache property as internal-only
  target/i386: remove redundant validation for lbr-fmt property
  target/i386: detect user provided lbr-fmt via property flag
  hw/core/qdev-properties: support valid default value for
    DEFINE_PROP_UINT64_CHECKMASK

 docs/about/deprecated.rst         |  31 +++++
 hw/core/qdev-properties.c         |  29 ++--
 hw/i386/sgx.c                     |   2 +-
 hw/intc/ioapic.c                  |   3 +-
 include/hw/core/qdev-properties.h |  38 +++---
 include/qom/object.h              | 215 +++++++++++++++++++++++++++---
 qom/object.c                      | 177 ++++++++++++++++++++----
 qom/object_interfaces.c           |   5 +
 qom/qom-hmp-cmds.c                |   2 +-
 qom/qom-qmp-cmds.c                |   7 +-
 system/vl.c                       |   6 +-
 target/i386/cpu.c                 |  28 ++--
 12 files changed, 448 insertions(+), 95 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2026-03-23 15:37 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10  3:23 [PATCH v2 00/21] qom: introduce property flags to track external user input Zhao Liu
2026-02-10  3:23 ` [PATCH v2 01/21] qom/object: use BIT macro for ObjectPropertyFlags Zhao Liu
2026-03-20  9:53   ` Thomas Huth
2026-02-10  3:23 ` [PATCH v2 02/21] qom/object: cache ObjectPropertyFlags in ObjectProperty Zhao Liu
2026-03-20  9:53   ` Thomas Huth
2026-02-10  3:23 ` [PATCH v2 03/21] qom/object: factor out object_class_property_try_add() Zhao Liu
2026-02-10 14:41   ` BALATON Zoltan
2026-02-11  7:14     ` Zhao Liu
2026-02-10  3:23 ` [PATCH v2 04/21] qom/object: add flags argument in object_{class_}property_try_add() Zhao Liu
2026-02-10  3:23 ` [PATCH v2 05/21] qom/object: rename object_{class_}property_try_add() to object_{class_}property_add_full() Zhao Liu
2026-02-10  3:23 ` [PATCH v2 06/21] qom/object: add helpers to set/get/clear property flags Zhao Liu
2026-02-10  3:23 ` [PATCH v2 07/21] qom/object: introduce user interaction flags for properties Zhao Liu
2026-02-10  9:49   ` Daniel P. Berrangé
2026-02-10  9:58     ` Daniel P. Berrangé
2026-02-11  8:19       ` Zhao Liu
2026-02-10 14:44   ` BALATON Zoltan
2026-02-11  7:22     ` Zhao Liu
2026-02-10  3:23 ` [PATCH v2 08/21] qom/object: add from_user argument in object_property_parse() Zhao Liu
2026-02-10  3:23 ` [PATCH v2 09/21] qom/object: mark global property set from CLI as USER_SET Zhao Liu
2026-02-10  3:23 ` [PATCH v2 10/21] qom/qom-hmp-cmd: mark properties set from HMP (non-JSON) "qom-set" " Zhao Liu
2026-02-10  3:23 ` [PATCH v2 11/21] qom/qom-qmp-cmd: mark properties set from QMP/HMP (JSON) " Zhao Liu
2026-02-10  3:23 ` [PATCH v2 12/21] qom/object_interfaces: mark properties set from qdict & keyval " Zhao Liu
2026-02-10  3:23 ` [PATCH v2 13/21] system/vl: mark property set in object_parse_property_opt() " Zhao Liu
2026-02-10  3:23 ` [PATCH v2 14/21] hw/core/qdev-properties: allow qdev properties accept flags Zhao Liu
2026-02-10  9:41   ` Peter Krempa
2026-02-11  7:10     ` Zhao Liu
2026-02-10  9:56   ` Daniel P. Berrangé
2026-02-11  7:30     ` Zhao Liu
2026-02-11 16:58       ` Daniel P. Berrangé
2026-02-12 15:25         ` Zhao Liu
2026-02-12 15:42           ` Daniel P. Berrangé
2026-03-09 13:34             ` Zhao Liu
2026-02-18  9:51         ` Igor Mammedov
2026-03-06  9:14           ` Markus Armbruster
2026-03-06  9:19             ` Daniel P. Berrangé
2026-03-06  9:30         ` Markus Armbruster
2026-03-09 13:52           ` Zhao Liu
2026-02-10  3:23 ` [PATCH v2 15/21] target/i386: deprecate fill-mtrr-mask property Zhao Liu
2026-02-10  3:23 ` [PATCH v2 16/21] target/i386: deprecate cpuid-0xb property Zhao Liu
2026-02-10  3:23 ` [PATCH v2 17/21] hw/intc/ioapic: deprecate version property Zhao Liu
2026-02-10  3:23 ` [PATCH v2 18/21] target/i386: mark x-consistent-cache property as internal-only Zhao Liu
2026-02-10  3:23 ` [PATCH v2 19/21] target/i386: remove redundant validation for lbr-fmt property Zhao Liu
2026-03-13 22:34   ` Chen, Zide
2026-02-10  3:23 ` [PATCH v2 20/21] target/i386: detect user provided lbr-fmt via property flag Zhao Liu
2026-03-13 22:36   ` Chen, Zide
2026-02-10  3:23 ` [PATCH v2 21/21] hw/core/qdev-properties: support valid default value for DEFINE_PROP_UINT64_CHECKMASK Zhao Liu
2026-03-13 22:36   ` Chen, Zide
2026-02-10 10:12 ` [PATCH v2 00/21] qom: introduce property flags to track external user input Daniel P. Berrangé
2026-02-10 10:44   ` Michael S. Tsirkin
2026-02-10 11:00     ` Daniel P. Berrangé
2026-02-10 15:00       ` BALATON Zoltan
2026-02-10 15:28   ` Zhao Liu
2026-02-10 15:16     ` BALATON Zoltan
2026-02-11  7:24       ` Zhao Liu
2026-02-11 11:28         ` BALATON Zoltan
2026-02-12 15:31           ` Zhao Liu
2026-02-12 15:56             ` BALATON Zoltan
2026-02-10 15:41     ` Daniel P. Berrangé
2026-02-11  7:06       ` Zhao Liu
2026-02-11 11:18         ` Daniel P. Berrangé
2026-03-11 13:05 ` Markus Armbruster
2026-03-11 13:14   ` Daniel P. Berrangé
2026-03-11 13:38     ` Peter Krempa
2026-03-16 15:43     ` Markus Armbruster
2026-03-16 16:05       ` BALATON Zoltan
2026-03-16 18:00         ` Markus Armbruster
2026-03-20 10:09       ` Daniel P. Berrangé
2026-03-23 15:37       ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox