[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH qemu 2/5] hw/mem/cxl_type3: Add paired msix_uninit_exclusive_bar(
From: |
Jonathan Cameron |
Subject: |
[PATCH qemu 2/5] hw/mem/cxl_type3: Add paired msix_uninit_exclusive_bar() call |
Date: |
Mon, 3 Feb 2025 16:19:05 +0000 |
From: Li Zhijian <lizhijian@fujitsu.com>
msix_uninit_exclusive_bar() should be paired with msix_init_exclusive_bar()
Ensure proper resource cleanup by adding the missing
`msix_uninit_exclusive_bar()` call for the Type3 CXL device.
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
hw/mem/cxl_type3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index ebc0ec536e..4775aab0d6 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -944,6 +944,7 @@ static void ct3_realize(PCIDevice *pci_dev, Error **errp)
err_release_cdat:
cxl_doe_cdat_release(cxl_cstate);
err_free_special_ops:
+ msix_uninit_exclusive_bar(pci_dev);
g_free(regs->special_ops);
err_address_space_free:
if (ct3d->dc.host_dc) {
@@ -967,6 +968,7 @@ static void ct3_exit(PCIDevice *pci_dev)
pcie_aer_exit(pci_dev);
cxl_doe_cdat_release(cxl_cstate);
+ msix_uninit_exclusive_bar(pci_dev);
g_free(regs->special_ops);
if (ct3d->dc.host_dc) {
cxl_destroy_dc_regions(ct3d);
--
2.43.0
- [PATCH qemu 0/5] hw/cxl: Cleanups and interleave support., Jonathan Cameron, 2025/02/03
- [PATCH qemu 1/5] hw/cxl: Introduce CXL_T3_MSIX_VECTOR enumeration, Jonathan Cameron, 2025/02/03
- [PATCH qemu 2/5] hw/mem/cxl_type3: Add paired msix_uninit_exclusive_bar() call,
Jonathan Cameron <=
- [PATCH qemu 3/5] hw/mem/cxl_type3: Fix special_ops memory leak on msix_init_exclusive_bar() failure, Jonathan Cameron, 2025/02/03
- [PATCH qemu 4/5] hw/mem/cxl_type3: Ensure errp is set on realization failure, Jonathan Cameron, 2025/02/03
- [PATCH qemu 5/5] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways, Jonathan Cameron, 2025/02/03