[PATCH 00/24] qom: Convert some properties to class properties

Eduardo Habkost posted 24 patches 3 years, 7 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora passed
Test checkpatch passed
Test FreeBSD passed
Failed in applying to current master (apply log)
There is a newer version of this series
target/s390x/internal.h         |  1 -
backends/cryptodev-vhost-user.c | 13 ++---
backends/cryptodev.c            |  8 +--
backends/rng-egd.c              |  9 +--
backends/rng-random.c           |  8 +--
backends/rng.c                  |  8 +--
backends/vhost-user.c           |  6 +-
hw/arm/vexpress.c               | 25 +++++----
hw/arm/virt.c                   | 88 ++++++++++++++++-------------
hw/arm/xlnx-zcu102.c            | 25 +++++----
hw/core/machine.c               | 12 ++--
hw/cpu/core.c                   |  8 +--
hw/display/vga-pci.c            | 12 ++--
hw/misc/tmp421.c                | 30 +++++-----
hw/pci-host/i440fx.c            | 32 +++++------
hw/riscv/sifive_e.c             | 11 ++--
hw/riscv/sifive_u.c             | 16 +++---
target/arm/cpu64.c              | 16 ++----
target/i386/cpu.c               | 99 +++++++++++++++++----------------
target/s390x/cpu.c              |  1 -
target/s390x/cpu_models.c       | 35 ++++++------
ui/input-barrier.c              | 44 +++++++--------
ui/input-linux.c                | 27 ++++-----
23 files changed, 262 insertions(+), 272 deletions(-)
[PATCH 00/24] qom: Convert some properties to class properties
Posted by Eduardo Habkost 3 years, 7 months ago
Class properties make QOM introspection simpler and easier, as it
doesn't require an object to be instantiated.  This series
converts a few existing object_property_add*() calls to register
class properties instead.

Eduardo Habkost (24):
  cryptodev-vhost-user: Register "chardev" as class property
  cryptodev-backend: Register "chardev" as class property
  rng-egd: Register "chardev" as class property
  rng-random: register "filename" as class property
  vhost-user: Register "chardev" as class property
  vexpress: Register "secure" as class property
  rng: Register "opened" as class property
  vexpress-a15: Register "virtualization" as class property
  input-linux: Register properties as class properties
  input-barrier: Register properties as class properties
  tmp421: Register properties as class properties
  s390x: Register all CPU properties as class properties
  i386: Register most CPU properties as class properties
  i386: Register feature bit properties as class properties
  arm/virt: Register most properties as class properties
  virt: Register "its" as class property
  cpu/core: Register core-id and nr-threads as class properties
  arm/cpu64: Register "aarch64" as class property
  xlnx-zcu102: Register properties as class properties
  machine: Register "memory-backend" as class property
  vga-pci: Register "big-endian-framebuffer" as class property
  i440fx: Register i440FX-pcihost properties as class properties
  sifive_e: Register "revb" as class property
  sifive_u: Register "start-in-flash" as class property

 target/s390x/internal.h         |  1 -
 backends/cryptodev-vhost-user.c | 13 ++---
 backends/cryptodev.c            |  8 +--
 backends/rng-egd.c              |  9 +--
 backends/rng-random.c           |  8 +--
 backends/rng.c                  |  8 +--
 backends/vhost-user.c           |  6 +-
 hw/arm/vexpress.c               | 25 +++++----
 hw/arm/virt.c                   | 88 ++++++++++++++++-------------
 hw/arm/xlnx-zcu102.c            | 25 +++++----
 hw/core/machine.c               | 12 ++--
 hw/cpu/core.c                   |  8 +--
 hw/display/vga-pci.c            | 12 ++--
 hw/misc/tmp421.c                | 30 +++++-----
 hw/pci-host/i440fx.c            | 32 +++++------
 hw/riscv/sifive_e.c             | 11 ++--
 hw/riscv/sifive_u.c             | 16 +++---
 target/arm/cpu64.c              | 16 ++----
 target/i386/cpu.c               | 99 +++++++++++++++++----------------
 target/s390x/cpu.c              |  1 -
 target/s390x/cpu_models.c       | 35 ++++++------
 ui/input-barrier.c              | 44 +++++++--------
 ui/input-linux.c                | 27 ++++-----
 23 files changed, 262 insertions(+), 272 deletions(-)

