mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
hw/remote/message.c: Don't directly invoke DeviceClass:reset
Directly invoking the DeviceClass::reset method is a bad idea, because if the device is using three-phase reset then it relies on transitional reset machinery which is likely to disappear at some point. Reset the device in the standard way, by calling device_cold_reset(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240813165250.2717650-7-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
dfad8421af
commit
7d3a421fea
1 changed files with 1 additions and 4 deletions
|
@ -215,13 +215,10 @@ fail:
|
||||||
static void process_device_reset_msg(QIOChannel *ioc, PCIDevice *dev,
|
static void process_device_reset_msg(QIOChannel *ioc, PCIDevice *dev,
|
||||||
Error **errp)
|
Error **errp)
|
||||||
{
|
{
|
||||||
DeviceClass *dc = DEVICE_GET_CLASS(dev);
|
|
||||||
DeviceState *s = DEVICE(dev);
|
DeviceState *s = DEVICE(dev);
|
||||||
MPQemuMsg ret = { 0 };
|
MPQemuMsg ret = { 0 };
|
||||||
|
|
||||||
if (dc->reset) {
|
device_cold_reset(s);
|
||||||
dc->reset(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.cmd = MPQEMU_CMD_RET;
|
ret.cmd = MPQEMU_CMD_RET;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue