Comment 2 for bug 1780928

Revision history for this message
Greg Kurz (gkurz) wrote :

The parent class (ie, TYPE_ICP) doesn't implement DeviceClass::reset(). It directly registers a reset handler with qemu_register_reset() instead. This is needed for cold plugged ICPs to be reset during machine reset since they're not SysBus devices.

Cedric's patch missed that, but rather than reverting it, I'd rather go forward and:
- introduce an abstract TYPE_ICP_BASE class that implements DeviceClass::reset()
- have the current TYPE_ICP and all other specialized ICP types to derive from TYPE_ICP_BASE
- have all specialized ICP types to register reset handlers with qemu_register_reset()

This would match what was recently done with the ICS types.