-- 
2.26.2


Re: [PATCH 00/24] qom: Convert some properties to class properties
Posted by Li Qiang 3 years, 7 months ago
Eduardo Habkost <ehabkost@redhat.com> 于2020年9月22日周二 上午6:11写道:
>
> Class properties make QOM introspection simpler and easier, as it
> doesn't require an object to be instantiated.  This series
> converts a few existing object_property_add*() calls to register
> class properties instead.
>

Hello Eduardo,

IIUC, most of the properties can be dev-spec or class-spec.
Do we have any principle or rule to specify the property to be dev or class?

Maybe if the property which is always the same between instances can
be a class-property?

Thanks,
Li Qiang



> Eduardo Habkost (24):
>   cryptodev-vhost-user: Register "chardev" as class property
>   cryptodev-backend: Register "chardev" as class property
>   rng-egd: Register "chardev" as class property
>   rng-random: register "filename" as class property
>   vhost-user: Register "chardev" as class property
>   vexpress: Register "secure" as class property
>   rng: Register "opened" as class property
>   vexpress-a15: Register "virtualization" as class property
>   input-linux: Register properties as class properties
>   input-barrier: Register properties as class properties
>   tmp421: Register properties as class properties
>   s390x: Register all CPU properties as class properties
>   i386: Register most CPU properties as class properties
>   i386: Register feature bit properties as class properties
>   arm/virt: Register most properties as class properties
>   virt: Register "its" as class property
>   cpu/core: Register core-id and nr-threads as class properties
>   arm/cpu64: Register "aarch64" as class property
>   xlnx-zcu102: Register properties as class properties
>   machine: Register "memory-backend" as class property
>   vga-pci: Register "big-endian-framebuffer" as class property
>   i440fx: Register i440FX-pcihost properties as class properties
>   sifive_e: Register "revb" as class property
>   sifive_u: Register "start-in-flash" as class property
>
>  target/s390x/internal.h         |  1 -
>  backends/cryptodev-vhost-user.c | 13 ++---
>  backends/cryptodev.c            |  8 +--
>  backends/rng-egd.c              |  9 +--
>  backends/rng-random.c           |  8 +--
>  backends/rng.c                  |  8 +--
>  backends/vhost-user.c           |  6 +-
>  hw/arm/vexpress.c               | 25 +++++----
>  hw/arm/virt.c                   | 88 ++++++++++++++++-------------
>  hw/arm/xlnx-zcu102.c            | 25 +++++----
>  hw/core/machine.c               | 12 ++--
>  hw/cpu/core.c                   |  8 +--
>  hw/display/vga-pci.c            | 12 ++--
>  hw/misc/tmp421.c                | 30 +++++-----
>  hw/pci-host/i440fx.c            | 32 +++++------
>  hw/riscv/sifive_e.c             | 11 ++--
>  hw/riscv/sifive_u.c             | 16 +++---
>  target/arm/cpu64.c              | 16 ++----
>  target/i386/cpu.c               | 99 +++++++++++++++++----------------
>  target/s390x/cpu.c              |  1 -
>  target/s390x/cpu_models.c       | 35 ++++++------
>  ui/input-barrier.c              | 44 +++++++--------
>  ui/input-linux.c                | 27 ++++-----
>  23 files changed, 262 insertions(+), 272 deletions(-)
>
> --
> 2.26.2
>
>

Re: [PATCH 00/24] qom: Convert some properties to class properties
Posted by Eduardo Habkost 3 years, 7 months ago
On Tue, Sep 22, 2020 at 09:47:57AM +0800, Li Qiang wrote:
> Eduardo Habkost <ehabkost@redhat.com> 于2020年9月22日周二 上午6:11写道:
> >
> > Class properties make QOM introspection simpler and easier, as it
> > doesn't require an object to be instantiated.  This series
> > converts a few existing object_property_add*() calls to register
> > class properties instead.
> >
> 
> Hello Eduardo,
> 
> IIUC, most of the properties can be dev-spec or class-spec.
> Do we have any principle or rule to specify the property to be dev or class?
> 
> Maybe if the property which is always the same between instances can
> be a class-property?

