qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] efba15: qom: simplify object_find_property /


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] efba15: qom: simplify object_find_property / object_class_...
Date: Thu, 24 Sep 2020 09:30:30 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: efba15959cdb1ca7beeed8d6188ab0905b468f90
      
https://github.com/qemu/qemu/commit/efba15959cdb1ca7beeed8d6188ab0905b468f90
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M hw/arm/armv7m.c
    M hw/arm/exynos4210.c
    M hw/arm/highbank.c
    M hw/arm/integratorcp.c
    M hw/arm/realview.c
    M hw/arm/sbsa-ref.c
    M hw/arm/versatilepb.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/arm/xilinx_zynq.c
    M hw/core/qdev-properties-system.c
    M hw/core/sysbus.c
    M hw/cpu/a15mpcore.c
    M hw/cpu/a9mpcore.c
    M hw/misc/iotkit-sysctl.c
    M hw/pci/pci.c
    M hw/scsi/scsi-bus.c
    M include/qom/object.h
    M qom/object.c
    M target/arm/monitor.c
    M target/i386/cpu.c
    M target/ppc/translate_init.c.inc

  Log Message:
  -----------
  qom: simplify object_find_property / object_class_find_property

When debugging QEMU it is often useful to put a breakpoint on the
error_setg_internal method impl.

Unfortunately the object_property_add / object_class_property_add
methods call object_property_find / object_class_property_find methods
to check if a property exists already before adding the new property.

As a result there are a huge number of calls to error_setg_internal
on startup of most QEMU commands, making it very painful to set a
breakpoint on this method.

Most callers of object_find_property and object_class_find_property,
however, pass in a NULL for the Error parameter. This simplifies the
methods to remove the Error parameter entirely, and then adds some
new wrapper methods that are able to raise an Error when needed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200914135617.1493072-1-berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: c4332cd1dcf2964c23893ab4c0bf8d774e42a3cf
      
https://github.com/qemu/qemu/commit/c4332cd1dcf2964c23893ab4c0bf8d774e42a3cf
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M docs/system/deprecated.rst
    M hw/core/machine.c
    M hw/i386/pc.c

  Log Message:
  -----------
  smp: drop support for deprecated (invalid topologies)

it's was deprecated since 3.1

Support for invalid topologies is removed, the user must ensure
that topologies described with -smp include all possible cpus,
i.e. (sockets * cores * threads) == maxcpus or QEMU will
exit with error.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200911133202.938754-1-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 07b0db0efbd3b37c5d44e846e74d26b7495637e6
      
https://github.com/qemu/qemu/commit/07b0db0efbd3b37c5d44e846e74d26b7495637e6
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M backends/cryptodev-vhost-user.c

  Log Message:
  -----------
  cryptodev-vhost-user: Register "chardev" as class property

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Message-Id: <20200921221045.699690-2-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 1f14e3889369f190029949b656687df855c0598f
      
https://github.com/qemu/qemu/commit/1f14e3889369f190029949b656687df855c0598f
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M backends/cryptodev.c

  Log Message:
  -----------
  cryptodev-backend: Register "chardev" as class property

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Message-Id: <20200921221045.699690-3-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: ab76d63a883a2cae1bbd56e9fedbc6c0bf808ede
      
https://github.com/qemu/qemu/commit/ab76d63a883a2cae1bbd56e9fedbc6c0bf808ede
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M target/s390x/cpu.c
    M target/s390x/cpu_models.c
    M target/s390x/internal.h

  Log Message:
  -----------
  s390x: Register all CPU properties as class properties

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200921221045.699690-13-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 2decc51f19421ad9b12a620b82debf9139270520
      
https://github.com/qemu/qemu/commit/2decc51f19421ad9b12a620b82debf9139270520
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M hw/cpu/core.c

  Log Message:
  -----------
  cpu/core: Register core-id and nr-threads as class properties

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200921221045.699690-18-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: f93a83c00485d00db133a5077864275a735f0fd2
      
https://github.com/qemu/qemu/commit/f93a83c00485d00db133a5077864275a735f0fd2
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M hw/arm/xlnx-zcu102.c

  Log Message:
  -----------
  xlnx-zcu102: Register properties as class properties

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20200921221045.699690-20-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: acd5b054e4bf33e35669a50de75aa01eea746e90
      
