Re: [PULL 2/4] hw/nvme: fix assertion failure on subregion removal

Klaus Jensen <[email protected]>
Newsgroups gmane.comp.emulators.qemu.block,gmane.comp.emulators.qemu,gmane.comp.emulators.qemu.stable
Message-ID <[email protected]>
On Jul 30 10:22, Michael Tokarev wrote:
> On 7/28/26 21:00, Klaus Jensen wrote:
> > From: Daniel Paziyski <[email protected]>
> > 
> > When a controller is created with a MSI-X exclusive BAR, the bar0 memory region
> > is not used at all, and so, the iomem region is not added as a subregion of it.
> > However, when removing a NVMe controller, the iomem region is unconditionally
> > removed as a subregion of bar0, causing an assertion failure. Remove the iomem
> > memory region as a subregion of bar0 only if not using a MSI-X exclusive BAR.
> > 
> > QEMU options (requires a hotunplug-aware OS):
> > 
> >          -M q35 -device pcie-root-port,id=rp0 \
> >          -device nvme,serial=ctrl0,id=ctrl0,bus=rp0,msix-exclusive-bar=on
> > 
> > In the QEMU monitor, or by causing an ejection from the OS:
> > 
> >          device_del ctrl0
> > 
> > Message in stderr:
> > 
> > qemu-system-x86_64: ../system/memory.c:2617: memory_region_del_subregion: Assertion `subregion->container == mr' failed.
> > 
> > Fixes: fa905f65c554 ("hw/nvme: add machine compatibility parameter to enable msix exclusive bar")
> > Fixes: 9162f1012576 ("hw/nvme: fix msix_uninit with exclusive bar")
> > Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4090
> > Signed-off-by: Daniel Paziyski <[email protected]>
> > Reviewed-by: Klaus Jensen <[email protected]>
> > Signed-off-by: Klaus Jensen <[email protected]>
> 
> It feels like this one should be picked up for the stable series too,
> should it not?  (I'm picking it up).
> 

Yes, thanks Michael!
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmprFo4ACgkQTeGvMW1P
DeksoQf+KzkqY6I1CSAQdecpqxj8gELZ5MHEayimOFky5vFmoFUdNFI4yQVdXUGq
e4e6OX1Mgn70I2n8ETS23KwMy8PhRTEydULSpZnmLi/iFqxsaTR9uAjuqLehbQ+7
/RDWukO/7y93tpuoktOblYvPJJwZ3M/1zKq+6DuT4q7xSD/LxuvnXbThymDsj10C
90grk+ZXXOwgt2MtvPT7kbuUtYYweyRWmWTlHiIYF77OC5v2+Ge2wumJwj6q+XqI
C1nn6mywu5i2Pt5R5JfNbq22btPEg+Yuxe7m/nqoWbTzntwk6RYz68HajUWwbHqY
D/05/LtMOzt8rpTYUuzaCW7/SmE1KA==
=drI6
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.