qom: convert scalar properties to QAPI-aware registration
Pass appropriate QAPITypeInfo to object_class_property_add() and object_property_add(). Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20261101201717.3911097-37-armbru@redhat.com>
This commit is contained in:
1 parent
6e57897a8c
commit
a1863ce7f2
79 files changed
+335
-213
No files matched your search
+5
-4
@@ -24,6 +24,7 @@
|
||||
#include "qemu/config-file.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "hw/pci/msi.h"
|
||||
#include "hw/pci/msix.h"
|
||||
#include "hw/s390x/adapter.h"
|
||||
@@ -4302,15 +4303,15 @@ static void kvm_accel_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_set_description(oc, "kernel-irqchip",
|
||||
"Configure KVM in-kernel irqchip");
|
||||
|
||||
object_class_property_add(oc, "kvm-shadow-mem", "int", NULL,
|
||||
object_class_property_add(oc, "kvm-shadow-mem", "int", &int_type_info,
|
||||
kvm_get_kvm_shadow_mem, kvm_set_kvm_shadow_mem,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "kvm-shadow-mem",
|
||||
"KVM shadow MMU size");
|
||||
|
||||
object_class_property_add(oc, "dirty-ring-size", "uint32", NULL,
|
||||
kvm_get_dirty_ring_size,
|
||||
kvm_set_dirty_ring_size,
|
||||
object_class_property_add(oc, "dirty-ring-size", "uint32",
|
||||
&uint32_type_info,
|
||||
kvm_get_dirty_ring_size, kvm_set_dirty_ring_size,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "dirty-ring-size",
|
||||
"Size of KVM dirty page ring buffer (default: 0, i.e. use bitmap)");
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/rcu.h"
|
||||
@@ -238,7 +239,8 @@ static void nitro_accel_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_set_description(oc, "debug-mode",
|
||||
"Start enclave in debug mode (enables console output)");
|
||||
|
||||
object_class_property_add(oc, "enclave-cid", "uint64", NULL,
|
||||
object_class_property_add(oc, "enclave-cid", "uint64",
|
||||
&uint64_type_info,
|
||||
nitro_get_enclave_cid,
|
||||
nitro_set_enclave_cid,
|
||||
NULL, NULL);
|
||||
|
||||
+2
-1
@@ -29,6 +29,7 @@
|
||||
#include "exec/icount.h"
|
||||
#include "tcg/startup.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/accel.h"
|
||||
#include "qemu/atomic.h"
|
||||
@@ -270,7 +271,7 @@ static void tcg_accel_class_init(ObjectClass *oc, const void *data)
|
||||
tcg_get_thread,
|
||||
tcg_set_thread);
|
||||
|
||||
object_class_property_add(oc, "tb-size", "uint32", NULL,
|
||||
object_class_property_add(oc, "tb-size", "uint32", &uint32_type_info,
|
||||
tcg_get_tb_size, tcg_set_tb_size,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "tb-size",
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "system/cryptodev.h"
|
||||
#include "system/stats.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-commands-cryptodev.h"
|
||||
#include "qapi/qapi-types-stats.h"
|
||||
#include "qapi/visitor.h"
|
||||
@@ -622,15 +623,15 @@ cryptodev_backend_class_init(ObjectClass *oc, const void *data)
|
||||
ucc->prepare_delete = cryptodev_backend_prepare_delete;
|
||||
|
||||
QTAILQ_INIT(&crypto_clients);
|
||||
object_class_property_add(oc, "queues", "uint32", NULL,
|
||||
object_class_property_add(oc, "queues", "uint32", &uint32_type_info,
|
||||
cryptodev_backend_get_queues,
|
||||
cryptodev_backend_set_queues,
|
||||
NULL, NULL);
|
||||
object_class_property_add(oc, "throttle-bps", "uint64", NULL,
|
||||
object_class_property_add(oc, "throttle-bps", "uint64", &uint64_type_info,
|
||||
cryptodev_backend_get_bps,
|
||||
cryptodev_backend_set_bps,
|
||||
NULL, NULL);
|
||||
object_class_property_add(oc, "throttle-ops", "uint64", NULL,
|
||||
object_class_property_add(oc, "throttle-ops", "uint64", &uint64_type_info,
|
||||
cryptodev_backend_get_ops,
|
||||
cryptodev_backend_set_ops,
|
||||
NULL, NULL);
|
||||
|
||||
@@ -275,11 +275,11 @@ file_backend_class_init(ObjectClass *oc, const void *data)
|
||||
file_memory_backend_get_discard_data, file_memory_backend_set_discard_data);
|
||||
object_class_property_add_str(oc, "mem-path",
|
||||
get_mem_path, set_mem_path);
|
||||
object_class_property_add(oc, "align", "uint64", NULL,
|
||||
object_class_property_add(oc, "align", "uint64", &uint64_type_info,
|
||||
file_memory_backend_get_align,
|
||||
file_memory_backend_set_align,
|
||||
NULL, NULL);
|
||||
object_class_property_add(oc, "offset", "int", NULL,
|
||||
object_class_property_add(oc, "offset", "int", &int_type_info,
|
||||
file_memory_backend_get_offset,
|
||||
file_memory_backend_set_offset,
|
||||
NULL, NULL);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "qemu/memfd.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qom/object.h"
|
||||
#include "migration/cpr.h"
|
||||
#include "system/kvm.h"
|
||||
@@ -194,7 +195,8 @@ memfd_backend_class_init(ObjectClass *oc, const void *data)
|
||||
memfd_backend_set_hugetlb);
|
||||
object_class_property_set_description(oc, "hugetlb",
|
||||
"Use huge pages");
|
||||
object_class_property_add(oc, "hugetlbsize", "uint64", NULL,
|
||||
object_class_property_add(oc, "hugetlbsize", "uint64",
|
||||
&uint64_type_info,
|
||||
memfd_backend_get_hugetlbsize,
|
||||
memfd_backend_set_hugetlbsize,
|
||||
NULL, NULL);
|
||||
|
||||
+4
-3
@@ -529,7 +529,7 @@ host_memory_backend_class_init(ObjectClass *oc, const void *data)
|
||||
host_memory_backend_set_prealloc);
|
||||
object_class_property_set_description(oc, "prealloc",
|
||||
"Preallocate memory");
|
||||
object_class_property_add(oc, "prealloc-threads", "int", NULL,
|
||||
object_class_property_add(oc, "prealloc-threads", "int", &int_type_info,
|
||||
host_memory_backend_get_prealloc_threads,
|
||||
host_memory_backend_set_prealloc_threads,
|
||||
NULL, NULL);
|
||||
@@ -540,13 +540,14 @@ host_memory_backend_class_init(ObjectClass *oc, const void *data)
|
||||
object_property_allow_set_link, OBJ_PROP_LINK_STRONG);
|
||||
object_class_property_set_description(oc, "prealloc-context",
|
||||
"Context to use for creating CPU threads for preallocation");
|
||||
object_class_property_add(oc, "size", "size", NULL,
|
||||
object_class_property_add(oc, "size", "size", &size_type_info,
|
||||
host_memory_backend_get_size,
|
||||
host_memory_backend_set_size,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "size",
|
||||
"Size of the memory region (ex: 500M)");
|
||||
object_class_property_add(oc, "host-nodes", "[uint16]", NULL,
|
||||
object_class_property_add(oc, "host-nodes", "[uint16]",
|
||||
&uint16List_type_info,
|
||||
host_memory_backend_get_host_nodes,
|
||||
host_memory_backend_set_host_nodes,
|
||||
NULL, NULL);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "qemu/thread.h"
|
||||
#include "system/qtest.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-type-infos-block-core.h"
|
||||
#include "qapi/qapi-visit-block-core.h"
|
||||
#include "qom/object.h"
|
||||
@@ -985,7 +986,8 @@ static void throttle_group_obj_class_init(ObjectClass *klass,
|
||||
|
||||
/* individual properties */
|
||||
for (i = 0; i < sizeof(properties) / sizeof(ThrottleParamInfo); i++) {
|
||||
object_class_property_add(klass, properties[i].name, "int64", NULL,
|
||||
object_class_property_add(klass, properties[i].name, "int64",
|
||||
&int64_type_info,
|
||||
throttle_group_get,
|
||||
throttle_group_set,
|
||||
NULL, &properties[i]);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include <asm/unistd.h>
|
||||
#include <linux/keyctl.h>
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "trace.h"
|
||||
@@ -107,10 +108,10 @@ qcrypto_secret_keyring_class_init(ObjectClass *oc, const void *data)
|
||||
QCryptoSecretCommonClass *sic = QCRYPTO_SECRET_COMMON_CLASS(oc);
|
||||
sic->load_data = qcrypto_secret_keyring_load_data;
|
||||
|
||||
object_class_property_add(oc, "serial", "int32_t", NULL,
|
||||
qcrypto_secret_prop_get_key,
|
||||
qcrypto_secret_prop_set_key,
|
||||
NULL, NULL);
|
||||
object_class_property_add(oc, "serial", "int32_t", &int32_type_info,
|
||||
qcrypto_secret_prop_get_key,
|
||||
qcrypto_secret_prop_set_key,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+7
-3
@@ -14,6 +14,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "block/thread-pool.h"
|
||||
#include "system/event-loop-base.h"
|
||||
|
||||
@@ -104,15 +105,18 @@ static void event_loop_base_class_init(ObjectClass *klass,
|
||||
ucc->complete = event_loop_base_complete;
|
||||
ucc->prepare_delete = event_loop_base_prepare_delete;
|
||||
|
||||
object_class_property_add(klass, "aio-max-batch", "int64", NULL,
|
||||
object_class_property_add(klass, "aio-max-batch", "int64",
|
||||
&int64_type_info,
|
||||
event_loop_base_get_param,
|
||||
event_loop_base_set_param,
|
||||
NULL, &aio_max_batch_info);
|
||||
object_class_property_add(klass, "thread-pool-min", "int64", NULL,
|
||||
object_class_property_add(klass, "thread-pool-min", "int64",
|
||||
&int64_type_info,
|
||||
event_loop_base_get_param,
|
||||
event_loop_base_set_param,
|
||||
NULL, &thread_pool_min_info);
|
||||
object_class_property_add(klass, "thread-pool-max", "int64", NULL,
|
||||
object_class_property_add(klass, "thread-pool-max", "int64",
|
||||
&int64_type_info,
|
||||
event_loop_base_get_param,
|
||||
event_loop_base_set_param,
|
||||
NULL, &thread_pool_max_info);
|
||||
|
||||
+3
-1
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "migration/vmstate.h"
|
||||
@@ -379,7 +380,8 @@ void ich9_pm_add_class_properties(ObjectClass *oc, ptrdiff_t pm_offset)
|
||||
PM_REG_FIELD(acpi_pci_hotplug.root),
|
||||
object_property_allow_set_link,
|
||||
OBJ_PROP_LINK_STRONG);
|
||||
object_class_property_add(oc, ACPI_PM_PROP_GPE0_BLK, "uint32", NULL,
|
||||
object_class_property_add(oc, ACPI_PM_PROP_GPE0_BLK, "uint32",
|
||||
&uint32_type_info,
|
||||
ich9_pm_get_gpe0_blk,
|
||||
NULL, NULL, NULL);
|
||||
object_class_property_add_uint8_ptr(oc, ACPI_PM_PROP_S3_DISABLED,
|
||||
|
||||
+3
-2
@@ -27,6 +27,7 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "hw/core/boards.h"
|
||||
#include "hw/acpi/aml-build.h"
|
||||
#include "hw/acpi/pci.h"
|
||||
@@ -139,7 +140,7 @@ static void acpi_generic_initiator_class_init(ObjectClass *oc, const void *data)
|
||||
acpi_generic_initiator_set_pci_device);
|
||||
object_class_property_set_description(oc, "pci-dev",
|
||||
"PCI device to associate with the node");
|
||||
object_class_property_add(oc, "node", "uint32", NULL, NULL,
|
||||
object_class_property_add(oc, "node", "uint32", &uint32_type_info, NULL,
|
||||
acpi_generic_initiator_set_node, NULL, NULL);
|
||||
object_class_property_set_description(oc, "node",
|
||||
"NUMA node associated with the PCI device");
|
||||
@@ -253,7 +254,7 @@ static void acpi_generic_port_class_init(ObjectClass *oc, const void *data)
|
||||
acpi_generic_port_set_pci_bus);
|
||||
object_class_property_set_description(oc, "pci-bus",
|
||||
"PCI Bus of the host bridge associated with this GP affinity structure");
|
||||
object_class_property_add(oc, "node", "uint32", NULL, NULL,
|
||||
object_class_property_add(oc, "node", "uint32", &uint32_type_info, NULL,
|
||||
acpi_generic_port_set_node, NULL, NULL);
|
||||
object_class_property_set_description(oc, "node",
|
||||
"The NUMA node like ID to index HMAT/SLIT NUMA properties involving GP");
|
||||
|
||||
+10
-8
@@ -4254,18 +4254,20 @@ static void virt_machine_class_init(ObjectClass *oc, const void *data)
|
||||
"Set on/off to enable/disable high "
|
||||
"memory region for PCI MMIO");
|
||||
|
||||
object_class_property_add(oc, "highmem-mmio-size", "size", NULL,
|
||||
virt_get_highmem_mmio_size,
|
||||
virt_set_highmem_mmio_size,
|
||||
NULL, NULL);
|
||||
object_class_property_add(oc, "highmem-mmio-size", "size",
|
||||
&size_type_info,
|
||||
virt_get_highmem_mmio_size,
|
||||
virt_set_highmem_mmio_size,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "highmem-mmio-size",
|
||||
"Set the high memory region size "
|
||||
"for PCI MMIO");
|
||||
|
||||
object_class_property_add(oc, "virtio-mmio-transports", "uint8", NULL,
|
||||
virt_get_virtio_transports,
|
||||
virt_set_virtio_transports,
|
||||
NULL, NULL);
|
||||
object_class_property_add(oc, "virtio-mmio-transports", "uint8",
|
||||
&uint8_type_info,
|
||||
virt_get_virtio_transports,
|
||||
virt_set_virtio_transports,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "virtio-mmio-transports",
|
||||
"Set the number of virtio-mmio transports to instantiate");
|
||||
|
||||
|
||||
+3
-1
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "system/qtest.h"
|
||||
#include "hw/core/clock.h"
|
||||
@@ -185,7 +186,8 @@ static void clock_initfn(Object *obj)
|
||||
QLIST_INIT(&clk->children);
|
||||
|
||||
if (qtest_enabled()) {
|
||||
object_property_add(obj, "qtest-clock-period", "uint64", NULL,
|
||||
object_property_add(obj, "qtest-clock-period", "uint64",
|
||||
&uint64_type_info,
|
||||
clock_period_prop_get, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1141,7 +1141,7 @@ static void machine_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_set_description(oc, "smp-cache",
|
||||
"Cache properties list for SMP machine");
|
||||
|
||||
object_class_property_add(oc, "phandle-start", "int", NULL,
|
||||
object_class_property_add(oc, "phandle-start", "int", &int_type_info,
|
||||
machine_get_phandle_start,
|
||||
machine_set_phandle_start,
|
||||
NULL, NULL);
|
||||
|
||||
+3
-2
@@ -12,6 +12,7 @@
|
||||
#include "hw/core/boards.h"
|
||||
#include "hw/cpu/core.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
|
||||
static void core_prop_get_core_id(Object *obj, Visitor *v, const char *name,
|
||||
@@ -82,10 +83,10 @@ static void cpu_core_class_init(ObjectClass *oc, const void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
|
||||
set_bit(DEVICE_CATEGORY_CPU, dc->categories);
|
||||
object_class_property_add(oc, "core-id", "int", NULL,
|
||||
object_class_property_add(oc, "core-id", "int", &int_type_info,
|
||||
core_prop_get_core_id,
|
||||
core_prop_set_core_id, NULL, NULL);
|
||||
object_class_property_add(oc, "nr-threads", "int", NULL,
|
||||
object_class_property_add(oc, "nr-threads", "int", &int_type_info,
|
||||
core_prop_get_nr_threads,
|
||||
core_prop_set_nr_threads, NULL, NULL);
|
||||
}
|
||||
|
||||
+1
-1
@@ -611,7 +611,7 @@ static void machine_set_cfmw(Object *obj, Visitor *v, const char *name,
|
||||
|
||||
void cxl_machine_init(Object *obj, CXLState *state)
|
||||
{
|
||||
object_property_add(obj, "cxl", "bool", NULL, machine_get_cxl,
|
||||
object_property_add(obj, "cxl", "bool", &bool_type_info, machine_get_cxl,
|
||||
machine_set_cxl, NULL, state);
|
||||
object_property_set_description(obj, "cxl",
|
||||
"Set on/off to enable/disable "
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "hw/gpio/aspeed_gpio.h"
|
||||
#include "hw/misc/aspeed_scu.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/core/irq.h"
|
||||
#include "migration/vmstate.h"
|
||||
@@ -1481,7 +1482,8 @@ static void aspeed_gpio_init(Object *obj)
|
||||
int pin_idx = j % GPIOS_PER_GROUP;
|
||||
const char *group = &props->group_label[group_idx][0];
|
||||
char *name = g_strdup_printf("gpio%s%d", group, pin_idx);
|
||||
object_property_add(obj, name, "bool", NULL, aspeed_gpio_get_pin,
|
||||
object_property_add(obj, name, "bool", &bool_type_info,
|
||||
aspeed_gpio_get_pin,
|
||||
aspeed_gpio_set_pin, NULL, NULL);
|
||||
g_free(name);
|
||||
}
|
||||
@@ -1489,7 +1491,8 @@ static void aspeed_gpio_init(Object *obj)
|
||||
|
||||
for (int i = 0; i < agc->nr_gpio_sets; i++) {
|
||||
g_autofree char *name = g_strdup_printf("gpio-set[%d]", i);
|
||||
object_property_add(obj, name, "uint32", NULL, aspeed_gpio_get_set,
|
||||
object_property_add(obj, name, "uint32", &uint32_type_info,
|
||||
aspeed_gpio_get_set,
|
||||
aspeed_gpio_set_set, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/core/irq.h"
|
||||
#include "hw/core/qdev-properties.h"
|
||||
@@ -300,7 +301,8 @@ static void aspeed_sgpio_init(Object *obj)
|
||||
{
|
||||
for (int i = 0; i < ASPEED_SGPIO_MAX_PIN_PAIR * 2; i++) {
|
||||
g_autofree char *name = g_strdup_printf("sgpio%03d", i);
|
||||
object_property_add(obj, name, "bool", NULL, aspeed_sgpio_get_pin,
|
||||
object_property_add(obj, name, "bool", &bool_type_info,
|
||||
aspeed_sgpio_get_pin,
|
||||
aspeed_sgpio_set_pin, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "trace.h"
|
||||
|
||||
@@ -409,10 +410,10 @@ static void stm32l4x5_gpio_init(Object *obj)
|
||||
|
||||
s->clk = qdev_init_clock_in(DEVICE(s), "clk", NULL, s, 0);
|
||||
|
||||
object_property_add(obj, "disconnected-pins", "uint16", NULL,
|
||||
object_property_add(obj, "disconnected-pins", "uint16", &uint16_type_info,
|
||||
disconnected_pins_get, disconnected_pins_set,
|
||||
NULL, &s->disconnected_pins);
|
||||
object_property_add(obj, "clock-freq-hz", "uint32", NULL,
|
||||
object_property_add(obj, "clock-freq-hz", "uint32", &uint32_type_info,
|
||||
clock_freq_get, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "hw/hexagon/hex-subsys.h"
|
||||
#include "hw/core/loader.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/log.h"
|
||||
@@ -153,7 +154,8 @@ static void hexagon_sim_set_subsystem_base(Object *obj, Visitor *v,
|
||||
|
||||
static void add_dsp_properties(ObjectClass *oc)
|
||||
{
|
||||
object_class_property_add(oc, "subsystem-base", "uint32", NULL,
|
||||
object_class_property_add(oc, "subsystem-base", "uint32",
|
||||
&uint32_type_info,
|
||||
hexagon_sim_get_subsystem_base,
|
||||
hexagon_sim_set_subsystem_base, NULL, NULL);
|
||||
object_class_property_set_description(oc, "subsystem-base",
|
||||
|
||||
+6
-3
@@ -1718,7 +1718,8 @@ static void pc_machine_class_init(ObjectClass *oc, const void *data)
|
||||
mc->default_ram_id = "pc.ram";
|
||||
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_AUTO;
|
||||
|
||||
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size", NULL,
|
||||
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size",
|
||||
&size_type_info,
|
||||
pc_machine_get_max_ram_below_4g,
|
||||
pc_machine_set_max_ram_below_4g,
|
||||
NULL, NULL);
|
||||
@@ -1757,14 +1758,16 @@ static void pc_machine_class_init(ObjectClass *oc, const void *data)
|
||||
pc_machine_get_default_bus_bypass_iommu,
|
||||
pc_machine_set_default_bus_bypass_iommu);
|
||||
|
||||
object_class_property_add(oc, PC_MACHINE_MAX_FW_SIZE, "size", NULL,
|
||||
object_class_property_add(oc, PC_MACHINE_MAX_FW_SIZE, "size",
|
||||
&size_type_info,
|
||||
pc_machine_get_max_fw_size,
|
||||
pc_machine_set_max_fw_size,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, PC_MACHINE_MAX_FW_SIZE,
|
||||
"Maximum combined firmware size");
|
||||
|
||||
object_class_property_add(oc, PC_MACHINE_SMBIOS_EP, "str", NULL,
|
||||
object_class_property_add(oc, PC_MACHINE_SMBIOS_EP, "str",
|
||||
&str_type_info,
|
||||
pc_machine_get_smbios_ep,
|
||||
pc_machine_set_smbios_ep,
|
||||
NULL, NULL);
|
||||
|
||||
+3
-1
@@ -15,6 +15,7 @@
|
||||
#include "hw/mem/memory-device.h"
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "target/i386/cpu.h"
|
||||
#include "system/address-spaces.h"
|
||||
@@ -159,7 +160,8 @@ static void sgx_epc_class_init(ObjectClass *oc, const void *data)
|
||||
mdc->get_memory_region = sgx_epc_md_get_memory_region;
|
||||
mdc->fill_device_info = sgx_epc_md_fill_device_info;
|
||||
|
||||
object_class_property_add(oc, SGX_EPC_SIZE_PROP, "uint64", NULL,
|
||||
object_class_property_add(oc, SGX_EPC_SIZE_PROP, "uint64",
|
||||
&uint64_type_info,
|
||||
sgx_epc_get_size,
|
||||
NULL,
|
||||
NULL, NULL);
|
||||
|
||||
+3
-3
@@ -417,9 +417,9 @@ static void x86_machine_class_init(ObjectClass *oc, const void *data)
|
||||
"The string may be up to 8 bytes in size");
|
||||
|
||||
object_class_property_add(oc, X86_MACHINE_BUS_LOCK_RATELIMIT, "uint64_t",
|
||||
NULL,
|
||||
x86_machine_get_bus_lock_ratelimit,
|
||||
x86_machine_set_bus_lock_ratelimit, NULL, NULL);
|
||||
&uint64_type_info,
|
||||
x86_machine_get_bus_lock_ratelimit,
|
||||
x86_machine_set_bus_lock_ratelimit, NULL, NULL);
|
||||
object_class_property_set_description(oc, X86_MACHINE_BUS_LOCK_RATELIMIT,
|
||||
"Set the ratelimit for the bus locks acquired in VMs");
|
||||
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-types-block.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -174,7 +175,7 @@ out:
|
||||
|
||||
static void ide_dev_instance_init(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "bootindex", "int32", NULL,
|
||||
object_property_add(obj, "bootindex", "int32", &int32_type_info,
|
||||
ide_dev_get_bootindex,
|
||||
ide_dev_set_bootindex, NULL, NULL);
|
||||
object_property_set_int(obj, "bootindex", -1, NULL);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/i386/apic.h"
|
||||
#include "hw/i386/apic_internal.h"
|
||||
@@ -442,7 +443,7 @@ static void apic_common_initfn(Object *obj)
|
||||
APICCommonState *s = APIC_COMMON(obj);
|
||||
|
||||
s->id = s->initial_apic_id = -1;
|
||||
object_property_add(obj, "id", "uint32", NULL,
|
||||
object_property_add(obj, "id", "uint32", &uint32_type_info,
|
||||
apic_common_get_id,
|
||||
apic_common_set_id, NULL, NULL);
|
||||
}
|
||||
|
||||
+4
-4
@@ -1512,10 +1512,10 @@ static void virt_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_set_description(oc, "highmem-mmio",
|
||||
"Set on/off to enable/disable high "
|
||||
"memory region for PCI MMIO");
|
||||
object_class_property_add(oc, "highmem-mmio-size", "size", NULL,
|
||||
virt_get_highmem_mmio_size,
|
||||
virt_set_highmem_mmio_size,
|
||||
NULL, NULL);
|
||||
object_class_property_add(oc, "highmem-mmio-size", "size", &size_type_info,
|
||||
virt_get_highmem_mmio_size,
|
||||
virt_set_highmem_mmio_size,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "highmem-mmio-size",
|
||||
"Set the high memory region size "
|
||||
"for PCI MMIO");
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/pmem.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/mem/nvdimm.h"
|
||||
#include "hw/core/qdev-properties.h"
|
||||
@@ -99,7 +100,7 @@ static void nvdimm_set_uuid(Object *obj, Visitor *v, const char *name,
|
||||
|
||||
static void nvdimm_init(Object *obj)
|
||||
{
|
||||
object_property_add(obj, NVDIMM_LABEL_SIZE_PROP, "size", NULL,
|
||||
object_property_add(obj, NVDIMM_LABEL_SIZE_PROP, "size", &size_type_info,
|
||||
nvdimm_get_label_size, nvdimm_set_label_size, NULL,
|
||||
NULL);
|
||||
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@
|
||||
#include "hw/mem/nvdimm.h"
|
||||
#include "hw/mem/memory-device.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
#include "system/hostmem.h"
|
||||
@@ -176,7 +177,7 @@ static void pc_dimm_get_size(Object *obj, Visitor *v, const char *name,
|
||||
|
||||
static void pc_dimm_init(Object *obj)
|
||||
{
|
||||
object_property_add(obj, PC_DIMM_SIZE_PROP, "uint64", NULL,
|
||||
object_property_add(obj, PC_DIMM_SIZE_PROP, "uint64", &uint64_type_info,
|
||||
pc_dimm_get_size,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
+13
-12
@@ -12,6 +12,7 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/misc/aspeed_lpc.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/core/irq.h"
|
||||
#include "hw/core/qdev-properties.h"
|
||||
@@ -417,40 +418,40 @@ static void aspeed_lpc_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
static void aspeed_lpc_init(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "idr1", "uint32", NULL,
|
||||
object_property_add(obj, "idr1", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "odr1", "uint32", NULL,
|
||||
object_property_add(obj, "odr1", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "str1", "uint32", NULL,
|
||||
object_property_add(obj, "str1", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "idr2", "uint32", NULL,
|
||||
object_property_add(obj, "idr2", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "odr2", "uint32", NULL,
|
||||
object_property_add(obj, "odr2", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "str2", "uint32", NULL,
|
||||
object_property_add(obj, "str2", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "idr3", "uint32", NULL,
|
||||
object_property_add(obj, "idr3", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "odr3", "uint32", NULL,
|
||||
object_property_add(obj, "odr3", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "str3", "uint32", NULL,
|
||||
object_property_add(obj, "str3", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "idr4", "uint32", NULL,
|
||||
object_property_add(obj, "idr4", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "odr4", "uint32", NULL,
|
||||
object_property_add(obj, "odr4", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
object_property_add(obj, "str4", "uint32", NULL,
|
||||
object_property_add(obj, "str4", "uint32", &uint32_type_info,
|
||||
aspeed_kcs_get_register_property,
|
||||
aspeed_kcs_set_register_property, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "trace.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qemu/cutils.h"
|
||||
@@ -259,7 +260,7 @@ static void aspeed_sdmc_set_ram_size(Object *obj, Visitor *v, const char *name,
|
||||
|
||||
static void aspeed_sdmc_initfn(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "ram-size", "int", NULL,
|
||||
object_property_add(obj, "ram-size", "int", &int_type_info,
|
||||
aspeed_sdmc_get_ram_size, aspeed_sdmc_set_ram_size,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "hw/core/registerfields.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/bitops.h"
|
||||
#include "qemu/error-report.h"
|
||||
@@ -491,7 +492,7 @@ static void npcm7xx_mft_init(Object *obj)
|
||||
s->clock_2 = qdev_init_clock_out(dev, "clock2");
|
||||
|
||||
for (int i = 0; i < NPCM7XX_PWM_PER_MODULE; ++i) {
|
||||
object_property_add(obj, "max_rpm[*]", "uint32", NULL,
|
||||
object_property_add(obj, "max_rpm[*]", "uint32", &uint32_type_info,
|
||||
npcm7xx_mft_get_max_rpm,
|
||||
npcm7xx_mft_set_max_rpm,
|
||||
NULL, &s->max_rpm[i]);
|
||||
|
||||
+2
-1
@@ -29,6 +29,7 @@
|
||||
#include "ne2000.h"
|
||||
#include "system/system.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
@@ -131,7 +132,7 @@ out:
|
||||
|
||||
static void isa_ne2000_instance_init(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "bootindex", "int32", NULL,
|
||||
object_property_add(obj, "bootindex", "int32", &int32_type_info,
|
||||
isa_ne2000_get_bootindex,
|
||||
isa_ne2000_set_bootindex, NULL, NULL);
|
||||
object_property_set_int(obj, "bootindex", -1, NULL);
|
||||
|
||||
+3
-1
@@ -203,6 +203,7 @@
|
||||
#include "qemu/units.h"
|
||||
#include "qemu/range.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "system/system.h"
|
||||
#include "system/block-backend.h"
|
||||
@@ -10612,7 +10613,8 @@ static void nvme_instance_init(Object *obj)
|
||||
"bootindex", "/namespace@1,0",
|
||||
DEVICE(obj));
|
||||
|
||||
object_property_add(obj, "smart_critical_warning", "uint8", NULL,
|
||||
object_property_add(obj, "smart_critical_warning", "uint8",
|
||||
&uint8_type_info,
|
||||
nvme_get_smart_warning,
|
||||
nvme_set_smart_warning, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/pci/pci_bus.h"
|
||||
#include "hw/pci/pci_host.h"
|
||||
@@ -75,7 +76,7 @@ void pxb_bus_class_init(ObjectClass *class, const void *data)
|
||||
pbc->bus_num = pxb_bus_num;
|
||||
pbc->numa_node = pxb_bus_numa_node;
|
||||
|
||||
object_class_property_add(class, "acpi_uid", "uint32", NULL,
|
||||
object_class_property_add(class, "acpi_uid", "uint32", &uint32_type_info,
|
||||
prop_pxb_uid_get, NULL, NULL, NULL);
|
||||
object_class_property_set_description(class, "acpi_uid",
|
||||
"ACPI Unique ID used to distinguish this PCI Host Bridge / ACPI00016");
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "hw/core/sysbus.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/error-report.h"
|
||||
@@ -388,22 +389,22 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, const void *data)
|
||||
dc->user_creatable = false;
|
||||
|
||||
object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_START, "uint32",
|
||||
NULL,
|
||||
&uint32_type_info,
|
||||
i440fx_pcihost_get_pci_hole_start,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_END, "uint32",
|
||||
NULL,
|
||||
&uint32_type_info,
|
||||
i440fx_pcihost_get_pci_hole_end,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE64_START, "uint64",
|
||||
NULL,
|
||||
&uint64_type_info,
|
||||
i440fx_pcihost_get_pci_hole64_start,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE64_END, "uint64",
|
||||
NULL,
|
||||
&uint64_type_info,
|
||||
i440fx_pcihost_get_pci_hole64_end,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "qemu/bswap.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "hw/pci-host/pnv_phb3_regs.h"
|
||||
#include "hw/pci-host/pnv_phb.h"
|
||||
#include "hw/pci-host/pnv_phb3.h"
|
||||
@@ -1164,12 +1165,12 @@ static void pnv_phb3_root_bus_class_init(ObjectClass *klass, const void *data)
|
||||
{
|
||||
BusClass *k = BUS_CLASS(klass);
|
||||
|
||||
object_class_property_add(klass, "phb-id", "uint32", NULL,
|
||||
object_class_property_add(klass, "phb-id", "uint32", &uint32_type_info,
|
||||
pnv_phb3_root_bus_get_prop,
|
||||
pnv_phb3_root_bus_set_prop,
|
||||
NULL, NULL);
|
||||
|
||||
object_class_property_add(klass, "chip-id", "uint32", NULL,
|
||||
object_class_property_add(klass, "chip-id", "uint32", &uint32_type_info,
|
||||
pnv_phb3_root_bus_get_prop,
|
||||
pnv_phb3_root_bus_set_prop,
|
||||
NULL, NULL);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "qemu/bswap.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "target/ppc/cpu.h"
|
||||
#include "hw/pci-host/pnv_phb4_regs.h"
|
||||
#include "hw/pci-host/pnv_phb4.h"
|
||||
@@ -1775,12 +1776,12 @@ static void pnv_phb4_root_bus_class_init(ObjectClass *klass, const void *data)
|
||||
{
|
||||
BusClass *k = BUS_CLASS(klass);
|
||||
|
||||
object_class_property_add(klass, "phb-id", "uint32", NULL,
|
||||
object_class_property_add(klass, "phb-id", "uint32", &uint32_type_info,
|
||||
pnv_phb4_root_bus_get_prop,
|
||||
pnv_phb4_root_bus_set_prop,
|
||||
NULL, NULL);
|
||||
|
||||
object_class_property_add(klass, "chip-id", "uint32", NULL,
|
||||
object_class_property_add(klass, "chip-id", "uint32", &uint32_type_info,
|
||||
pnv_phb4_root_bus_get_prop,
|
||||
pnv_phb4_root_bus_set_prop,
|
||||
NULL, NULL);
|
||||
|
||||
+9
-4
@@ -35,6 +35,7 @@
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
|
||||
@@ -226,19 +227,23 @@ static void q35_host_initfn(Object *obj)
|
||||
qdev_prop_set_uint64(DEVICE(s), PCI_HOST_PROP_PCI_HOLE64_SIZE,
|
||||
Q35_PCI_HOST_HOLE64_SIZE_DEFAULT);
|
||||
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_START, "uint32", NULL,
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_START, "uint32",
|
||||
&uint32_type_info,
|
||||
q35_host_get_pci_hole_start,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_END, "uint32", NULL,
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_END, "uint32",
|
||||
&uint32_type_info,
|
||||
q35_host_get_pci_hole_end,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_START, "uint64", NULL,
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_START, "uint64",
|
||||
&uint64_type_info,
|
||||
q35_host_get_pci_hole64_start,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_END, "uint64", NULL,
|
||||
object_property_add(obj, PCI_HOST_PROP_PCI_HOLE64_END, "uint64",
|
||||
&uint64_type_info,
|
||||
q35_host_get_pci_hole64_end,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
|
||||
+3
-2
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qobject/qnull.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "hw/ppc/spapr_drc.h"
|
||||
@@ -584,8 +585,8 @@ static void spapr_dr_connector_instance_init(Object *obj)
|
||||
SpaprDrcClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
|
||||
|
||||
object_property_add_uint32_ptr(obj, "id", &drc->id, OBJ_PROP_FLAG_READ);
|
||||
object_property_add(obj, "index", "uint32", NULL, prop_get_index,
|
||||
NULL, NULL, NULL);
|
||||
object_property_add(obj, "index", "uint32", &uint32_type_info,
|
||||
prop_get_index, NULL, NULL, NULL);
|
||||
object_property_add(obj, "fdt", "struct", NULL, prop_get_fdt,
|
||||
NULL, NULL, NULL);
|
||||
drc->state = drck->empty_state;
|
||||
|
||||
@@ -933,8 +933,8 @@ static void vfu_object_class_init(ObjectClass *klass, const void *data)
|
||||
k->nr_devs = 0;
|
||||
|
||||
object_class_property_add(klass, "socket", "SocketAddress",
|
||||
&SocketAddress_type_info,
|
||||
NULL, vfu_object_set_socket, NULL, NULL);
|
||||
&SocketAddress_type_info, NULL,
|
||||
vfu_object_set_socket, NULL, NULL);
|
||||
object_class_property_set_description(klass, "socket",
|
||||
"SocketAddress "
|
||||
"(ex: type=unix,path=/tmp/sock). "
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "qemu/units.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/core/boards.h"
|
||||
#include "hw/core/loader.h"
|
||||
@@ -744,7 +745,7 @@ static void microchip_icicle_kit_machine_class_init(ObjectClass *oc,
|
||||
mc->default_ram_size = 1537 * MiB;
|
||||
|
||||
object_class_property_add(oc, "clint-timebase-frequency", "uint32_t",
|
||||
NULL,
|
||||
&uint32_type_info,
|
||||
microchip_icicle_kit_get_clint_timebase_freq,
|
||||
microchip_icicle_kit_set_clint_timebase_freq,
|
||||
NULL, NULL);
|
||||
|
||||
+4
-2
@@ -53,6 +53,7 @@
|
||||
#include "qemu/timer.h"
|
||||
#include "hw/s390x/event-facility.h"
|
||||
#include "hw/s390x/ebcdic.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-visit-machine.h"
|
||||
#include "qapi/qapi-events-machine-s390x.h"
|
||||
#include "migration/vmstate.h"
|
||||
@@ -195,13 +196,14 @@ static void cpi_class_init(ObjectClass *klass, const void *data)
|
||||
"name of the cluster which the VM belongs to, if any"
|
||||
" e.g. \"PLEX \"");
|
||||
|
||||
object_class_property_add(klass, "system_level", "uint64", NULL,
|
||||
object_class_property_add(klass, "system_level", "uint64",
|
||||
&uint64_type_info,
|
||||
get_system_level,
|
||||
NULL, NULL, NULL);
|
||||
object_class_property_set_description(klass, "system_level",
|
||||
"distribution and kernel version in Linux e.g. 74872343805430528");
|
||||
|
||||
object_class_property_add(klass, "timestamp", "uint64", NULL,
|
||||
object_class_property_add(klass, "timestamp", "uint64", &uint64_type_info,
|
||||
get_timestamp,
|
||||
NULL, NULL, NULL);
|
||||
object_class_property_set_description(klass, "timestamp",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qemu/module.h"
|
||||
#include "virtio-ccw-mem.h"
|
||||
#include "hw/mem/memory-device.h"
|
||||
@@ -205,7 +206,8 @@ static void virtio_ccw_mem_instance_init(Object *obj)
|
||||
OBJECT(&dev->vdev), VIRTIO_MEM_BLOCK_SIZE_PROP);
|
||||
object_property_add_alias(obj, VIRTIO_MEM_SIZE_PROP, OBJECT(&dev->vdev),
|
||||
VIRTIO_MEM_SIZE_PROP);
|
||||
object_property_add(obj, VIRTIO_MEM_REQUESTED_SIZE_PROP, "size", NULL,
|
||||
object_property_add(obj, VIRTIO_MEM_REQUESTED_SIZE_PROP, "size",
|
||||
&size_type_info,
|
||||
virtio_ccw_mem_get_requested_size,
|
||||
virtio_ccw_mem_set_requested_size, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qom/object.h"
|
||||
@@ -642,15 +643,16 @@ static void adc128d818_initfn(Object *obj)
|
||||
for (unsigned ch = 0u; ch < ADC128D818_NUM_CHANNELS; ch++) {
|
||||
char *name = g_strdup_printf("ain%u", ch);
|
||||
|
||||
object_property_add(obj, name, "int", NULL, adc128d818_get_ain,
|
||||
object_property_add(obj, name, "int", &int_type_info,
|
||||
adc128d818_get_ain,
|
||||
adc128d818_set_ain, NULL, NULL);
|
||||
g_free(name);
|
||||
}
|
||||
|
||||
object_property_add(obj, "temperature", "int", NULL,
|
||||
object_property_add(obj, "temperature", "int", &int_type_info,
|
||||
adc128d818_get_temperature,
|
||||
adc128d818_set_temperature, NULL, NULL);
|
||||
object_property_add(obj, "ext-vref-mv", "int", NULL,
|
||||
object_property_add(obj, "ext-vref-mv", "int", &int_type_info,
|
||||
adc128d818_get_ext_vref,
|
||||
adc128d818_set_ext_vref, NULL, NULL);
|
||||
}
|
||||
|
||||
+2
-1
@@ -14,6 +14,7 @@
|
||||
#include "hw/core/irq.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -217,7 +218,7 @@ static void adm1266_init(Object *obj)
|
||||
for (int i = 0; i < ADM1266_NUM_PAGES; i++) {
|
||||
pmbus_page_config(pmdev, i, flags);
|
||||
|
||||
object_property_add(obj, "vout[*]", "uint16", NULL,
|
||||
object_property_add(obj, "vout[*]", "uint16", &uint16_type_info,
|
||||
adm1266_get,
|
||||
adm1266_set, NULL, &pmdev->pages[i].read_vout);
|
||||
}
|
||||
|
||||
+5
-4
@@ -12,6 +12,7 @@
|
||||
#include "hw/core/irq.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -493,19 +494,19 @@ static void adm1272_init(Object *obj)
|
||||
|
||||
pmbus_page_config(pmdev, 0, flags);
|
||||
|
||||
object_property_add(obj, "vin", "uint16", NULL,
|
||||
object_property_add(obj, "vin", "uint16", &uint16_type_info,
|
||||
adm1272_get,
|
||||
adm1272_set, NULL, &pmdev->pages[0].read_vin);
|
||||
|
||||
object_property_add(obj, "vout", "uint16", NULL,
|
||||
object_property_add(obj, "vout", "uint16", &uint16_type_info,
|
||||
adm1272_get,
|
||||
adm1272_set, NULL, &pmdev->pages[0].read_vout);
|
||||
|
||||
object_property_add(obj, "iout", "uint16", NULL,
|
||||
object_property_add(obj, "iout", "uint16", &uint16_type_info,
|
||||
adm1272_get,
|
||||
adm1272_set, NULL, &pmdev->pages[0].read_iout);
|
||||
|
||||
object_property_add(obj, "pin", "uint16", NULL,
|
||||
object_property_add(obj, "pin", "uint16", &uint16_type_info,
|
||||
adm1272_get,
|
||||
adm1272_set, NULL, &pmdev->pages[0].read_pin);
|
||||
|
||||
|
||||
+5
-4
@@ -22,6 +22,7 @@
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
@@ -251,16 +252,16 @@ static void emc141x_reset(DeviceState *dev)
|
||||
|
||||
static void emc141x_initfn(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "temperature0", "int", NULL,
|
||||
object_property_add(obj, "temperature0", "int", &int_type_info,
|
||||
emc141x_get_temperature,
|
||||
emc141x_set_temperature, NULL, NULL);
|
||||
object_property_add(obj, "temperature1", "int", NULL,
|
||||
object_property_add(obj, "temperature1", "int", &int_type_info,
|
||||
emc141x_get_temperature,
|
||||
emc141x_set_temperature, NULL, NULL);
|
||||
object_property_add(obj, "temperature2", "int", NULL,
|
||||
object_property_add(obj, "temperature2", "int", &int_type_info,
|
||||
emc141x_get_temperature,
|
||||
emc141x_set_temperature, NULL, NULL);
|
||||
object_property_add(obj, "temperature3", "int", NULL,
|
||||
object_property_add(obj, "temperature3", "int", &int_type_info,
|
||||
emc141x_get_temperature,
|
||||
emc141x_set_temperature, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/sensor/isl_pmbus_vr.h"
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -136,63 +137,63 @@ static void isl_pmbus_vr_add_props(Object *obj, uint64_t *flags, uint8_t pages)
|
||||
PMBusDevice *pmdev = PMBUS_DEVICE(obj);
|
||||
for (int i = 0; i < pages; i++) {
|
||||
if (flags[i] & PB_HAS_VIN) {
|
||||
object_property_add(obj, "vin[*]", "uint16", NULL,
|
||||
object_property_add(obj, "vin[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_vin);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_VOUT) {
|
||||
object_property_add(obj, "vout[*]", "uint16", NULL,
|
||||
object_property_add(obj, "vout[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_vout);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_IIN) {
|
||||
object_property_add(obj, "iin[*]", "uint16", NULL,
|
||||
object_property_add(obj, "iin[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_iin);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_IOUT) {
|
||||
object_property_add(obj, "iout[*]", "uint16", NULL,
|
||||
object_property_add(obj, "iout[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_iout);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_PIN) {
|
||||
object_property_add(obj, "pin[*]", "uint16", NULL,
|
||||
object_property_add(obj, "pin[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_pin);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_POUT) {
|
||||
object_property_add(obj, "pout[*]", "uint16", NULL,
|
||||
object_property_add(obj, "pout[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_pout);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_TEMPERATURE) {
|
||||
object_property_add(obj, "temp1[*]", "uint16", NULL,
|
||||
object_property_add(obj, "temp1[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_temperature_1);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_TEMP2) {
|
||||
object_property_add(obj, "temp2[*]", "uint16", NULL,
|
||||
object_property_add(obj, "temp2[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_temperature_2);
|
||||
}
|
||||
|
||||
if (flags[i] & PB_HAS_TEMP3) {
|
||||
object_property_add(obj, "temp3[*]", "uint16", NULL,
|
||||
object_property_add(obj, "temp3[*]", "uint16", &uint16_type_info,
|
||||
isl_pmbus_vr_get,
|
||||
isl_pmbus_vr_set,
|
||||
NULL, &pmdev->pages[i].read_temperature_3);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/log.h"
|
||||
@@ -509,19 +510,19 @@ static void lsm303dlhc_mag_reset(DeviceState *dev)
|
||||
*/
|
||||
static void lsm303dlhc_mag_initfn(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "mag-x", "int", NULL,
|
||||
object_property_add(obj, "mag-x", "int", &int_type_info,
|
||||
lsm303dlhc_mag_get_x,
|
||||
lsm303dlhc_mag_set_x, NULL, NULL);
|
||||
|
||||
object_property_add(obj, "mag-y", "int", NULL,
|
||||
object_property_add(obj, "mag-y", "int", &int_type_info,
|
||||
lsm303dlhc_mag_get_y,
|
||||
lsm303dlhc_mag_set_y, NULL, NULL);
|
||||
|
||||
object_property_add(obj, "mag-z", "int", NULL,
|
||||
object_property_add(obj, "mag-z", "int", &int_type_info,
|
||||
lsm303dlhc_mag_get_z,
|
||||
lsm303dlhc_mag_set_z, NULL, NULL);
|
||||
|
||||
object_property_add(obj, "temperature", "int", NULL,
|
||||
object_property_add(obj, "temperature", "int", &int_type_info,
|
||||
lsm303dlhc_mag_get_temperature,
|
||||
lsm303dlhc_mag_set_temperature, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "hw/core/irq.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -727,7 +728,7 @@ static void max34451_init(Object *obj)
|
||||
|
||||
/* get and set the voltage in millivolts, max is 32767 mV */
|
||||
for (int i = 0; i < MAX34451_NUM_PWR_DEVICES; i++) {
|
||||
object_property_add(obj, "vout[*]", "uint16", NULL,
|
||||
object_property_add(obj, "vout[*]", "uint16", &uint16_type_info,
|
||||
max34451_get,
|
||||
max34451_set, NULL, &pmdev->pages[i].read_vout);
|
||||
}
|
||||
@@ -737,7 +738,7 @@ static void max34451_init(Object *obj)
|
||||
* centidegrees Celsius i.e.: 2500 -> 25.00 C, max is 327.67 C
|
||||
*/
|
||||
for (int i = 0; i < MAX34451_NUM_TEMP_DEVICES; i++) {
|
||||
object_property_add(obj, "temperature[*]", "uint16", NULL,
|
||||
object_property_add(obj, "temperature[*]", "uint16", &uint16_type_info,
|
||||
max34451_get,
|
||||
max34451_set,
|
||||
NULL,
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qom/object.h"
|
||||
#include "hw/sensor/tmp105.h"
|
||||
@@ -408,7 +409,7 @@ static void tmp105_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
static void tmp105_initfn(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "temperature", "int", NULL,
|
||||
object_property_add(obj, "temperature", "int", &int_type_info,
|
||||
tmp105_get_temperature,
|
||||
tmp105_set_temperature, NULL, NULL);
|
||||
object_property_set_description(obj, "temperature",
|
||||
|
||||
+5
-4
@@ -28,6 +28,7 @@
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
@@ -350,16 +351,16 @@ static void tmp421_class_init(ObjectClass *klass, const void *data)
|
||||
dc->vmsd = &vmstate_tmp421;
|
||||
sc->dev = (DeviceInfo *) data;
|
||||
|
||||
object_class_property_add(klass, "temperature0", "int", NULL,
|
||||
object_class_property_add(klass, "temperature0", "int", &int_type_info,
|
||||
tmp421_get_temperature,
|
||||
tmp421_set_temperature, NULL, NULL);
|
||||
object_class_property_add(klass, "temperature1", "int", NULL,
|
||||
object_class_property_add(klass, "temperature1", "int", &int_type_info,
|
||||
tmp421_get_temperature,
|
||||
tmp421_set_temperature, NULL, NULL);
|
||||
object_class_property_add(klass, "temperature2", "int", NULL,
|
||||
object_class_property_add(klass, "temperature2", "int", &int_type_info,
|
||||
tmp421_get_temperature,
|
||||
tmp421_set_temperature, NULL, NULL);
|
||||
object_class_property_add(klass, "temperature3", "int", NULL,
|
||||
object_class_property_add(klass, "temperature3", "int", &int_type_info,
|
||||
tmp421_get_temperature,
|
||||
tmp421_set_temperature, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/usb/usb.h"
|
||||
#include "hw/usb/desc.h"
|
||||
@@ -122,7 +123,7 @@ out:
|
||||
|
||||
static void usb_msd_instance_init(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "bootindex", "int32", NULL,
|
||||
object_property_add(obj, "bootindex", "int32", &int32_type_info,
|
||||
usb_msd_get_bootindex,
|
||||
usb_msd_set_bootindex, NULL, NULL);
|
||||
object_property_set_int(obj, "bootindex", -1, NULL);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "hw/virtio/virtio-balloon.h"
|
||||
#include "system/address-spaces.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-events-machine.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "trace.h"
|
||||
@@ -1039,7 +1040,8 @@ static void virtio_balloon_instance_init(Object *obj)
|
||||
object_property_add(obj, "guest-stats", "guest statistics", NULL,
|
||||
balloon_stats_get_all, NULL, NULL, NULL);
|
||||
|
||||
object_property_add(obj, "guest-stats-polling-interval", "int", NULL,
|
||||
object_property_add(obj, "guest-stats-polling-interval", "int",
|
||||
&int_type_info,
|
||||
balloon_stats_get_poll_interval,
|
||||
balloon_stats_set_poll_interval,
|
||||
NULL, NULL);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "virtio-mem-pci.h"
|
||||
#include "hw/mem/memory-device.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-events-machine.h"
|
||||
#include "qapi/qapi-events-misc.h"
|
||||
|
||||
@@ -211,7 +212,8 @@ static void virtio_mem_pci_instance_init(Object *obj)
|
||||
OBJECT(&dev->vdev), VIRTIO_MEM_BLOCK_SIZE_PROP);
|
||||
object_property_add_alias(obj, VIRTIO_MEM_SIZE_PROP, OBJECT(&dev->vdev),
|
||||
VIRTIO_MEM_SIZE_PROP);
|
||||
object_property_add(obj, VIRTIO_MEM_REQUESTED_SIZE_PROP, "size", NULL,
|
||||
object_property_add(obj, VIRTIO_MEM_REQUESTED_SIZE_PROP, "size",
|
||||
&size_type_info,
|
||||
virtio_mem_pci_get_requested_size,
|
||||
virtio_mem_pci_set_requested_size, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "hw/virtio/virtio-bus.h"
|
||||
#include "hw/virtio/virtio-mem.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "migration/misc.h"
|
||||
#include "hw/core/boards.h"
|
||||
@@ -1533,13 +1534,16 @@ static void virtio_mem_instance_init(Object *obj)
|
||||
|
||||
notifier_list_init(&vmem->size_change_notifiers);
|
||||
|
||||
object_property_add(obj, VIRTIO_MEM_SIZE_PROP, "size", NULL,
|
||||
object_property_add(obj, VIRTIO_MEM_SIZE_PROP, "size",
|
||||
&size_type_info,
|
||||
virtio_mem_get_size,
|
||||
NULL, NULL, NULL);
|
||||
object_property_add(obj, VIRTIO_MEM_REQUESTED_SIZE_PROP, "size", NULL,
|
||||
object_property_add(obj, VIRTIO_MEM_REQUESTED_SIZE_PROP, "size",
|
||||
&size_type_info,
|
||||
virtio_mem_get_requested_size,
|
||||
virtio_mem_set_requested_size, NULL, NULL);
|
||||
object_property_add(obj, VIRTIO_MEM_BLOCK_SIZE_PROP, "size", NULL,
|
||||
object_property_add(obj, VIRTIO_MEM_BLOCK_SIZE_PROP, "size",
|
||||
&size_type_info,
|
||||
virtio_mem_get_block_size, virtio_mem_set_block_size,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "hw/core/boards.h"
|
||||
#include "hw/core/irq.h"
|
||||
@@ -413,7 +414,8 @@ void xen_pvh_class_setup_common_props(XenPVHMachineClass *xpc)
|
||||
|
||||
#define OC_MEMMAP_PROP_BASE(c, prop_name, name) \
|
||||
do { \
|
||||
object_class_property_add(c, prop_name "-base", "uint64_t", NULL, \
|
||||
object_class_property_add(c, prop_name "-base", "uint64_t", \
|
||||
&uint64_type_info, \
|
||||
xen_pvh_get_ ## name ## _base, \
|
||||
xen_pvh_set_ ## name ## _base, NULL, NULL); \
|
||||
object_class_property_set_description(oc, prop_name "-base", \
|
||||
@@ -422,7 +424,8 @@ do { \
|
||||
|
||||
#define OC_MEMMAP_PROP_SIZE(c, prop_name, name) \
|
||||
do { \
|
||||
object_class_property_add(c, prop_name "-size", "uint64_t", NULL, \
|
||||
object_class_property_add(c, prop_name "-size", "uint64_t", \
|
||||
&uint64_type_info, \
|
||||
xen_pvh_get_ ## name ## _size, \
|
||||
xen_pvh_set_ ## name ## _size, NULL, NULL); \
|
||||
object_class_property_set_description(oc, prop_name "-size", \
|
||||
@@ -458,7 +461,8 @@ do { \
|
||||
OC_MEMMAP_PROP(oc, "pci-mmio", pci_mmio);
|
||||
OC_MEMMAP_PROP(oc, "pci-mmio-high", pci_mmio_high);
|
||||
|
||||
object_class_property_add(oc, "pci-intx-irq-base", "uint32_t", NULL,
|
||||
object_class_property_add(oc, "pci-intx-irq-base", "uint32_t",
|
||||
&uint32_type_info,
|
||||
xen_pvh_get_pci_intx_irq_base,
|
||||
xen_pvh_set_pci_intx_irq_base,
|
||||
NULL, NULL);
|
||||
@@ -468,7 +472,8 @@ do { \
|
||||
|
||||
#ifdef CONFIG_TPM
|
||||
if (xpc->has_tpm) {
|
||||
object_class_property_add(oc, "tpm-base-addr", "uint64_t", NULL,
|
||||
object_class_property_add(oc, "tpm-base-addr", "uint64_t",
|
||||
&uint64_type_info,
|
||||
xen_pvh_get_tpm_base,
|
||||
xen_pvh_set_tpm_base,
|
||||
NULL, NULL);
|
||||
|
||||
+5
-4
@@ -20,6 +20,7 @@
|
||||
#include "system/event-loop-base.h"
|
||||
#include "system/iothread.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-commands-misc.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/rcu.h"
|
||||
@@ -315,19 +316,19 @@ static void iothread_class_init(ObjectClass *klass, const void *class_data)
|
||||
bc->init = iothread_init;
|
||||
bc->update_params = iothread_set_aio_context_params;
|
||||
|
||||
object_class_property_add(klass, "poll-max-ns", "int64", NULL,
|
||||
object_class_property_add(klass, "poll-max-ns", "int64", &int64_type_info,
|
||||
iothread_get_poll_param,
|
||||
iothread_set_poll_param,
|
||||
NULL, &poll_max_ns_info);
|
||||
object_class_property_add(klass, "poll-grow", "int64", NULL,
|
||||
object_class_property_add(klass, "poll-grow", "int64", &int64_type_info,
|
||||
iothread_get_poll_param,
|
||||
iothread_set_poll_param,
|
||||
NULL, &poll_grow_info);
|
||||
object_class_property_add(klass, "poll-shrink", "int64", NULL,
|
||||
object_class_property_add(klass, "poll-shrink", "int64", &int64_type_info,
|
||||
iothread_get_poll_param,
|
||||
iothread_set_poll_param,
|
||||
NULL, &poll_shrink_info);
|
||||
object_class_property_add(klass, "poll-weight", "int64", NULL,
|
||||
object_class_property_add(klass, "poll-weight", "int64", &int64_type_info,
|
||||
iothread_get_poll_param,
|
||||
iothread_set_poll_param,
|
||||
NULL, &poll_weight_info);
|
||||
|
||||
+4
-3
@@ -16,6 +16,7 @@
|
||||
#include "qemu/error-report.h"
|
||||
#include "trace.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "net/net.h"
|
||||
#include "net/eth.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
@@ -1373,15 +1374,15 @@ static void colo_compare_init(Object *obj)
|
||||
object_property_add_str(obj, "notify_dev",
|
||||
compare_get_notify_dev, compare_set_notify_dev);
|
||||
|
||||
object_property_add(obj, "compare_timeout", "uint64", NULL,
|
||||
object_property_add(obj, "compare_timeout", "uint64", &uint64_type_info,
|
||||
compare_get_timeout,
|
||||
compare_set_timeout, NULL, NULL);
|
||||
|
||||
object_property_add(obj, "expired_scan_cycle", "uint32", NULL,
|
||||
object_property_add(obj, "expired_scan_cycle", "uint32", &uint32_type_info,
|
||||
compare_get_expired_scan_cycle,
|
||||
compare_set_expired_scan_cycle, NULL, NULL);
|
||||
|
||||
object_property_add(obj, "max_queue_size", "uint32", NULL,
|
||||
object_property_add(obj, "max_queue_size", "uint32", &uint32_type_info,
|
||||
get_max_queue_size,
|
||||
set_max_queue_size, NULL, NULL);
|
||||
|
||||
|
||||
+2
-1
@@ -25,6 +25,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "clients.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -238,7 +239,7 @@ static void filter_dump_class_init(ObjectClass *oc, const void *data)
|
||||
{
|
||||
NetFilterClass *nfc = NETFILTER_CLASS(oc);
|
||||
|
||||
object_class_property_add(oc, "maxlen", "uint32", NULL,
|
||||
object_class_property_add(oc, "maxlen", "uint32", &uint32_type_info,
|
||||
filter_dump_get_maxlen,
|
||||
filter_dump_set_maxlen, NULL, NULL);
|
||||
object_class_property_add_str(oc, "file", file_dump_get_filename,
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@
|
||||
#include "net/filter.h"
|
||||
#include "net/queue.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "qapi/qapi-builtin-visit.h"
|
||||
@@ -182,7 +183,7 @@ static void filter_buffer_class_init(ObjectClass *oc, const void *data)
|
||||
{
|
||||
NetFilterClass *nfc = NETFILTER_CLASS(oc);
|
||||
|
||||
object_class_property_add(oc, "interval", "uint32", NULL,
|
||||
object_class_property_add(oc, "interval", "uint32", &uint32_type_info,
|
||||
filter_buffer_get_interval,
|
||||
filter_buffer_set_interval, NULL, NULL);
|
||||
|
||||
|
||||
+18
-18
@@ -22,10 +22,10 @@
|
||||
#include "qapi/string-output-visitor.h"
|
||||
#include "qapi/qobject-input-visitor.h"
|
||||
#include "qapi/forward-visitor.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-builtin-visit.h"
|
||||
#include "qapi/compat-policy.h"
|
||||
#include "qobject/qdict.h"
|
||||
#include "qobject/qjson.h"
|
||||
#include "qemu/id.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "trace.h"
|
||||
@@ -2406,7 +2406,7 @@ object_property_add_str(Object *obj, const char *name,
|
||||
prop->get = get;
|
||||
prop->set = set;
|
||||
|
||||
return object_property_add(obj, name, "string", NULL,
|
||||
return object_property_add(obj, name, "string", &str_type_info,
|
||||
get ? property_get_str : NULL,
|
||||
set ? property_set_str : NULL,
|
||||
property_release_data,
|
||||
@@ -2424,7 +2424,7 @@ object_class_property_add_str(ObjectClass *klass, const char *name,
|
||||
prop->get = get;
|
||||
prop->set = set;
|
||||
|
||||
return object_class_property_add(klass, name, "string", NULL,
|
||||
return object_class_property_add(klass, name, "string", &str_type_info,
|
||||
get ? property_get_str : NULL,
|
||||
set ? property_set_str : NULL,
|
||||
NULL,
|
||||
@@ -2476,7 +2476,7 @@ object_property_add_bool(Object *obj, const char *name,
|
||||
prop->get = get;
|
||||
prop->set = set;
|
||||
|
||||
return object_property_add(obj, name, "bool", NULL,
|
||||
return object_property_add(obj, name, "bool", &bool_type_info,
|
||||
get ? property_get_bool : NULL,
|
||||
set ? property_set_bool : NULL,
|
||||
property_release_data,
|
||||
@@ -2493,7 +2493,7 @@ object_class_property_add_bool(ObjectClass *klass, const char *name,
|
||||
prop->get = get;
|
||||
prop->set = set;
|
||||
|
||||
return object_class_property_add(klass, name, "bool", NULL,
|
||||
return object_class_property_add(klass, name, "bool", &bool_type_info,
|
||||
get ? property_get_bool : NULL,
|
||||
set ? property_set_bool : NULL,
|
||||
NULL,
|
||||
@@ -2817,7 +2817,7 @@ object_class_property_add_bool_ptr(ObjectClass *klass, const char *name,
|
||||
setter = property_class_set_bool_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "bool", NULL,
|
||||
return object_class_property_add(klass, name, "bool", &bool_type_info,
|
||||
getter, setter, NULL, (void *)offset);
|
||||
}
|
||||
|
||||
@@ -2837,7 +2837,7 @@ object_property_add_uint8_ptr(Object *obj, const char *name,
|
||||
setter = property_set_uint8_ptr;
|
||||
}
|
||||
|
||||
return object_property_add(obj, name, "uint8", NULL,
|
||||
return object_property_add(obj, name, "uint8", &uint8_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
@@ -2857,7 +2857,7 @@ object_class_property_add_uint8_ptr(ObjectClass *klass, const char *name,
|
||||
setter = property_class_set_uint8_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint8", NULL,
|
||||
return object_class_property_add(klass, name, "uint8", &uint8_type_info,
|
||||
getter, setter, NULL, (void *)offset);
|
||||
}
|
||||
|
||||
@@ -2878,7 +2878,7 @@ object_class_static_property_add_uint8_ptr(ObjectClass *klass,
|
||||
setter = property_set_uint8_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint8", NULL,
|
||||
return object_class_property_add(klass, name, "uint8", &uint8_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
@@ -2898,7 +2898,7 @@ object_property_add_uint16_ptr(Object *obj, const char *name,
|
||||
setter = property_set_uint16_ptr;
|
||||
}
|
||||
|
||||
return object_property_add(obj, name, "uint16", NULL,
|
||||
return object_property_add(obj, name, "uint16", &uint16_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
@@ -2918,7 +2918,7 @@ object_class_property_add_uint16_ptr(ObjectClass *klass, const char *name,
|
||||
setter = property_class_set_uint16_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint16", NULL,
|
||||
return object_class_property_add(klass, name, "uint16", &uint16_type_info,
|
||||
getter, setter, NULL, (void *)offset);
|
||||
}
|
||||
|
||||
@@ -2939,7 +2939,7 @@ object_class_static_property_add_uint16_ptr(ObjectClass *klass,
|
||||
setter = property_set_uint16_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint16", NULL,
|
||||
return object_class_property_add(klass, name, "uint16", &uint16_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
@@ -2959,7 +2959,7 @@ object_property_add_uint32_ptr(Object *obj, const char *name,
|
||||
setter = property_set_uint32_ptr;
|
||||
}
|
||||
|
||||
return object_property_add(obj, name, "uint32", NULL,
|
||||
return object_property_add(obj, name, "uint32", &uint32_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
@@ -2979,7 +2979,7 @@ object_class_property_add_uint32_ptr(ObjectClass *klass, const char *name,
|
||||
setter = property_class_set_uint32_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint32", NULL,
|
||||
return object_class_property_add(klass, name, "uint32", &uint32_type_info,
|
||||
getter, setter, NULL, (void *)offset);
|
||||
}
|
||||
|
||||
@@ -3000,7 +3000,7 @@ object_class_static_property_add_uint32_ptr(ObjectClass *klass,
|
||||
setter = property_set_uint32_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint32", NULL,
|
||||
return object_class_property_add(klass, name, "uint32", &uint32_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
@@ -3020,7 +3020,7 @@ object_property_add_uint64_ptr(Object *obj, const char *name,
|
||||
setter = property_set_uint64_ptr;
|
||||
}
|
||||
|
||||
return object_property_add(obj, name, "uint64", NULL,
|
||||
return object_property_add(obj, name, "uint64", &uint64_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
@@ -3040,7 +3040,7 @@ object_class_property_add_uint64_ptr(ObjectClass *klass, const char *name,
|
||||
setter = property_class_set_uint64_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint64", NULL,
|
||||
return object_class_property_add(klass, name, "uint64", &uint64_type_info,
|
||||
getter, setter, NULL, (void *)offset);
|
||||
}
|
||||
|
||||
@@ -3061,7 +3061,7 @@ object_class_static_property_add_uint64_ptr(ObjectClass *klass,
|
||||
setter = property_set_uint64_ptr;
|
||||
}
|
||||
|
||||
return object_class_property_add(klass, name, "uint64", NULL,
|
||||
return object_class_property_add(klass, name, "uint64", &uint64_type_info,
|
||||
getter, setter, NULL, (void *)v);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "system/system.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/error-report.h"
|
||||
@@ -336,7 +337,7 @@ void device_add_bootindex_property(Object *obj, int32_t *bootindex,
|
||||
prop->suffix = suffix;
|
||||
prop->dev = dev;
|
||||
|
||||
object_property_add(obj, name, "int32", NULL,
|
||||
object_property_add(obj, name, "int32", &int32_type_info,
|
||||
device_get_bootindex,
|
||||
device_set_bootindex,
|
||||
property_release_bootindex,
|
||||
|
||||
+3
-2
@@ -16,6 +16,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "system/memory.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/bitops.h"
|
||||
@@ -1293,11 +1294,11 @@ static void memory_region_initfn(Object *obj)
|
||||
|
||||
object_property_add_uint64_ptr(OBJECT(mr), "addr",
|
||||
&mr->addr, OBJ_PROP_FLAG_READ);
|
||||
object_property_add(OBJECT(mr), "priority", "int32", NULL,
|
||||
object_property_add(OBJECT(mr), "priority", "int32", &int32_type_info,
|
||||
memory_region_get_priority,
|
||||
NULL, /* memory_region_set_priority */
|
||||
NULL, NULL);
|
||||
object_property_add(OBJECT(mr), "size", "uint64", NULL,
|
||||
object_property_add(OBJECT(mr), "size", "uint64", &uint64_type_info,
|
||||
memory_region_get_size,
|
||||
NULL, /* memory_region_set_size, */
|
||||
NULL, NULL);
|
||||
|
||||
+11
-5
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "cpu.h"
|
||||
#include "cpregs.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -328,7 +329,8 @@ static void prop_bool_set_false(Object *obj, Visitor *v, const char *name,
|
||||
|
||||
static void prop_add_stub_bool(Object *obj, const char *name)
|
||||
{
|
||||
object_property_add(obj, name, "bool", NULL, prop_bool_get_false,
|
||||
object_property_add(obj, name, "bool", &bool_type_info,
|
||||
prop_bool_get_false,
|
||||
prop_bool_set_false, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -518,13 +520,15 @@ void aarch64_add_sve_properties(Object *obj)
|
||||
for (vq = 1; vq <= ARM_MAX_VQ; ++vq) {
|
||||
char name[8];
|
||||
snprintf(name, sizeof(name), "sve%d", vq * 128);
|
||||
object_property_add(obj, name, "bool", NULL, cpu_arm_get_vq,
|
||||
object_property_add(obj, name, "bool", &bool_type_info,
|
||||
cpu_arm_get_vq,
|
||||
cpu_arm_set_vq, NULL, &cpu->sve_vq);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
/* Mirror linux /proc/sys/abi/sve_default_vector_length. */
|
||||
object_property_add(obj, "sve-default-vector-length", "int32", NULL,
|
||||
object_property_add(obj, "sve-default-vector-length", "int32",
|
||||
&int32_type_info,
|
||||
cpu_arm_get_default_vec_len,
|
||||
cpu_arm_set_default_vec_len, NULL,
|
||||
&cpu->sve_default_vq);
|
||||
@@ -543,13 +547,15 @@ void aarch64_add_sme_properties(Object *obj)
|
||||
for (vq = 1; vq <= ARM_MAX_VQ; vq <<= 1) {
|
||||
char name[8];
|
||||
snprintf(name, sizeof(name), "sme%d", vq * 128);
|
||||
object_property_add(obj, name, "bool", NULL, cpu_arm_get_vq,
|
||||
object_property_add(obj, name, "bool", &bool_type_info,
|
||||
cpu_arm_get_vq,
|
||||
cpu_arm_set_vq, NULL, &cpu->sme_vq);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
/* Mirror linux /proc/sys/abi/sme_default_vector_length. */
|
||||
object_property_add(obj, "sme-default-vector-length", "int32", NULL,
|
||||
object_property_add(obj, "sme-default-vector-length", "int32",
|
||||
&int32_type_info,
|
||||
cpu_arm_get_default_vec_len,
|
||||
cpu_arm_set_default_vec_len, NULL,
|
||||
&cpu->sme_default_vq);
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qom/object.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "system/system.h"
|
||||
#include "system/runstate.h"
|
||||
#include "system/ramblock.h"
|
||||
@@ -1820,7 +1821,7 @@ static void kvm_arch_set_eager_split_size(Object *obj, Visitor *v,
|
||||
|
||||
void kvm_arch_accel_class_init(ObjectClass *oc)
|
||||
{
|
||||
object_class_property_add(oc, "eager-split-size", "size", NULL,
|
||||
object_class_property_add(oc, "eager-split-size", "size", &size_type_info,
|
||||
kvm_arch_get_eager_split_size,
|
||||
kvm_arch_set_eager_split_size, NULL, NULL);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "cpu.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qapi/visitor.h"
|
||||
@@ -1392,7 +1393,7 @@ void aarch64_max_v8_tcg_initfn(Object *obj)
|
||||
/* v8.2: FEAT_SVE */
|
||||
cpu->sve_vq.supported = MAKE_64BIT_MASK(0, ARM_MAX_VQ);
|
||||
aarch64_add_sve_properties(OBJECT(cpu));
|
||||
object_property_add(OBJECT(cpu), "sve-max-vq", "uint32", NULL,
|
||||
object_property_add(OBJECT(cpu), "sve-max-vq", "uint32", &uint32_type_info,
|
||||
cpu_max_get_sve_max_vq, cpu_max_set_sve_max_vq,
|
||||
NULL, NULL);
|
||||
|
||||
@@ -1529,7 +1530,8 @@ void aarch64_max_v9_tcg_initfn(Object *obj)
|
||||
object_property_add_bool(obj, "x-rme", cpu_arm_get_rme, cpu_arm_set_rme);
|
||||
|
||||
/* v9.4: FEAT_RME_GPC2 */
|
||||
object_property_add(obj, "x-l0gptsz", "uint32", NULL, cpu_max_get_l0gptsz,
|
||||
object_property_add(obj, "x-l0gptsz", "uint32", &uint32_type_info,
|
||||
cpu_max_get_l0gptsz,
|
||||
cpu_max_set_l0gptsz, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
+7
-6
@@ -10486,7 +10486,7 @@ static void x86_cpu_register_bit_prop(X86CPUClass *xcc,
|
||||
fp = g_new0(BitProperty, 1);
|
||||
fp->w = w;
|
||||
fp->mask = mask;
|
||||
object_class_property_add(oc, prop_name, "bool", NULL,
|
||||
object_class_property_add(oc, prop_name, "bool", &bool_type_info,
|
||||
x86_cpu_get_bit_prop,
|
||||
x86_cpu_set_bit_prop,
|
||||
NULL, fp);
|
||||
@@ -11009,13 +11009,13 @@ static void x86_cpu_common_class_init(ObjectClass *oc, const void *data)
|
||||
|
||||
dc->user_creatable = true;
|
||||
|
||||
object_class_property_add(oc, "family", "uint64", NULL,
|
||||
object_class_property_add(oc, "family", "uint64", &uint64_type_info,
|
||||
x86_cpuid_version_get_family,
|
||||
x86_cpuid_version_set_family, NULL, NULL);
|
||||
object_class_property_add(oc, "model", "uint64", NULL,
|
||||
object_class_property_add(oc, "model", "uint64", &uint64_type_info,
|
||||
x86_cpuid_version_get_model,
|
||||
x86_cpuid_version_set_model, NULL, NULL);
|
||||
object_class_property_add(oc, "stepping", "uint64", NULL,
|
||||
object_class_property_add(oc, "stepping", "uint64", &uint64_type_info,
|
||||
x86_cpuid_version_get_stepping,
|
||||
x86_cpuid_version_set_stepping, NULL, NULL);
|
||||
object_class_property_add_str(oc, "vendor",
|
||||
@@ -11024,7 +11024,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_add_str(oc, "model-id",
|
||||
x86_cpuid_get_model_id,
|
||||
x86_cpuid_set_model_id);
|
||||
object_class_property_add(oc, "tsc-frequency", "int", NULL,
|
||||
object_class_property_add(oc, "tsc-frequency", "int", &int_type_info,
|
||||
x86_cpuid_get_tsc_freq,
|
||||
x86_cpuid_set_tsc_freq, NULL, NULL);
|
||||
/*
|
||||
@@ -11037,7 +11037,8 @@ static void x86_cpu_common_class_init(ObjectClass *oc, const void *data)
|
||||
x86_cpu_get_unavailable_features,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
object_class_property_add(oc, "avx10-version", "uint8", NULL,
|
||||
object_class_property_add(oc, "avx10-version", "uint8",
|
||||
&uint8_type_info,
|
||||
x86_cpuid_get_avx10_version,
|
||||
x86_cpuid_set_avx10_version,
|
||||
NULL, NULL);
|
||||
|
||||
@@ -7107,7 +7107,7 @@ void kvm_arch_accel_class_init(ObjectClass *oc)
|
||||
object_class_property_set_description(oc, "notify-vmexit",
|
||||
"Enable notify VM exit");
|
||||
|
||||
object_class_property_add(oc, "notify-window", "uint32", NULL,
|
||||
object_class_property_add(oc, "notify-window", "uint32", &uint32_type_info,
|
||||
kvm_arch_get_notify_window,
|
||||
kvm_arch_set_notify_window,
|
||||
NULL, NULL);
|
||||
@@ -7115,7 +7115,7 @@ void kvm_arch_accel_class_init(ObjectClass *oc)
|
||||
"Clock cycles without an event window "
|
||||
"after which a notification VM exit occurs");
|
||||
|
||||
object_class_property_add(oc, "xen-version", "uint32", NULL,
|
||||
object_class_property_add(oc, "xen-version", "uint32", &uint32_type_info,
|
||||
kvm_arch_get_xen_version,
|
||||
kvm_arch_set_xen_version,
|
||||
NULL, NULL);
|
||||
@@ -7124,14 +7124,16 @@ void kvm_arch_accel_class_init(ObjectClass *oc)
|
||||
"(in XENVER_version form "
|
||||
"e.g. 0x4000a for 4.10)");
|
||||
|
||||
object_class_property_add(oc, "xen-gnttab-max-frames", "uint16", NULL,
|
||||
object_class_property_add(oc, "xen-gnttab-max-frames", "uint16",
|
||||
&uint16_type_info,
|
||||
kvm_arch_get_xen_gnttab_max_frames,
|
||||
kvm_arch_set_xen_gnttab_max_frames,
|
||||
NULL, NULL);
|
||||
object_class_property_set_description(oc, "xen-gnttab-max-frames",
|
||||
"Maximum number of grant table frames");
|
||||
|
||||
object_class_property_add(oc, "xen-evtchn-max-pirq", "uint16", NULL,
|
||||
object_class_property_add(oc, "xen-evtchn-max-pirq", "uint16",
|
||||
&uint16_type_info,
|
||||
kvm_arch_get_xen_evtchn_max_pirq,
|
||||
kvm_arch_set_xen_evtchn_max_pirq,
|
||||
NULL, NULL);
|
||||
|
||||
+4
-3
@@ -3051,7 +3051,8 @@ sev_guest_instance_init(Object *obj)
|
||||
sev_guest->policy = DEFAULT_GUEST_POLICY;
|
||||
object_property_add_uint32_ptr(obj, "handle", &sev_guest->handle,
|
||||
OBJ_PROP_FLAG_READWRITE);
|
||||
object_property_add(obj, "policy", "uint32", NULL, sev_guest_get_policy,
|
||||
object_property_add(obj, "policy", "uint32", &uint32_type_info,
|
||||
sev_guest_get_policy,
|
||||
sev_guest_set_policy, NULL, NULL);
|
||||
object_apply_compat_props(obj);
|
||||
|
||||
@@ -3329,7 +3330,7 @@ sev_snp_guest_class_init(ObjectClass *oc, const void *data)
|
||||
x86_klass->adjust_cpuid_features = sev_snp_adjust_cpuid_features;
|
||||
x86_klass->kvm_type = sev_snp_kvm_type;
|
||||
|
||||
object_class_property_add(oc, "policy", "uint64", NULL,
|
||||
object_class_property_add(oc, "policy", "uint64", &uint64_type_info,
|
||||
sev_snp_guest_get_policy,
|
||||
sev_snp_guest_set_policy, NULL, NULL);
|
||||
object_class_property_add_str(oc, "guest-visible-workarounds",
|
||||
@@ -3353,7 +3354,7 @@ sev_snp_guest_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_add_bool(oc, "secure-tsc",
|
||||
sev_snp_guest_get_secure_tsc,
|
||||
sev_snp_guest_set_secure_tsc);
|
||||
object_class_property_add(oc, "tsc-frequency", "uint32", NULL,
|
||||
object_class_property_add(oc, "tsc-frequency", "uint32", &uint64_type_info,
|
||||
sev_snp_guest_get_tsc_frequency,
|
||||
sev_snp_guest_set_tsc_frequency, NULL, NULL);
|
||||
}
|
||||
|
||||
+2
-1
@@ -23,6 +23,7 @@
|
||||
#include "kvm_ppc.h"
|
||||
#include "system/cpus.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "cpu-models.h"
|
||||
@@ -335,7 +336,7 @@ void ppc_compat_add_property(Object *obj, const char *name,
|
||||
gchar *names, *desc;
|
||||
int i;
|
||||
|
||||
object_property_add(obj, name, "string", NULL,
|
||||
object_property_add(obj, name, "string", &str_type_info,
|
||||
ppc_compat_prop_get, ppc_compat_prop_set, NULL,
|
||||
compat_pvr);
|
||||
|
||||
|
||||
+13
-6
@@ -29,6 +29,7 @@
|
||||
#include "target/riscv/tcg/csr.h"
|
||||
#include "internals.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/timer.h"
|
||||
@@ -1412,20 +1413,26 @@ void riscv_add_satp_mode_properties(Object *obj)
|
||||
{
|
||||
RISCVCPU *cpu = RISCV_CPU(obj);
|
||||
|
||||
object_property_add(obj, "svbare", "bool", NULL, cpu_riscv_get_satp,
|
||||
object_property_add(obj, "svbare", "bool", &bool_type_info,
|
||||
cpu_riscv_get_satp,
|
||||
cpu_riscv_set_satp, NULL, &cpu->satp_modes);
|
||||
|
||||
if (cpu->env.misa_mxl == MXL_RV32) {
|
||||
object_property_add(obj, "sv32", "bool", NULL, cpu_riscv_get_satp,
|
||||
object_property_add(obj, "sv32", "bool", &bool_type_info,
|
||||
cpu_riscv_get_satp,
|
||||
cpu_riscv_set_satp, NULL, &cpu->satp_modes);
|
||||
} else {
|
||||
object_property_add(obj, "sv39", "bool", NULL, cpu_riscv_get_satp,
|
||||
object_property_add(obj, "sv39", "bool", &bool_type_info,
|
||||
cpu_riscv_get_satp,
|
||||
cpu_riscv_set_satp, NULL, &cpu->satp_modes);
|
||||
object_property_add(obj, "sv48", "bool", NULL, cpu_riscv_get_satp,
|
||||
object_property_add(obj, "sv48", "bool", &bool_type_info,
|
||||
cpu_riscv_get_satp,
|
||||
cpu_riscv_set_satp, NULL, &cpu->satp_modes);
|
||||
object_property_add(obj, "sv57", "bool", NULL, cpu_riscv_get_satp,
|
||||
object_property_add(obj, "sv57", "bool", &bool_type_info,
|
||||
cpu_riscv_get_satp,
|
||||
cpu_riscv_set_satp, NULL, &cpu->satp_modes);
|
||||
object_property_add(obj, "sv64", "bool", NULL, cpu_riscv_get_satp,
|
||||
object_property_add(obj, "sv64", "bool", &bool_type_info,
|
||||
cpu_riscv_get_satp,
|
||||
cpu_riscv_set_satp, NULL, &cpu->satp_modes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "qemu/timer.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "qemu/target-info.h"
|
||||
@@ -541,7 +542,7 @@ static void riscv_cpu_add_kvm_unavail_prop(Object *obj, const char *prop_name)
|
||||
* unknown to KVM and error out if the user attempts
|
||||
* to enable any of them.
|
||||
*/
|
||||
object_property_add(obj, prop_name, "bool", NULL,
|
||||
object_property_add(obj, prop_name, "bool", &bool_type_info,
|
||||
cpu_get_cfg_unavailable,
|
||||
cpu_set_cfg_unavailable,
|
||||
NULL, (void *)prop_name);
|
||||
@@ -561,7 +562,7 @@ static void kvm_riscv_add_cpu_user_properties(Object *cpu_obj)
|
||||
misa_cfg->name = riscv_get_misa_ext_name(bit);
|
||||
misa_cfg->description = riscv_get_misa_ext_description(bit);
|
||||
|
||||
object_property_add(cpu_obj, misa_cfg->name, "bool", NULL,
|
||||
object_property_add(cpu_obj, misa_cfg->name, "bool", &bool_type_info,
|
||||
kvm_cpu_get_misa_ext_cfg,
|
||||
kvm_cpu_set_misa_ext_cfg,
|
||||
NULL, misa_cfg);
|
||||
@@ -577,7 +578,7 @@ static void kvm_riscv_add_cpu_user_properties(Object *cpu_obj)
|
||||
for (i = 0; i < ARRAY_SIZE(kvm_multi_ext_cfgs); i++) {
|
||||
KVMCPUConfig *multi_cfg = &kvm_multi_ext_cfgs[i];
|
||||
|
||||
object_property_add(cpu_obj, multi_cfg->name, "bool", NULL,
|
||||
object_property_add(cpu_obj, multi_cfg->name, "bool", &bool_type_info,
|
||||
kvm_cpu_get_multi_ext_cfg,
|
||||
kvm_cpu_set_multi_ext_cfg,
|
||||
NULL, multi_cfg);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "pmu.h"
|
||||
#include "time_helper.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/accel.h"
|
||||
#include "qemu/error-report.h"
|
||||
@@ -1478,7 +1479,7 @@ static void riscv_cpu_add_misa_properties(Object *cpu_obj)
|
||||
continue;
|
||||
}
|
||||
|
||||
object_property_add(cpu_obj, name, "bool", NULL,
|
||||
object_property_add(cpu_obj, name, "bool", &bool_type_info,
|
||||
cpu_get_misa_ext_cfg,
|
||||
cpu_set_misa_ext_cfg,
|
||||
NULL, (void *)misa_cfg);
|
||||
@@ -1532,7 +1533,7 @@ static void riscv_cpu_add_profiles(Object *cpu_obj)
|
||||
for (int i = 0; riscv_profiles[i] != NULL; i++) {
|
||||
RISCVCPUProfile *profile = riscv_profiles[i];
|
||||
|
||||
object_property_add(cpu_obj, profile->name, "bool", NULL,
|
||||
object_property_add(cpu_obj, profile->name, "bool", &bool_type_info,
|
||||
cpu_get_profile, cpu_set_profile,
|
||||
NULL, (void *)profile);
|
||||
|
||||
@@ -1608,7 +1609,7 @@ static void riscv_cpu_add_user_properties(Object *obj)
|
||||
|
||||
for (edata = isa_edata_arr; edata && edata->name; edata++) {
|
||||
if (edata->prop_name) {
|
||||
object_property_add(obj, edata->prop_name, "bool", NULL,
|
||||
object_property_add(obj, edata->prop_name, "bool", &bool_type_info,
|
||||
cpu_get_multi_ext_cfg,
|
||||
cpu_set_multi_ext_cfg,
|
||||
NULL, (void *)&edata->ext_enable_offset);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "system/kvm.h"
|
||||
#include "system/tcg.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/module.h"
|
||||
@@ -792,13 +793,14 @@ void s390_cpu_model_class_register_props(ObjectClass *oc)
|
||||
|
||||
for (feat = 0; feat < S390_FEAT_MAX; feat++) {
|
||||
const S390FeatDef *def = s390_feat_def(feat);
|
||||
object_class_property_add(oc, def->name, "bool", NULL, get_feature,
|
||||
object_class_property_add(oc, def->name, "bool", &bool_type_info,
|
||||
get_feature,
|
||||
set_feature, NULL, (void *) feat);
|
||||
object_class_property_set_description(oc, def->name, def->desc);
|
||||
}
|
||||
for (group = 0; group < S390_FEAT_GROUP_MAX; group++) {
|
||||
const S390FeatGroupDef *def = s390_feat_group_def(group);
|
||||
object_class_property_add(oc, def->name, "bool", NULL,
|
||||
object_class_property_add(oc, def->name, "bool", &bool_type_info,
|
||||
get_feature_group,
|
||||
set_feature_group, NULL, (void *) group);
|
||||
object_class_property_set_description(oc, def->name, def->desc);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "hw/core/qdev-properties.h"
|
||||
#include "qom/object.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/visitor.h"
|
||||
|
||||
|
||||
@@ -171,11 +172,11 @@ static void prop2_accessor(Object *obj, Visitor *v, const char *name,
|
||||
|
||||
static void dynamic_instance_init(Object *obj)
|
||||
{
|
||||
object_property_add(obj, "prop1", "uint32", NULL, prop1_accessor,
|
||||
prop1_accessor,
|
||||
object_property_add(obj, "prop1", "uint32", &uint32_type_info,
|
||||
prop1_accessor, prop1_accessor,
|
||||
NULL, NULL);
|
||||
object_property_add(obj, "prop2", "uint32", NULL, prop2_accessor,
|
||||
prop2_accessor,
|
||||
object_property_add(obj, "prop2", "uint32", &uint32_type_info,
|
||||
prop2_accessor, prop2_accessor,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@
|
||||
#include "ui/vgafont.h"
|
||||
#include "hw/core/qdev.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-commands-ui.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/coroutine.h"
|
||||
@@ -535,7 +536,7 @@ qemu_graphic_console_class_init(ObjectClass *oc, const void *data)
|
||||
offsetof(QemuGraphicConsole, device),
|
||||
object_property_allow_set_link,
|
||||
OBJ_PROP_LINK_STRONG);
|
||||
object_class_property_add(oc, "head", "uint32", NULL,
|
||||
object_class_property_add(oc, "head", "uint32", &uint32_type_info,
|
||||
qemu_graphic_console_prop_get_head,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/thread-context.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-builtin-visit.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/config-file.h"
|
||||
@@ -278,13 +279,16 @@ static void thread_context_class_init(ObjectClass *oc, const void *data)
|
||||
UserCreatableClass *ucc = USER_CREATABLE_CLASS(oc);
|
||||
|
||||
ucc->complete = thread_context_instance_complete;
|
||||
object_class_property_add(oc, "thread-id", "uint64", NULL,
|
||||
object_class_property_add(oc, "thread-id", "uint64",
|
||||
&uint64_type_info,
|
||||
thread_context_get_thread_id, NULL, NULL,
|
||||
NULL);
|
||||
object_class_property_add(oc, "cpu-affinity", "[uint16]", NULL,
|
||||
object_class_property_add(oc, "cpu-affinity", "[uint16]",
|
||||
&uint16List_type_info,
|
||||
thread_context_get_cpu_affinity,
|
||||
thread_context_set_cpu_affinity, NULL, NULL);
|
||||
object_class_property_add(oc, "node-affinity", "[uint16]", NULL, NULL,
|
||||
object_class_property_add(oc, "node-affinity", "[uint16]",
|
||||
&uint16List_type_info, NULL,
|
||||
thread_context_set_node_affinity, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user