On Wed, 29 Apr 2026 14:48:37 +0100 Joshua Lant <[email protected]> wrote:
> Currently the backend remains mapped, meaning that if the device owning > the backend is hot-removed, it cannot be readded in the same QEMU > instance. > > Signed-off-by: Joshua Lant <[email protected]> Gah. That sounds like a fix we should have in place today. Can you send it as a separate patch with an appropriate Fixes tag. Jonathan > --- > hw/mem/cxl_type3.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c > index 68cd04b7d9..414c776028 100644 > --- a/hw/mem/cxl_type3.c > +++ b/hw/mem/cxl_type3.c > @@ -1072,12 +1072,15 @@ static void ct3_exit(PCIDevice *pci_dev) > cxl_destroy_cci(&ct3d->cci); > if (ct3d->dc.host_dc) { > cxl_destroy_dc_regions(ct3d); > + host_memory_backend_set_mapped(ct3d->dc.host_dc, false); > address_space_destroy(&ct3d->dc.host_dc_as); > } > if (ct3d->hostpmem) { > + host_memory_backend_set_mapped(ct3d->hostpmem, false); > address_space_destroy(&ct3d->hostpmem_as); > } > if (ct3d->hostvmem) { > + host_memory_backend_set_mapped(ct3d->hostvmem, false); > address_space_destroy(&ct3d->hostvmem_as); > } > }
