qemu-e2k/hw
Thomas Huth 29551fdcf4 hw/timer/mc146818rtc: Fix introspection problem
There is currently a funny problem with the "mc146818rtc" device:
1) Start QEMU like this:
   qemu-system-ppc64 -M pseries -S
2) At the HMP monitor, enter "info qom-tree". Note that there is an
   entry for "/rtc (spapr-rtc)".
3) Introspect the mc146818rtc device like this:
   device_add mc146818rtc,help
4) Run "info qom-tree" again. The "/rtc" entry is gone now!

The rtc_finalize() function of the mc146818rtc device has two bugs: First,
it tries to remove a "rtc" property, while the rtc_realizefn() added a
"rtc-time" property instead. And second, it should have been done in an
unrealize function, not in a finalize function, to avoid that this causes
problems during introspection.

But since adding aliases to the global machine state should not be done
from a device's realize function anyway, let's rather fix this issue
by moving the creation of the alias to the code that creates the device
(and thus is run from the machine init functions instead), i.e. the
mc146818_rtc_init() function for most machines. The prep machines are
special, since the mc146818rtc device is created here in the realize
function of the i82378 device. Since we certainly don't want to add the
alias there, we add it to some code that is called from the ibm_40p_init()
machine init function instead.
Since the alias is now only created during the machine init, we can remove
the object_property_del() completely.

Fixes: 654a36d857
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1534419358-10932-5-git-send-email-thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-08-23 13:32:50 +02:00
..
9pfs
acpi
adc
alpha
arm fix "Missing break in switch" coverity reports 2018-08-23 13:32:50 +02:00
audio fix "Missing break in switch" coverity reports 2018-08-23 13:32:50 +02:00
block block: Remove deprecated -drive option serial 2018-08-15 12:50:39 +02:00
bt
char imx_serial: Generate interrupt on receive data ready if enabled 2018-08-20 11:24:31 +01:00
core sysbus: always allow explicit_ofw_unit_address() to override address generation 2018-08-16 22:27:43 -03:00
cpu hw/*/realview: Fix introspection problem with 'realview_mpcore' & 'realview_gic' 2018-07-17 13:12:49 +01:00
cris
display fix "Missing break in switch" coverity reports 2018-08-23 13:32:50 +02:00
dma hw/dma/pl080: Remove hw_error() if DMA is enabled 2018-08-20 11:24:33 +01:00
gpio
hppa
i2c ppc4xx_i2c: Rewrite to model hardware more closely 2018-07-03 09:56:52 +10:00
i386 pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size 2018-08-03 11:35:21 +03:00
ide block: Remove deprecated -drive option serial 2018-08-15 12:50:39 +02:00
input
intc nvic: Expose NMI line 2018-08-20 11:24:33 +01:00
ipack
ipmi
isa
lm32
m68k
mem mem/nvdimm: ensure write persistence to PMEM in label emulation 2018-08-10 13:29:39 +03:00
microblaze hw/microblaze/xlnx-zynqmp-pmu: Fix introspection problem in 'xlnx, zynqmp-pmu-soc' 2018-07-23 15:21:25 +01:00
mips
misc hw/misc: Remove mmio_interface device 2018-08-20 11:24:32 +01:00
moxie
net e1000e: Prevent MSI/MSI-X storms 2018-07-20 08:30:48 +08:00
nios2
nvram fw_cfg: ignore suffixes in the bootdevice list dependent on machine class 2018-08-16 22:27:43 -03:00
openrisc
pci
pci-bridge
pci-host
pcmcia
ppc hw/timer/mc146818rtc: Fix introspection problem 2018-08-23 13:32:50 +02:00
rdma config: split PVRDMA from RDMA 2018-08-18 18:01:34 +03:00
riscv spike: Fix crash when introspecting the device 2018-07-19 09:05:48 -07:00
s390x s390x: remove 's390-squash-mcss' option 2018-08-20 14:18:49 +02:00
scsi megasas: fix sglist leak 2018-08-23 13:32:50 +02:00
sd sdhci: add i.MX SD Stable Clock bit 2018-08-20 11:24:32 +01:00
sh4
smbios
sparc sun4m: don't use legacy fw_cfg_init_mem() function 2018-08-20 19:18:31 +01:00
sparc64 sun4u: ensure kernel_top is always initialised 2018-08-20 19:18:31 +01:00
ssi hw/ssi/xilinx_spips: Remove unneeded MMIO request_ptr code 2018-08-20 11:24:32 +01:00
timer hw/timer/mc146818rtc: Fix introspection problem 2018-08-23 13:32:50 +02:00
tpm
tricore
unicore32
usb block: Remove deprecated -drive option serial 2018-08-15 12:50:39 +02:00
vfio vfio/ccw/pci: Allow devices to opt-in for ballooning 2018-08-17 09:27:16 -06:00
virtio kvm: Use inhibit to prevent ballooning without synchronous mmu 2018-08-17 09:27:15 -06:00
watchdog hw/watchdog/cmsdk_apb_watchdog: Implement CMSDK APB watchdog module 2018-08-20 11:24:33 +01:00
xen
xenpv
xtensa
Makefile.objs