If you are talking about having the same value, this is not the
use case for class properties.  Registering a class property just
means all instances of the object will have that property (but
each instance can have the property set to a different value),
and makes this information available for introspection before
instantiating the object.

-- 
Eduardo


Re: [PATCH 00/24] qom: Convert some properties to class properties
Posted by Eduardo Habkost 3 years, 6 months ago
On Mon, Sep 21, 2020 at 06:10:21PM -0400, Eduardo Habkost wrote:
> Class properties make QOM introspection simpler and easier, as it
> doesn't require an object to be instantiated.  This series
> converts a few existing object_property_add*() calls to register
> class properties instead.
> 
> Eduardo Habkost (24):
>   cryptodev-vhost-user: Register "chardev" as class property
>   cryptodev-backend: Register "chardev" as class property
>   rng-egd: Register "chardev" as class property
>   rng-random: register "filename" as class property
>   vhost-user: Register "chardev" as class property
>   vexpress: Register "secure" as class property
>   rng: Register "opened" as class property
>   vexpress-a15: Register "virtualization" as class property
>   input-linux: Register properties as class properties
>   input-barrier: Register properties as class properties
>   tmp421: Register properties as class properties
>   s390x: Register all CPU properties as class properties
>   i386: Register most CPU properties as class properties
>   i386: Register feature bit properties as class properties
>   arm/virt: Register most properties as class properties
>   virt: Register "its" as class property
>   cpu/core: Register core-id and nr-threads as class properties
>   arm/cpu64: Register "aarch64" as class property
>   xlnx-zcu102: Register properties as class properties
>   machine: Register "memory-backend" as class property
>   vga-pci: Register "big-endian-framebuffer" as class property
>   i440fx: Register i440FX-pcihost properties as class properties
>   sifive_e: Register "revb" as class property
>   sifive_u: Register "start-in-flash" as class property

I'm queueing the following:

[PATCH 01/24] cryptodev-vhost-user: Register "chardev" as class property
[PATCH 02/24] cryptodev-backend: Register "chardev" as class property
[PATCH 12/24] s390x: Register all CPU properties as class properties
[PATCH 17/24] cpu/core: Register core-id and nr-threads as class properties
[PATCH 19/24] xlnx-zcu102: Register properties as class properties
[PATCH 20/24] machine: Register "memory-backend" as class property
[PATCH 22/24] i440fx: Register i440FX-pcihost properties as class properties
[PATCH 23/24] sifive_e: Register "revb" as class property
[PATCH 24/24] sifive_u: Register "start-in-flash" as class property

The remaining patches still need reviews.

-- 
Eduardo


