hw/block/nvme: fix invalid msix exclusive uninit292424522292485664
commit5351fb7cb2caf81bccbfd5ee4228106cadc56e3c
authorKlaus Jensen <k.jensen@samsung.com>
Fri, 23 Apr 2021 05:21:26 +0000 (23 07:21 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 26 Apr 2021 13:55:50 +0000 (26 14:55 +0100)
treed460cc64afdfc2f6a826435440dc402f2275e80b
parentffa090bc56e73e287a63261e70ac02c0970be61a
hw/block/nvme: fix invalid msix exclusive uninit

Commit 1901b4967c3f changed the nvme device from using a bar exclusive
for MSI-x to sharing it on bar0.

Unfortunately, the msix_uninit_exclusive_bar() call remains in
nvme_exit() which causes havoc when the device is removed with, say,
device_del. Fix this.

Additionally, a subregion is added but it is not removed on exit which
causes a reference to linger and the drive to never be unlocked.

Fixes: 1901b4967c3f ("hw/block/nvme: move msix table and pba to BAR 0")
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/block/nvme.c