Thomas Huth db0b034185 hw/usb/hcd-ehci: Fix crash when showing help of EHCI devices
QEMU crashes with certain targets when trying to show the help
output of EHCI devices:

$ ./qemu-system-aarch64 -device ich9-usb-ehci1,help
qemu-system-aarch64: ../../devel/qemu/softmmu/physmem.c:1154: phys_section_add:
 Assertion `map->sections_nb < TARGET_PAGE_SIZE' failed.
Aborted (core dumped)

This happens because the device is doing things at "instance_init" time
that should be done at "realize" time instead. So move the related code
to the realize() function instead. (NB: This now also matches the
memory_region_del_subregion() calls which are done in usb_ehci_unrealize(),
and not during finalize()).

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210326095155.1994604-1-thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-03-26 11:10:49 +01:00
..
2021-03-09 21:19:10 +01:00
2020-09-18 14:12:32 -04:00
2021-01-22 14:51:35 +01:00
2021-01-08 15:13:38 +00:00
2021-03-15 17:01:17 +01:00
2020-12-15 12:04:30 +00:00
2020-05-15 07:08:14 +02:00
2021-03-09 21:19:10 +01:00
2021-03-15 17:01:12 +01:00
2019-08-16 13:31:52 +02:00
2021-03-15 17:01:12 +01:00
2021-02-17 14:29:12 +01:00
2020-11-16 09:11:21 +01:00
2020-09-21 09:44:54 +02:00
2021-03-15 17:00:58 +01:00
2020-08-31 08:10:47 +02:00