qemu-e2k/include/hw
Andreas Färber fe6c211781 qdev: Fix QOM unrealize behavior
Since commit 249d41720b (qdev: Prepare
"realized" property) setting realized = true would register the device's
VMStateDescription, but realized = false would not unregister it. Fix that.

Moving the code from unparenting also revealed that we were calling
DeviceClass::init through DeviceClass::realize as interim solution but
DeviceClass::exit still at unparenting time with a realized check.
Make this symmetrical by implementing DeviceClass::unrealize to call it,
while we're setting realized = false in the unparenting path.
The only other unrealize user is mac_nvram, which can safely override it.

Thus, mark DeviceClass::exit as obsolete, new devices should implement
DeviceClass::unrealize instead.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1366043650-9719-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-15 17:05:34 -05:00
..
acpi acpi.h: make it self contained 2013-04-15 10:22:04 -05:00
arm hw: move headers to include/ 2013-04-08 18:13:10 +02:00
audio hw: move headers to include/ 2013-04-08 18:13:10 +02:00
block hw: move headers to include/ 2013-04-08 18:13:10 +02:00
char hw: move headers to include/ 2013-04-08 18:13:10 +02:00
cris hw: move headers to include/ 2013-04-08 18:13:10 +02:00
i2c hw: move headers to include/ 2013-04-08 18:13:10 +02:00
i386 hw: move headers to include/ 2013-04-08 18:13:10 +02:00
input hw: move headers to include/ 2013-04-08 18:13:10 +02:00
isa hw: move headers to include/ 2013-04-08 18:13:10 +02:00
kvm hw: move headers to include/ 2013-04-08 18:13:10 +02:00
lm32 hw: move headers to include/ 2013-04-08 18:13:10 +02:00
m68k hw: move headers to include/ 2013-04-08 18:13:10 +02:00
mips hw: move headers to include/ 2013-04-08 18:13:10 +02:00
misc hw: move headers to include/ 2013-04-08 18:13:10 +02:00
nvram hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pci hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pci-host hw: move PCI bridges to hw/pci-* or hw/ARCH 2013-04-08 18:13:14 +02:00
ppc hw: move headers to include/ 2013-04-08 18:13:10 +02:00
s390x hw: move headers to include/ 2013-04-08 18:13:10 +02:00
scsi hw: move headers to include/ 2013-04-08 18:13:10 +02:00
sh4 sh7750: Change cpu field type to SuperHCPU 2013-04-13 13:51:45 +02:00
sparc hw: move timer devices to hw/timer/, configure with default-configs/ 2013-04-08 18:13:14 +02:00
timer hw: move headers to include/ 2013-04-08 18:13:10 +02:00
unicore32 hw: move headers to include/ 2013-04-08 18:13:10 +02:00
virtio virtio-serial: cleanup: remove qdev field. 2013-04-15 10:22:05 -05:00
xen hw: move headers to include/ 2013-04-08 18:13:10 +02:00
arm.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
boards.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
bt.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
elf_ops.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
empty_slot.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
hw.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ide.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
irq.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
loader.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pcmcia.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ptimer.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qdev-addr.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qdev-core.h qdev: Fix QOM unrealize behavior 2013-04-15 17:05:34 -05:00
qdev-dma.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qdev-properties.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qdev.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
sd.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ssi.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
stream.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
sysbus.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
usb.h Merge remote-tracking branch 'bonzini/hw-dirs' into staging 2013-04-08 13:12:33 -05:00
xilinx.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00