From 9bf80f916e1bdf86417de5e395dd3a4f7f62ebe7 Mon Sep 17 00:00:00 2001 From: Fei Li Date: Mon, 13 Sep 2021 13:44:14 +0800 Subject: [PATCH] dm: pci: destory reseverd PIO BAR when deinit passthrough PCI device Destory reseverd PIO BAR when deinit passthrough PCI device to free reserved_bar_regions. Tracked-On: #6508 Signed-off-by: Fei Li --- devicemodel/hw/pci/passthrough.c | 1 + 1 file changed, 1 insertion(+) diff --git a/devicemodel/hw/pci/passthrough.c b/devicemodel/hw/pci/passthrough.c index 538ac4dc3..4c4da5a10 100644 --- a/devicemodel/hw/pci/passthrough.c +++ b/devicemodel/hw/pci/passthrough.c @@ -771,6 +771,7 @@ passthru_deinit(struct vmctx *ctx, struct pci_vdev *dev, char *opts) vm_unmap_ptdev_mmio(ctx, 0, 2, 0, gpu_opregion_gpa, GPU_OPREGION_SIZE, gpu_opregion_hpa); } + destory_mmio_rsvd_rgns(dev); pcidev.virt_bdf = PCI_BDF(dev->bus, dev->slot, dev->func); pcidev.phys_bdf = ptdev->phys_bdf; pciaccess_cleanup();