qemu-patch-raspberry4/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
audio
block
char
cris
i2c
i386
input
isa
kvm
lm32
m68k
mips
misc
nvram
pci
pci-host
ppc
s390x
scsi
sh4
sparc
timer
unicore32
virtio virtio-serial: cleanup: remove qdev field. 2013-04-15 10:22:05 -05:00
xen
arm.h
boards.h
bt.h
elf_ops.h
empty_slot.h
hw.h
ide.h
irq.h
loader.h
pcmcia.h
ptimer.h
qdev-addr.h
qdev-core.h qdev: Fix QOM unrealize behavior 2013-04-15 17:05:34 -05:00
qdev-dma.h
qdev-properties.h
qdev.h
sd.h
ssi.h
stream.h
sysbus.h
usb.h
xilinx.h