Re: [PATCH 00/24] qom: Convert some properties to class properties
Posted by Eduardo Habkost 3 years, 6 months ago
On Tue, Sep 22, 2020 at 05:00:40PM -0400, Eduardo Habkost wrote:
> On Mon, Sep 21, 2020 at 06:10:21PM -0400, Eduardo Habkost wrote:
> > Class properties make QOM introspection simpler and easier, as it
> > doesn't require an object to be instantiated.  This series
> > converts a few existing object_property_add*() calls to register
> > class properties instead.
> > 
> > Eduardo Habkost (24):
> >   cryptodev-vhost-user: Register "chardev" as class property
> >   cryptodev-backend: Register "chardev" as class property
> >   rng-egd: Register "chardev" as class property
> >   rng-random: register "filename" as class property
> >   vhost-user: Register "chardev" as class property
> >   vexpress: Register "secure" as class property
> >   rng: Register "opened" as class property
> >   vexpress-a15: Register "virtualization" as class property
> >   input-linux: Register properties as class properties
> >   input-barrier: Register properties as class properties
> >   tmp421: Register properties as class properties
> >   s390x: Register all CPU properties as class properties
> >   i386: Register most CPU properties as class properties
> >   i386: Register feature bit properties as class properties
> >   arm/virt: Register most properties as class properties
> >   virt: Register "its" as class property
> >   cpu/core: Register core-id and nr-threads as class properties
> >   arm/cpu64: Register "aarch64" as class property
> >   xlnx-zcu102: Register properties as class properties
> >   machine: Register "memory-backend" as class property
> >   vga-pci: Register "big-endian-framebuffer" as class property
> >   i440fx: Register i440FX-pcihost properties as class properties
> >   sifive_e: Register "revb" as class property
> >   sifive_u: Register "start-in-flash" as class property
> 
> I'm queueing the following:
> 
> [PATCH 01/24] cryptodev-vhost-user: Register "chardev" as class property
> [PATCH 02/24] cryptodev-backend: Register "chardev" as class property
> [PATCH 12/24] s390x: Register all CPU properties as class properties
> [PATCH 17/24] cpu/core: Register core-id and nr-threads as class properties
> [PATCH 19/24] xlnx-zcu102: Register properties as class properties
> [PATCH 20/24] machine: Register "memory-backend" as class property
> [PATCH 22/24] i440fx: Register i440FX-pcihost properties as class properties
> [PATCH 23/24] sifive_e: Register "revb" as class property
> [PATCH 24/24] sifive_u: Register "start-in-flash" as class property
> 
> The remaining patches still need reviews.

Queueing:

[PATCH 03/24] rng-egd: Register "chardev" as class property
[PATCH 04/24] rng-random: register "filename" as class property
[PATCH 07/24] rng: Register "opened" as class property
[PATCH 09/24] input-linux: Register properties as class properties
[PATCH 10/24] input-barrier: Register properties as class properties
[PATCH 13/24] i386: Register most CPU properties as class properties
[PATCH 14/24] i386: Register feature bit properties as class properties

Waiting for reviews on:

[PATCH 05/24] vhost-user: Register "chardev" as class property
[PATCH 06/24] vexpress: Register "secure" as class property
[PATCH 08/24] vexpress-a15: Register "virtualization" as class property
[PATCH 11/24] tmp421: Register properties as class properties
[PATCH 15/24] arm/virt: Register most properties as class properties
[PATCH 16/24] virt: Register "its" as class property
[PATCH 18/24] arm/cpu64: Register "aarch64" as class property
[PATCH 21/24] vga-pci: Register "big-endian-framebuffer" as class property

-- 
Eduardo


Re: [PATCH 00/24] qom: Convert some properties to class properties
Posted by no-reply@patchew.org 3 years, 7 months ago
Patchew URL: https://patchew.org/QEMU/20200921221045.699690-1-ehabkost@redhat.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

C linker for the host machine: cc ld.bfd 2.27-43
Host machine cpu family: x86_64
Host machine cpu: x86_64
../src/meson.build:10: WARNING: Module unstable-keyval has no backwards or forwards compatibility and might not exist in future releases.
Program sh found: YES
Program python3 found: YES (/usr/bin/python3)
Configuring ninjatool using configuration
---
Running test qtest-x86_64: qos-test
Broken pipe
../src/tests/qtest/libqtest.c:175: kill_qemu() detected QEMU death from signal 7 (Bus error) (core dumped)
ERROR qtest-x86_64: device-introspect-test - too few tests run (expected 6, got 5)
make: *** [run-test-151] Error 1
make: *** Waiting for unfinished jobs....

Looking for expected file 'tests/data/acpi/microvm/FACP'
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--rm', '--label', 'com.qemu.instance.uuid=1012ee92264940698a9ece48329b2072', '-u', '1003', '--security-opt', 'seccomp=unconfined', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-h2ifbdcv/src/docker-src.2020-09-21-22.55.00.16625:/var/tmp/qemu:z,ro', 'qemu/centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=1012ee92264940698a9ece48329b2072
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-h2ifbdcv/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    7m22.647s
user    0m20.149s


The full log is available at
http://patchew.org/logs/20200921221045.699690-1-ehabkost@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com