|
|
9ae3a8 |
From 3e04367b75615f4b1b53350b875c5c14b68dc785 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 6 Nov 2013 14:41:12 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 36/81] qdev: Replace no_user by cannot_instantiate_with_device_add_yet
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1383748882-22831-8-git-send-email-kwolf@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55533
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 07/17] qdev: Replace no_user by cannot_instantiate_with_device_add_yet
|
|
|
9ae3a8 |
Bugzilla: 1001216
|
|
|
9ae3a8 |
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
In an ideal world, machines can be built by wiring devices together
|
|
|
9ae3a8 |
with configuration, not code. Unfortunately, that's not the world we
|
|
|
9ae3a8 |
live in right now. We still have quite a few devices that need to be
|
|
|
9ae3a8 |
wired up by code. If you try to device_add such a device, it'll fail
|
|
|
9ae3a8 |
in sometimes mysterious ways. If you're lucky, you get an
|
|
|
9ae3a8 |
unmysterious immediate crash.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
To protect users from such badness, DeviceClass member no_user used to
|
|
|
9ae3a8 |
make device models unavailable with -device / device_add, but that
|
|
|
9ae3a8 |
regressed in commit 18b6dad. The device model is still omitted from
|
|
|
9ae3a8 |
help, but is available anyway.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Attempts to fix the regression have been rejected with the argument
|
|
|
9ae3a8 |
that the purpose of no_user isn't clear, and it's prone to misuse.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This commit clarifies no_user's purpose. Anthony suggested to rename
|
|
|
9ae3a8 |
it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
|
|
|
9ae3a8 |
I shorten somewhat to keep checkpatch happy. While there, make it
|
|
|
9ae3a8 |
bool.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Every use of cannot_instantiate_with_device_add_yet gets a FIXME
|
|
|
9ae3a8 |
comment asking for rationale. The next few commits will clean them
|
|
|
9ae3a8 |
all up, either by providing a rationale, or by getting rid of the use.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
With that done, the regression fix is hopefully acceptable.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from pending upstream submission)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Conflicts:
|
|
|
9ae3a8 |
hw/dma/pl080.c
|
|
|
9ae3a8 |
hw/i386/kvm/clock.c
|
|
|
9ae3a8 |
hw/i386/pc.c
|
|
|
9ae3a8 |
hw/input/pckbd.c
|
|
|
9ae3a8 |
hw/input/vmmouse.c
|
|
|
9ae3a8 |
hw/misc/vmport.c
|
|
|
9ae3a8 |
hw/nvram/fw_cfg.c
|
|
|
9ae3a8 |
hw/pci-host/piix.c
|
|
|
9ae3a8 |
hw/timer/hpet.c
|
|
|
9ae3a8 |
hw/timer/m48t59.c
|
|
|
9ae3a8 |
hw/timer/mc146818rtc.c
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
A few more semantic conflicts elsewhere. Conflict resolution is
|
|
|
9ae3a8 |
always the same: replace just no_user, keep context intact.
|
|
|
9ae3a8 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/acpi/piix4.c | 2 +-
|
|
|
9ae3a8 |
hw/alpha/typhoon.c | 2 +-
|
|
|
9ae3a8 |
hw/arm/versatilepb.c | 2 +-
|
|
|
9ae3a8 |
hw/audio/pcspk.c | 2 +-
|
|
|
9ae3a8 |
hw/audio/pl041.c | 2 +-
|
|
|
9ae3a8 |
hw/block/fdc.c | 2 +-
|
|
|
9ae3a8 |
hw/display/pl110.c | 6 +++---
|
|
|
9ae3a8 |
hw/dma/pl080.c | 4 ++--
|
|
|
9ae3a8 |
hw/i2c/smbus_ich9.c | 2 +-
|
|
|
9ae3a8 |
hw/i386/kvm/clock.c | 2 +-
|
|
|
9ae3a8 |
hw/i386/kvmvapic.c | 2 +-
|
|
|
9ae3a8 |
hw/i386/pc.c | 2 +-
|
|
|
9ae3a8 |
hw/ide/piix.c | 6 +++---
|
|
|
9ae3a8 |
hw/ide/via.c | 2 +-
|
|
|
9ae3a8 |
hw/input/pckbd.c | 2 +-
|
|
|
9ae3a8 |
hw/input/vmmouse.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/apic_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/arm_gic.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/arm_gic_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/arm_gic_kvm.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/i8259_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/ioapic_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/pl190.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/isa-bus.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/lpc_ich9.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/piix4.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/vt82c686.c | 2 +-
|
|
|
9ae3a8 |
hw/misc/arm_l2x0.c | 2 +-
|
|
|
9ae3a8 |
hw/misc/pvpanic.c | 2 +-
|
|
|
9ae3a8 |
hw/misc/vmport.c | 2 +-
|
|
|
9ae3a8 |
hw/nvram/fw_cfg.c | 2 +-
|
|
|
9ae3a8 |
hw/pci-host/bonito.c | 4 ++--
|
|
|
9ae3a8 |
hw/pci-host/grackle.c | 4 ++--
|
|
|
9ae3a8 |
hw/pci-host/piix.c | 8 ++++----
|
|
|
9ae3a8 |
hw/pci-host/prep.c | 4 ++--
|
|
|
9ae3a8 |
hw/ppc/spapr_vio.c | 2 +-
|
|
|
9ae3a8 |
hw/s390x/ipl.c | 2 +-
|
|
|
9ae3a8 |
hw/s390x/s390-virtio-bus.c | 2 +-
|
|
|
9ae3a8 |
hw/s390x/virtio-ccw.c | 2 +-
|
|
|
9ae3a8 |
hw/sd/pl181.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/arm_mptimer.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/hpet.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/i8254_common.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/m48t59.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/mc146818rtc.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/pl031.c | 2 +-
|
|
|
9ae3a8 |
include/hw/qdev-core.h | 13 ++++++++++++-
|
|
|
9ae3a8 |
qdev-monitor.c | 5 +++--
|
|
|
9ae3a8 |
qom/cpu.c | 2 +-
|
|
|
9ae3a8 |
49 files changed, 73 insertions(+), 61 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/acpi/piix4.c | 2 +-
|
|
|
9ae3a8 |
hw/alpha/typhoon.c | 2 +-
|
|
|
9ae3a8 |
hw/arm/versatilepb.c | 2 +-
|
|
|
9ae3a8 |
hw/audio/pcspk.c | 2 +-
|
|
|
9ae3a8 |
hw/audio/pl041.c | 2 +-
|
|
|
9ae3a8 |
hw/block/fdc.c | 2 +-
|
|
|
9ae3a8 |
hw/display/pl110.c | 6 +++---
|
|
|
9ae3a8 |
hw/dma/pl080.c | 4 ++--
|
|
|
9ae3a8 |
hw/i2c/smbus_ich9.c | 2 +-
|
|
|
9ae3a8 |
hw/i386/kvm/clock.c | 2 +-
|
|
|
9ae3a8 |
hw/i386/kvmvapic.c | 2 +-
|
|
|
9ae3a8 |
hw/i386/pc.c | 2 +-
|
|
|
9ae3a8 |
hw/ide/piix.c | 6 +++---
|
|
|
9ae3a8 |
hw/ide/via.c | 2 +-
|
|
|
9ae3a8 |
hw/input/pckbd.c | 2 +-
|
|
|
9ae3a8 |
hw/input/vmmouse.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/apic_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/arm_gic.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/arm_gic_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/arm_gic_kvm.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/i8259_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/ioapic_common.c | 2 +-
|
|
|
9ae3a8 |
hw/intc/pl190.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/isa-bus.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/lpc_ich9.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/piix4.c | 2 +-
|
|
|
9ae3a8 |
hw/isa/vt82c686.c | 2 +-
|
|
|
9ae3a8 |
hw/misc/arm_l2x0.c | 2 +-
|
|
|
9ae3a8 |
hw/misc/pvpanic.c | 2 +-
|
|
|
9ae3a8 |
hw/misc/vmport.c | 2 +-
|
|
|
9ae3a8 |
hw/nvram/fw_cfg.c | 2 +-
|
|
|
9ae3a8 |
hw/pci-host/bonito.c | 4 ++--
|
|
|
9ae3a8 |
hw/pci-host/grackle.c | 4 ++--
|
|
|
9ae3a8 |
hw/pci-host/piix.c | 8 ++++----
|
|
|
9ae3a8 |
hw/pci-host/prep.c | 4 ++--
|
|
|
9ae3a8 |
hw/ppc/spapr_vio.c | 2 +-
|
|
|
9ae3a8 |
hw/s390x/ipl.c | 2 +-
|
|
|
9ae3a8 |
hw/s390x/s390-virtio-bus.c | 2 +-
|
|
|
9ae3a8 |
hw/s390x/virtio-ccw.c | 2 +-
|
|
|
9ae3a8 |
hw/sd/pl181.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/arm_mptimer.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/hpet.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/i8254_common.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/m48t59.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/mc146818rtc.c | 2 +-
|
|
|
9ae3a8 |
hw/timer/pl031.c | 2 +-
|
|
|
9ae3a8 |
include/hw/qdev-core.h | 13 ++++++++++++-
|
|
|
9ae3a8 |
qdev-monitor.c | 5 +++--
|
|
|
9ae3a8 |
qom/cpu.c | 2 +-
|
|
|
9ae3a8 |
49 files changed, 73 insertions(+), 61 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
|
|
|
9ae3a8 |
index f14867a..46685b7 100644
|
|
|
9ae3a8 |
--- a/hw/acpi/piix4.c
|
|
|
9ae3a8 |
+++ b/hw/acpi/piix4.c
|
|
|
9ae3a8 |
@@ -494,7 +494,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->revision = 0x03;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_BRIDGE_OTHER;
|
|
|
9ae3a8 |
dc->desc = "PM";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_acpi;
|
|
|
9ae3a8 |
dc->props = piix4_pm_properties;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
|
|
|
9ae3a8 |
index 1ead187..55a0e76 100644
|
|
|
9ae3a8 |
--- a/hw/alpha/typhoon.c
|
|
|
9ae3a8 |
+++ b/hw/alpha/typhoon.c
|
|
|
9ae3a8 |
@@ -823,7 +823,7 @@ static void typhoon_pcihost_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = typhoon_pcihost_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo typhoon_pcihost_info = {
|
|
|
9ae3a8 |
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
|
|
|
9ae3a8 |
index 753757e..84cd1ed 100644
|
|
|
9ae3a8 |
--- a/hw/arm/versatilepb.c
|
|
|
9ae3a8 |
+++ b/hw/arm/versatilepb.c
|
|
|
9ae3a8 |
@@ -387,7 +387,7 @@ static void vpb_sic_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = vpb_sic_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_vpb_sic;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
|
|
|
9ae3a8 |
index 4e03bc9..9186304 100644
|
|
|
9ae3a8 |
--- a/hw/audio/pcspk.c
|
|
|
9ae3a8 |
+++ b/hw/audio/pcspk.c
|
|
|
9ae3a8 |
@@ -188,7 +188,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
ic->init = pcspk_initfn;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->props = pcspk_properties;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
|
|
|
9ae3a8 |
index 9b11cc9..36a7ecb 100644
|
|
|
9ae3a8 |
--- a/hw/audio/pl041.c
|
|
|
9ae3a8 |
+++ b/hw/audio/pl041.c
|
|
|
9ae3a8 |
@@ -627,7 +627,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl041_init;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = pl041_device_reset;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl041;
|
|
|
9ae3a8 |
dc->props = pl041_device_properties;
|
|
|
9ae3a8 |
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
|
|
|
9ae3a8 |
index e292f4c..1524e09 100644
|
|
|
9ae3a8 |
--- a/hw/block/fdc.c
|
|
|
9ae3a8 |
+++ b/hw/block/fdc.c
|
|
|
9ae3a8 |
@@ -2206,7 +2206,7 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ic->init = isabus_fdc_init1;
|
|
|
9ae3a8 |
dc->fw_name = "fdc";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = fdctrl_external_reset_isa;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_isa_fdc;
|
|
|
9ae3a8 |
dc->props = isa_fdc_properties;
|
|
|
9ae3a8 |
diff --git a/hw/display/pl110.c b/hw/display/pl110.c
|
|
|
9ae3a8 |
index b45a7be..173ddf8 100644
|
|
|
9ae3a8 |
--- a/hw/display/pl110.c
|
|
|
9ae3a8 |
+++ b/hw/display/pl110.c
|
|
|
9ae3a8 |
@@ -482,7 +482,7 @@ static void pl110_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl110_init;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl110;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -500,7 +500,7 @@ static void pl110_versatile_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl110_versatile_init;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl110;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -518,7 +518,7 @@ static void pl111_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl111_init;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl110;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
|
|
|
9ae3a8 |
index 00b66b4..2920780 100644
|
|
|
9ae3a8 |
--- a/hw/dma/pl080.c
|
|
|
9ae3a8 |
+++ b/hw/dma/pl080.c
|
|
|
9ae3a8 |
@@ -382,7 +382,7 @@ static void pl080_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl080_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl080;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -399,7 +399,7 @@ static void pl081_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl081_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl080;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c
|
|
|
9ae3a8 |
index ca22978..c1ffa34 100644
|
|
|
9ae3a8 |
--- a/hw/i2c/smbus_ich9.c
|
|
|
9ae3a8 |
+++ b/hw/i2c/smbus_ich9.c
|
|
|
9ae3a8 |
@@ -97,7 +97,7 @@ static void ich9_smb_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->device_id = PCI_DEVICE_ID_INTEL_ICH9_6;
|
|
|
9ae3a8 |
k->revision = ICH9_A2_SMB_REVISION;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_SERIAL_SMBUS;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_ich9_smbus;
|
|
|
9ae3a8 |
dc->desc = "ICH9 SMBUS Bridge";
|
|
|
9ae3a8 |
k->init = ich9_smbus_initfn;
|
|
|
9ae3a8 |
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
|
|
|
9ae3a8 |
index 98e5ca5..6204939 100644
|
|
|
9ae3a8 |
--- a/hw/i386/kvm/clock.c
|
|
|
9ae3a8 |
+++ b/hw/i386/kvm/clock.c
|
|
|
9ae3a8 |
@@ -110,7 +110,7 @@ static void kvmclock_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = kvmclock_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &kvmclock_vmsd;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
|
|
|
9ae3a8 |
index 655483b..e6405da 100644
|
|
|
9ae3a8 |
--- a/hw/i386/kvmvapic.c
|
|
|
9ae3a8 |
+++ b/hw/i386/kvmvapic.c
|
|
|
9ae3a8 |
@@ -809,7 +809,7 @@ static void vapic_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *sc = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = vapic_reset;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_vapic;
|
|
|
9ae3a8 |
sc->init = vapic_init;
|
|
|
9ae3a8 |
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
|
|
9ae3a8 |
index d3acbbb..0a8840a 100644
|
|
|
9ae3a8 |
--- a/hw/i386/pc.c
|
|
|
9ae3a8 |
+++ b/hw/i386/pc.c
|
|
|
9ae3a8 |
@@ -538,7 +538,7 @@ static void port92_class_initfn(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ic->init = port92_initfn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = port92_reset;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_port92_isa;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
|
|
|
9ae3a8 |
index 8d4bf2f..e6864b1 100644
|
|
|
9ae3a8 |
--- a/hw/ide/piix.c
|
|
|
9ae3a8 |
+++ b/hw/ide/piix.c
|
|
|
9ae3a8 |
@@ -249,7 +249,7 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_STORAGE_IDE;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo piix3_ide_info = {
|
|
|
9ae3a8 |
@@ -269,7 +269,7 @@ static void piix3_ide_xen_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_STORAGE_IDE;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->unplug = pci_piix3_xen_ide_unplug;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -292,7 +292,7 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->device_id = PCI_DEVICE_ID_INTEL_82371AB;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_STORAGE_IDE;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo piix4_ide_info = {
|
|
|
9ae3a8 |
diff --git a/hw/ide/via.c b/hw/ide/via.c
|
|
|
9ae3a8 |
index 30dedd8..6ba99c8 100644
|
|
|
9ae3a8 |
--- a/hw/ide/via.c
|
|
|
9ae3a8 |
+++ b/hw/ide/via.c
|
|
|
9ae3a8 |
@@ -224,7 +224,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->revision = 0x06;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_STORAGE_IDE;
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo via_ide_info = {
|
|
|
9ae3a8 |
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
|
|
|
9ae3a8 |
index 17a5614..98b8b15 100644
|
|
|
9ae3a8 |
--- a/hw/input/pckbd.c
|
|
|
9ae3a8 |
+++ b/hw/input/pckbd.c
|
|
|
9ae3a8 |
@@ -514,7 +514,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ic->init = i8042_initfn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_kbd_isa;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/input/vmmouse.c b/hw/input/vmmouse.c
|
|
|
9ae3a8 |
index a610738..c9d5131 100644
|
|
|
9ae3a8 |
--- a/hw/input/vmmouse.c
|
|
|
9ae3a8 |
+++ b/hw/input/vmmouse.c
|
|
|
9ae3a8 |
@@ -284,7 +284,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ic->init = vmmouse_initfn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = vmmouse_reset;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_vmmouse;
|
|
|
9ae3a8 |
dc->props = vmmouse_properties;
|
|
|
9ae3a8 |
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
|
|
|
9ae3a8 |
index b03e904..208e7b1 100644
|
|
|
9ae3a8 |
--- a/hw/intc/apic_common.c
|
|
|
9ae3a8 |
+++ b/hw/intc/apic_common.c
|
|
|
9ae3a8 |
@@ -386,7 +386,7 @@ static void apic_common_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_apic_common;
|
|
|
9ae3a8 |
dc->reset = apic_reset_common;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->props = apic_properties_common;
|
|
|
9ae3a8 |
idc->init = apic_init_common;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
|
|
|
9ae3a8 |
index bae6572..243cbf1 100644
|
|
|
9ae3a8 |
--- a/hw/intc/arm_gic.c
|
|
|
9ae3a8 |
+++ b/hw/intc/arm_gic.c
|
|
|
9ae3a8 |
@@ -702,7 +702,7 @@ static void arm_gic_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ARMGICClass *agc = ARM_GIC_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
agc->parent_realize = dc->realize;
|
|
|
9ae3a8 |
dc->realize = arm_gic_realize;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
|
|
|
9ae3a8 |
index 08560f2..26b7756 100644
|
|
|
9ae3a8 |
--- a/hw/intc/arm_gic_common.c
|
|
|
9ae3a8 |
+++ b/hw/intc/arm_gic_common.c
|
|
|
9ae3a8 |
@@ -156,7 +156,7 @@ static void arm_gic_common_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
dc->realize = arm_gic_common_realize;
|
|
|
9ae3a8 |
dc->props = arm_gic_common_properties;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_gic;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo arm_gic_common_type = {
|
|
|
9ae3a8 |
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
|
|
|
9ae3a8 |
index b756456..cb4ce23 100644
|
|
|
9ae3a8 |
--- a/hw/intc/arm_gic_kvm.c
|
|
|
9ae3a8 |
+++ b/hw/intc/arm_gic_kvm.c
|
|
|
9ae3a8 |
@@ -148,7 +148,7 @@ static void kvm_arm_gic_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
kgc->parent_reset = dc->reset;
|
|
|
9ae3a8 |
dc->realize = kvm_arm_gic_realize;
|
|
|
9ae3a8 |
dc->reset = kvm_arm_gic_reset;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo kvm_arm_gic_info = {
|
|
|
9ae3a8 |
diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c
|
|
|
9ae3a8 |
index c2ba6a5..70868a5 100644
|
|
|
9ae3a8 |
--- a/hw/intc/i8259_common.c
|
|
|
9ae3a8 |
+++ b/hw/intc/i8259_common.c
|
|
|
9ae3a8 |
@@ -139,7 +139,7 @@ static void pic_common_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pic_common;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->props = pic_properties_common;
|
|
|
9ae3a8 |
ic->init = pic_init_common;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c
|
|
|
9ae3a8 |
index 5c5bb3c..ce610b7 100644
|
|
|
9ae3a8 |
--- a/hw/intc/ioapic_common.c
|
|
|
9ae3a8 |
+++ b/hw/intc/ioapic_common.c
|
|
|
9ae3a8 |
@@ -100,7 +100,7 @@ static void ioapic_common_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
sc->init = ioapic_init_common;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_ioapic_common;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo ioapic_common_type = {
|
|
|
9ae3a8 |
diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c
|
|
|
9ae3a8 |
index 9610673..ff0e5b0 100644
|
|
|
9ae3a8 |
--- a/hw/intc/pl190.c
|
|
|
9ae3a8 |
+++ b/hw/intc/pl190.c
|
|
|
9ae3a8 |
@@ -269,7 +269,7 @@ static void pl190_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl190_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = pl190_reset;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl190;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
|
|
|
9ae3a8 |
index 7860b17..a87a841 100644
|
|
|
9ae3a8 |
--- a/hw/isa/isa-bus.c
|
|
|
9ae3a8 |
+++ b/hw/isa/isa-bus.c
|
|
|
9ae3a8 |
@@ -217,7 +217,7 @@ static void isabus_bridge_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = isabus_bridge_init;
|
|
|
9ae3a8 |
dc->fw_name = "isa";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo isabus_bridge_info = {
|
|
|
9ae3a8 |
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
|
|
|
9ae3a8 |
index 2760dce..580e9ac 100644
|
|
|
9ae3a8 |
--- a/hw/isa/lpc_ich9.c
|
|
|
9ae3a8 |
+++ b/hw/isa/lpc_ich9.c
|
|
|
9ae3a8 |
@@ -603,7 +603,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
dc->reset = ich9_lpc_reset;
|
|
|
9ae3a8 |
k->init = ich9_lpc_initfn;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_ich9_lpc;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
k->config_write = ich9_lpc_config_write;
|
|
|
9ae3a8 |
dc->desc = "ICH9 LPC bridge";
|
|
|
9ae3a8 |
k->vendor_id = PCI_VENDOR_ID_INTEL;
|
|
|
9ae3a8 |
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
|
|
|
9ae3a8 |
index d750413..10bf8ff 100644
|
|
|
9ae3a8 |
--- a/hw/isa/piix4.c
|
|
|
9ae3a8 |
+++ b/hw/isa/piix4.c
|
|
|
9ae3a8 |
@@ -113,7 +113,7 @@ static void piix4_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->device_id = PCI_DEVICE_ID_INTEL_82371AB_0;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_BRIDGE_ISA;
|
|
|
9ae3a8 |
dc->desc = "ISA bridge";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_piix4;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
|
|
|
9ae3a8 |
index 79057a6..563e154 100644
|
|
|
9ae3a8 |
--- a/hw/isa/vt82c686.c
|
|
|
9ae3a8 |
+++ b/hw/isa/vt82c686.c
|
|
|
9ae3a8 |
@@ -468,7 +468,7 @@ static void via_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_BRIDGE_ISA;
|
|
|
9ae3a8 |
k->revision = 0x40;
|
|
|
9ae3a8 |
dc->desc = "ISA bridge";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_via;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c
|
|
|
9ae3a8 |
index eb4427d..2b19e34 100644
|
|
|
9ae3a8 |
--- a/hw/misc/arm_l2x0.c
|
|
|
9ae3a8 |
+++ b/hw/misc/arm_l2x0.c
|
|
|
9ae3a8 |
@@ -174,7 +174,7 @@ static void l2x0_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = l2x0_priv_init;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_l2x0;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->props = l2x0_properties;
|
|
|
9ae3a8 |
dc->reset = l2x0_priv_reset;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
|
|
|
9ae3a8 |
index 31e1b1d..af4a8b2 100644
|
|
|
9ae3a8 |
--- a/hw/misc/pvpanic.c
|
|
|
9ae3a8 |
+++ b/hw/misc/pvpanic.c
|
|
|
9ae3a8 |
@@ -125,7 +125,7 @@ static void pvpanic_isa_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
ic->init = pvpanic_isa_initfn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->props = pvpanic_isa_properties;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c
|
|
|
9ae3a8 |
index c146129..ab7adf1 100644
|
|
|
9ae3a8 |
--- a/hw/misc/vmport.c
|
|
|
9ae3a8 |
+++ b/hw/misc/vmport.c
|
|
|
9ae3a8 |
@@ -156,7 +156,7 @@ static void vmport_class_initfn(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ic->init = vmport_initfn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo vmport_info = {
|
|
|
9ae3a8 |
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
|
|
|
9ae3a8 |
index 1a7e49c..155edd4 100644
|
|
|
9ae3a8 |
--- a/hw/nvram/fw_cfg.c
|
|
|
9ae3a8 |
+++ b/hw/nvram/fw_cfg.c
|
|
|
9ae3a8 |
@@ -559,7 +559,7 @@ static void fw_cfg_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = fw_cfg_init1;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = fw_cfg_reset;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_fw_cfg;
|
|
|
9ae3a8 |
dc->props = fw_cfg_properties;
|
|
|
9ae3a8 |
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
|
|
|
9ae3a8 |
index 974150b..b73359e 100644
|
|
|
9ae3a8 |
--- a/hw/pci-host/bonito.c
|
|
|
9ae3a8 |
+++ b/hw/pci-host/bonito.c
|
|
|
9ae3a8 |
@@ -811,7 +811,7 @@ static void bonito_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->revision = 0x01;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_BRIDGE_HOST;
|
|
|
9ae3a8 |
dc->desc = "Host bridge";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_bonito;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -828,7 +828,7 @@ static void bonito_pcihost_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = bonito_pcihost_initfn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo bonito_pcihost_info = {
|
|
|
9ae3a8 |
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
|
|
|
9ae3a8 |
index 69344d9..5eb2840 100644
|
|
|
9ae3a8 |
--- a/hw/pci-host/grackle.c
|
|
|
9ae3a8 |
+++ b/hw/pci-host/grackle.c
|
|
|
9ae3a8 |
@@ -130,7 +130,7 @@ static void grackle_pci_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->device_id = PCI_DEVICE_ID_MOTOROLA_MPC106;
|
|
|
9ae3a8 |
k->revision = 0x00;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_BRIDGE_HOST;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo grackle_pci_info = {
|
|
|
9ae3a8 |
@@ -146,7 +146,7 @@ static void pci_grackle_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pci_grackle_init_device;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo grackle_pci_host_info = {
|
|
|
9ae3a8 |
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
|
|
|
9ae3a8 |
index f9e68c3..b9c2dcf 100644
|
|
|
9ae3a8 |
--- a/hw/pci-host/piix.c
|
|
|
9ae3a8 |
+++ b/hw/pci-host/piix.c
|
|
|
9ae3a8 |
@@ -564,7 +564,7 @@ static void piix3_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
dc->desc = "ISA bridge";
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_piix3;
|
|
|
9ae3a8 |
- dc->no_user = 1,
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
k->no_hotplug = 1;
|
|
|
9ae3a8 |
k->init = piix3_initfn;
|
|
|
9ae3a8 |
k->config_write = piix3_write_config;
|
|
|
9ae3a8 |
@@ -588,7 +588,7 @@ static void piix3_xen_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
dc->desc = "ISA bridge";
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_piix3;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
k->no_hotplug = 1;
|
|
|
9ae3a8 |
k->init = piix3_initfn;
|
|
|
9ae3a8 |
k->config_write = piix3_write_config_xen;
|
|
|
9ae3a8 |
@@ -618,7 +618,7 @@ static void i440fx_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->revision = 0x02;
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_BRIDGE_HOST;
|
|
|
9ae3a8 |
dc->desc = "Host bridge";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_i440fx;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -636,7 +636,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = i440fx_pcihost_initfn;
|
|
|
9ae3a8 |
dc->fw_name = "pci";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo i440fx_pcihost_info = {
|
|
|
9ae3a8 |
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
|
|
|
9ae3a8 |
index 8c4e6eb..eec538e 100644
|
|
|
9ae3a8 |
--- a/hw/pci-host/prep.c
|
|
|
9ae3a8 |
+++ b/hw/pci-host/prep.c
|
|
|
9ae3a8 |
@@ -196,7 +196,7 @@ static void raven_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->class_id = PCI_CLASS_BRIDGE_HOST;
|
|
|
9ae3a8 |
dc->desc = "PReP Host Bridge - Motorola Raven";
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_raven;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo raven_info = {
|
|
|
9ae3a8 |
@@ -213,7 +213,7 @@ static void raven_pcihost_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
|
|
|
9ae3a8 |
dc->realize = raven_pcihost_realizefn;
|
|
|
9ae3a8 |
dc->fw_name = "pci";
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo raven_pcihost_info = {
|
|
|
9ae3a8 |
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
|
|
|
9ae3a8 |
index 1405c32..42b6367 100644
|
|
|
9ae3a8 |
--- a/hw/ppc/spapr_vio.c
|
|
|
9ae3a8 |
+++ b/hw/ppc/spapr_vio.c
|
|
|
9ae3a8 |
@@ -533,7 +533,7 @@ static void spapr_vio_bridge_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = spapr_vio_bridge_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo spapr_vio_bridge_info = {
|
|
|
9ae3a8 |
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
|
|
|
9ae3a8 |
index d69adb2..f86a4af 100644
|
|
|
9ae3a8 |
--- a/hw/s390x/ipl.c
|
|
|
9ae3a8 |
+++ b/hw/s390x/ipl.c
|
|
|
9ae3a8 |
@@ -181,7 +181,7 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->init = s390_ipl_init;
|
|
|
9ae3a8 |
dc->props = s390_ipl_properties;
|
|
|
9ae3a8 |
dc->reset = s390_ipl_reset;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo s390_ipl_info = {
|
|
|
9ae3a8 |
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
|
|
|
9ae3a8 |
index 207eb82..9078bfb 100644
|
|
|
9ae3a8 |
--- a/hw/s390x/s390-virtio-bus.c
|
|
|
9ae3a8 |
+++ b/hw/s390x/s390-virtio-bus.c
|
|
|
9ae3a8 |
@@ -679,7 +679,7 @@ static void s390_virtio_bridge_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = s390_virtio_bridge_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo s390_virtio_bridge_info = {
|
|
|
9ae3a8 |
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
|
|
|
9ae3a8 |
index de51589..74eb559 100644
|
|
|
9ae3a8 |
--- a/hw/s390x/virtio-ccw.c
|
|
|
9ae3a8 |
+++ b/hw/s390x/virtio-ccw.c
|
|
|
9ae3a8 |
@@ -1075,7 +1075,7 @@ static void virtual_css_bridge_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = virtual_css_bridge_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo virtual_css_bridge_info = {
|
|
|
9ae3a8 |
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
|
|
|
9ae3a8 |
index 2527296..95e4587 100644
|
|
|
9ae3a8 |
--- a/hw/sd/pl181.c
|
|
|
9ae3a8 |
+++ b/hw/sd/pl181.c
|
|
|
9ae3a8 |
@@ -497,7 +497,7 @@ static void pl181_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
sdc->init = pl181_init;
|
|
|
9ae3a8 |
k->vmsd = &vmstate_pl181;
|
|
|
9ae3a8 |
k->reset = pl181_reset;
|
|
|
9ae3a8 |
- k->no_user = 1;
|
|
|
9ae3a8 |
+ k->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo pl181_info = {
|
|
|
9ae3a8 |
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
|
|
|
9ae3a8 |
index 317f5e4..6b088fa 100644
|
|
|
9ae3a8 |
--- a/hw/timer/arm_mptimer.c
|
|
|
9ae3a8 |
+++ b/hw/timer/arm_mptimer.c
|
|
|
9ae3a8 |
@@ -290,7 +290,7 @@ static void arm_mptimer_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
sbc->init = arm_mptimer_init;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_arm_mptimer;
|
|
|
9ae3a8 |
dc->reset = arm_mptimer_reset;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->props = arm_mptimer_properties;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
|
|
|
9ae3a8 |
index 95dd01d..3f7f457 100644
|
|
|
9ae3a8 |
--- a/hw/timer/hpet.c
|
|
|
9ae3a8 |
+++ b/hw/timer/hpet.c
|
|
|
9ae3a8 |
@@ -739,7 +739,7 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = hpet_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = hpet_reset;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_hpet;
|
|
|
9ae3a8 |
dc->props = hpet_device_properties;
|
|
|
9ae3a8 |
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
|
|
|
9ae3a8 |
index f6f9d26..8f01313 100644
|
|
|
9ae3a8 |
--- a/hw/timer/i8254_common.c
|
|
|
9ae3a8 |
+++ b/hw/timer/i8254_common.c
|
|
|
9ae3a8 |
@@ -291,7 +291,7 @@ static void pit_common_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
ic->init = pit_init_common;
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pit_common;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo pit_common_type = {
|
|
|
9ae3a8 |
diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
|
|
|
9ae3a8 |
index 45753d8..e536bb9 100644
|
|
|
9ae3a8 |
--- a/hw/timer/m48t59.c
|
|
|
9ae3a8 |
+++ b/hw/timer/m48t59.c
|
|
|
9ae3a8 |
@@ -740,7 +740,7 @@ static void m48t59_isa_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ic->init = m48t59_init_isa1;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->reset = m48t59_reset_isa;
|
|
|
9ae3a8 |
dc->props = m48t59_isa_properties;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
|
|
|
9ae3a8 |
index 481604d..7a70556 100644
|
|
|
9ae3a8 |
--- a/hw/timer/mc146818rtc.c
|
|
|
9ae3a8 |
+++ b/hw/timer/mc146818rtc.c
|
|
|
9ae3a8 |
@@ -904,7 +904,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
ic->init = rtc_initfn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_rtc;
|
|
|
9ae3a8 |
dc->props = mc146818rtc_properties;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c
|
|
|
9ae3a8 |
index 764940b..aa9c5a6 100644
|
|
|
9ae3a8 |
--- a/hw/timer/pl031.c
|
|
|
9ae3a8 |
+++ b/hw/timer/pl031.c
|
|
|
9ae3a8 |
@@ -246,7 +246,7 @@ static void pl031_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
k->init = pl031_init;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
dc->vmsd = &vmstate_pl031;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
|
|
|
9ae3a8 |
index a8618db..44feb54 100644
|
|
|
9ae3a8 |
--- a/include/hw/qdev-core.h
|
|
|
9ae3a8 |
+++ b/include/hw/qdev-core.h
|
|
|
9ae3a8 |
@@ -97,7 +97,18 @@ typedef struct DeviceClass {
|
|
|
9ae3a8 |
const char *fw_name;
|
|
|
9ae3a8 |
const char *desc;
|
|
|
9ae3a8 |
Property *props;
|
|
|
9ae3a8 |
- int no_user;
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ /*
|
|
|
9ae3a8 |
+ * Shall we hide this device model from -device / device_add?
|
|
|
9ae3a8 |
+ * All devices should support instantiation with device_add, and
|
|
|
9ae3a8 |
+ * this flag should not exist. But we're not there, yet. Some
|
|
|
9ae3a8 |
+ * devices fail to instantiate with cryptic error messages.
|
|
|
9ae3a8 |
+ * Others instantiate, but don't work. Exposing users to such
|
|
|
9ae3a8 |
+ * behavior would be cruel; this flag serves to protect them. It
|
|
|
9ae3a8 |
+ * should never be set without a comment explaining why it is set.
|
|
|
9ae3a8 |
+ * TODO remove once we're there
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+ bool cannot_instantiate_with_device_add_yet;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* callbacks */
|
|
|
9ae3a8 |
void (*reset)(DeviceState *dev);
|
|
|
9ae3a8 |
diff --git a/qdev-monitor.c b/qdev-monitor.c
|
|
|
9ae3a8 |
index aa6a261..f54cb21 100644
|
|
|
9ae3a8 |
--- a/qdev-monitor.c
|
|
|
9ae3a8 |
+++ b/qdev-monitor.c
|
|
|
9ae3a8 |
@@ -87,7 +87,7 @@ static void qdev_print_devinfo(DeviceClass *dc)
|
|
|
9ae3a8 |
if (dc->desc) {
|
|
|
9ae3a8 |
error_printf(", desc \"%s\"", dc->desc);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
- if (dc->no_user) {
|
|
|
9ae3a8 |
+ if (dc->cannot_instantiate_with_device_add_yet) {
|
|
|
9ae3a8 |
error_printf(", no-user");
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
error_printf("\n");
|
|
|
9ae3a8 |
@@ -127,7 +127,8 @@ static void qdev_print_devinfos(bool show_no_user)
|
|
|
9ae3a8 |
if ((i < DEVICE_CATEGORY_MAX
|
|
|
9ae3a8 |
? !test_bit(i, dc->categories)
|
|
|
9ae3a8 |
: !bitmap_empty(dc->categories, DEVICE_CATEGORY_MAX))
|
|
|
9ae3a8 |
- || (!show_no_user && dc->no_user)) {
|
|
|
9ae3a8 |
+ || (!show_no_user
|
|
|
9ae3a8 |
+ && dc->cannot_instantiate_with_device_add_yet)) {
|
|
|
9ae3a8 |
continue;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
if (!cat_printed) {
|
|
|
9ae3a8 |
diff --git a/qom/cpu.c b/qom/cpu.c
|
|
|
9ae3a8 |
index b25fbc9..f97e1b8 100644
|
|
|
9ae3a8 |
--- a/qom/cpu.c
|
|
|
9ae3a8 |
+++ b/qom/cpu.c
|
|
|
9ae3a8 |
@@ -210,7 +210,7 @@ static void cpu_class_init(ObjectClass *klass, void *data)
|
|
|
9ae3a8 |
k->write_elf64_qemunote = cpu_common_write_elf64_qemunote;
|
|
|
9ae3a8 |
k->write_elf64_note = cpu_common_write_elf64_note;
|
|
|
9ae3a8 |
dc->realize = cpu_common_realizefn;
|
|
|
9ae3a8 |
- dc->no_user = 1;
|
|
|
9ae3a8 |
+ dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static const TypeInfo cpu_type_info = {
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|