https://github.com/qemu/qemu/commit/acd5b054e4bf33e35669a50de75aa01eea746e90
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M hw/core/machine.c

  Log Message:
  -----------
  machine: Register "memory-backend" as class property

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200921221045.699690-21-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 53f647462677eb8f4bec8f1bfad53add9b5dc3cf
      
https://github.com/qemu/qemu/commit/53f647462677eb8f4bec8f1bfad53add9b5dc3cf
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M hw/pci-host/i440fx.c

  Log Message:
  -----------
  i440fx: Register i440FX-pcihost properties as class properties

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200921221045.699690-23-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: fabbcbd95325a3420ce7d48c1b980ae079ea7dbf
      
https://github.com/qemu/qemu/commit/fabbcbd95325a3420ce7d48c1b980ae079ea7dbf
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M hw/riscv/sifive_e.c

  Log Message:
  -----------
  sifive_e: Register "revb" as class property

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20200921221045.699690-24-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: 418b473e8f586247475e8adc5d048598e5721361
      
https://github.com/qemu/qemu/commit/418b473e8f586247475e8adc5d048598e5721361
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M hw/riscv/sifive_u.c

  Log Message:
  -----------
  sifive_u: Register "start-in-flash" as class property

Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20200921221045.699690-25-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>


  Commit: f7f1d916b22306c35ab9c090aab5233a91b4b7f9
      
https://github.com/qemu/qemu/commit/f7f1d916b22306c35ab9c090aab5233a91b4b7f9
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-09-24 (Thu, 24 Sep 2020)

  Changed paths:
    M backends/cryptodev-vhost-user.c
    M backends/cryptodev.c
    M docs/system/deprecated.rst
    M hw/arm/armv7m.c
    M hw/arm/exynos4210.c
    M hw/arm/highbank.c
    M hw/arm/integratorcp.c
    M hw/arm/realview.c
    M hw/arm/sbsa-ref.c
    M hw/arm/versatilepb.c
    M hw/arm/vexpress.c
    M hw/arm/virt.c
    M hw/arm/xilinx_zynq.c
    M hw/arm/xlnx-zcu102.c
    M hw/core/machine.c
    M hw/core/qdev-properties-system.c
    M hw/core/sysbus.c
    M hw/cpu/a15mpcore.c
    M hw/cpu/a9mpcore.c
    M hw/cpu/core.c
    M hw/i386/pc.c
    M hw/misc/iotkit-sysctl.c
    M hw/pci-host/i440fx.c
    M hw/pci/pci.c
    M hw/riscv/sifive_e.c
    M hw/riscv/sifive_u.c
    M hw/scsi/scsi-bus.c
    M include/qom/object.h
    M qom/object.c
    M target/arm/monitor.c
    M target/i386/cpu.c
    M target/ppc/translate_init.c.inc
    M target/s390x/cpu.c
    M target/s390x/cpu_models.c
    M target/s390x/internal.h

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/ehabkost/tags/machine-next-pull-request' into staging

machine + QOM queue, 2020-09-22

QOM cleanups:
* Convert instance properties to class properties
  (Eduardo Habkost)
* simplify object_find_property / object_class_find_property
  (Daniel P. Berrangé)

Deprecated feature removal:
* Drop support for invalid topologies (Igor Mammedov)

# gpg: Signature made Tue 22 Sep 2020 23:25:01 BST
# gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg:                issuer "ehabkost@redhat.com"
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/machine-next-pull-request:
  sifive_u: Register "start-in-flash" as class property
  sifive_e: Register "revb" as class property
  i440fx: Register i440FX-pcihost properties as class properties
  machine: Register "memory-backend" as class property
  xlnx-zcu102: Register properties as class properties
  cpu/core: Register core-id and nr-threads as class properties
  s390x: Register all CPU properties as class properties
  cryptodev-backend: Register "chardev" as class property
  cryptodev-vhost-user: Register "chardev" as class property
  smp: drop support for deprecated (invalid topologies)
  qom: simplify object_find_property / object_class_find_property

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/c122bca9cd7b...f7f1d916b223



reply via email to

[Prev in Thread] Current Thread [Next in Thread]