From: Gonglei <arei.gong...@huawei.com>

Device should be removed from global boot list when
it is hot-unplugged.
Signed-off-by: Chenliang <chenlian...@huawei.com>
Signed-off-by: Gonglei <arei.gong...@huawei.com>
---
 hw/core/qdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index da1ba48..7bc12bc 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -975,6 +975,8 @@ static void device_finalize(Object *obj)
     if (dev->opts) {
         qemu_opts_del(dev->opts);
     }
+    /* remove device's bootindex from global boot order list */
+    del_boot_device_path(dev);
 
     QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {
         QLIST_REMOVE(ngl, node);
-- 
1.7.12.4



Reply via email to