mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
qdev: Reset hot-plugged devices
Device models rely on the core invoking their reset handlers after init. We do this in the cold-plug case, but so far we miss this step after hot-plug. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
c886edfb85
commit
5ab28c8340
1 changed files with 3 additions and 0 deletions
|
@ -289,6 +289,9 @@ int qdev_init(DeviceState *dev)
|
|||
dev->alias_required_for_version);
|
||||
}
|
||||
dev->state = DEV_STATE_INITIALIZED;
|
||||
if (dev->hotplugged && dev->info->reset) {
|
||||
dev->info->reset(dev);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue