summaryrefslogtreecommitdiff
path: root/hw/core/qdev-properties-system.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-05 21:52:37 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-05 21:52:37 +0100
commit26edf8cc08e2ec15d9e65bb0dd4fbac22edd730b (patch)
treea010815e0435a73d2a6347b5b75ee3f6ece1c788 /hw/core/qdev-properties-system.c
parent31e25e3e5701607a2a88b5b6c5fb1057b20941fd (diff)
parent711e2f1e9ecad845e142fdddbbf1e8037bce902b (diff)
downloadqemu-26edf8cc08e2ec15d9e65bb0dd4fbac22edd730b.tar.gz
qemu-26edf8cc08e2ec15d9e65bb0dd4fbac22edd730b.tar.bz2
qemu-26edf8cc08e2ec15d9e65bb0dd4fbac22edd730b.zip
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,pci,virtio,qdev fixes, tests new tests for SMBIOS SMBIOS fixes pc, pci fixes qdev patches stayed on list for a month with no review, as I told people on KVM forum I'm merging stuch patches if they look fine. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> * remotes/mst/tags/for_upstream: qdev: Add test of qdev_prop_check_global qdev: Display warning about unused -global tests: add smbios testing tests: rename acpi-test to bios-tables-test virtio-balloon: return empty data when no stats are available pcie_host: Turn pcie_host_init() into an instance_init SMBIOS: Fix type 17 field sizes SMBIOS: Update Type 0 struct generator for machines >= 2.1 SMBIOS: Fix endian-ness when populating multi-byte fields serial-pci: Set prog interface field of pci config to 16550 compatible Conflicts: include/hw/i386/pc.h [PMM: fixed trivial conflict in pc.h] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/qdev-properties-system.c')
-rw-r--r--hw/core/qdev-properties-system.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 404cf1843d..de433b2e38 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -439,11 +439,27 @@ PropertyInfo qdev_prop_iothread = {
static int qdev_add_one_global(QemuOpts *opts, void *opaque)
{
GlobalProperty *g;
+ ObjectClass *oc;
g = g_malloc0(sizeof(*g));
g->driver = qemu_opt_get(opts, "driver");
g->property = qemu_opt_get(opts, "property");
g->value = qemu_opt_get(opts, "value");
+ oc = object_class_by_name(g->driver);
+ if (oc) {
+ DeviceClass *dc = DEVICE_CLASS(oc);
+
+ if (dc->hotpluggable) {
+ /* If hotpluggable then skip not_used checking. */
+ g->not_used = false;
+ } else {
+ /* Maybe a typo. */
+ g->not_used = true;
+ }
+ } else {
+ /* Maybe a typo. */
+ g->not_used = true;
+ }
qdev_prop_register_global(g);
return 0;
}