diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-09-24 15:28:26 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-09-24 15:28:26 +0100 |
commit | f7f1d916b22306c35ab9c090aab5233a91b4b7f9 (patch) | |
tree | 223f1864a618983e58e6ef1d7df2750d2ea28498 /backends | |
parent | c122bca9cd7b986be4d473240a4fec6315b7a2c2 (diff) | |
parent | 418b473e8f586247475e8adc5d048598e5721361 (diff) | |
download | qemu-f7f1d916b22306c35ab9c090aab5233a91b4b7f9.zip qemu-f7f1d916b22306c35ab9c090aab5233a91b4b7f9.tar.gz qemu-f7f1d916b22306c35ab9c090aab5233a91b4b7f9.tar.bz2 |
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>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/cryptodev-vhost-user.c | 13 | ||||
-rw-r--r-- | backends/cryptodev.c | 8 |
2 files changed, 9 insertions, 12 deletions
diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c index 60ec490..e1df073 100644 --- a/backends/cryptodev-vhost-user.c +++ b/backends/cryptodev-vhost-user.c @@ -334,13 +334,6 @@ cryptodev_vhost_user_get_chardev(Object *obj, Error **errp) return NULL; } -static void cryptodev_vhost_user_instance_int(Object *obj) -{ - object_property_add_str(obj, "chardev", - cryptodev_vhost_user_get_chardev, - cryptodev_vhost_user_set_chardev); -} - static void cryptodev_vhost_user_finalize(Object *obj) { CryptoDevBackendVhostUser *s = @@ -361,13 +354,17 @@ cryptodev_vhost_user_class_init(ObjectClass *oc, void *data) bc->create_session = cryptodev_vhost_user_sym_create_session; bc->close_session = cryptodev_vhost_user_sym_close_session; bc->do_sym_op = NULL; + + object_class_property_add_str(oc, "chardev", + cryptodev_vhost_user_get_chardev, + cryptodev_vhost_user_set_chardev); + } static const TypeInfo cryptodev_vhost_user_info = { .name = TYPE_CRYPTODEV_BACKEND_VHOST_USER, .parent = TYPE_CRYPTODEV_BACKEND, .class_init = cryptodev_vhost_user_class_init, - .instance_init = cryptodev_vhost_user_instance_int, .instance_finalize = cryptodev_vhost_user_finalize, .instance_size = sizeof(CryptoDevBackendVhostUser), }; diff --git a/backends/cryptodev.c b/backends/cryptodev.c index ada4ebe..3f141f6 100644 --- a/backends/cryptodev.c +++ b/backends/cryptodev.c @@ -206,10 +206,6 @@ cryptodev_backend_can_be_deleted(UserCreatable *uc) static void cryptodev_backend_instance_init(Object *obj) { - object_property_add(obj, "queues", "uint32", - cryptodev_backend_get_queues, - cryptodev_backend_set_queues, - NULL, NULL); /* Initialize devices' queues property to 1 */ object_property_set_int(obj, "queues", 1, NULL); } @@ -230,6 +226,10 @@ cryptodev_backend_class_init(ObjectClass *oc, void *data) ucc->can_be_deleted = cryptodev_backend_can_be_deleted; QTAILQ_INIT(&crypto_clients); + object_class_property_add(oc, "queues", "uint32", + cryptodev_backend_get_queues, + cryptodev_backend_set_queues, + NULL, NULL); } static const TypeInfo cryptodev_backend_info = { |