dm: deinit iothreads on vm reset

iothreads are created by emulated block devices like virtio. These
devices are resetted on vm reset, but these iothreads are not freed,
causing a resource leak. Fix it by deinit all iothreads on vm reset.

Tracked-On: #8612
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
This commit is contained in:
Jiaqing Zhao 2024-04-26 05:55:18 +00:00 committed by acrnsi-robot
parent 46a860bf04
commit dc8ea42297
1 changed files with 2 additions and 0 deletions

View File

@ -674,6 +674,8 @@ vm_reset_vdevs(struct vmctx *ctx)
pci_irq_deinit(ctx);
ioapic_deinit();
iothread_deinit();
pci_irq_init(ctx);
atkbdc_init(ctx);
vrtc_init(ctx);