qemu-patch-raspberry4/hw/block
Li Qiang 20faf0f5f8 nvme: don't unref ctrl_mem when device unrealized
Currently, when hotplug/unhotplug nvme device, it will cause an
assert in object.c. Following is the backtrack:

ERROR:qom/object.c:981:object_unref: assertion failed: (obj->ref > 0)

Thread 2 "qemu-system-x86" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffcbd32700 (LWP 18844)]
0x00007fffdb9e4fff in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
/lib/x86_64-linux-gnu/libglib-2.0.so.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0
qom/object.c:981
/home/liqiang02/qemu-upstream/qemu/memory.c:1732
/home/liqiang02/qemu-upstream/qemu/memory.c:285
util/qemu-thread-posix.c:504
/lib/x86_64-linux-gnu/libpthread.so.0

This is caused by memory_region_unref in nvme_exit.

Remove it to make the PCIdevice refcount correct.

Signed-off-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-11-12 17:46:57 +01:00
..
dataplane Replace '-enable-kvm' with '-accel kvm' in docs and help texts 2018-06-28 19:05:32 +02:00
block.c block: Remove deprecated -drive option serial 2018-08-15 12:50:39 +02:00
cdrom.c block: Clean up includes 2016-01-20 13:36:23 +01:00
ecc.c block: Clean up includes 2016-01-20 13:36:23 +01:00
fdc.c Pull request 2018-06-30 13:59:53 +01:00
hd-geometry.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
m25p80.c hw/block: Use the IEC binary prefix definitions 2018-07-02 15:41:13 +02:00
Makefile.objs hw: make virtio devices configurable via default-configs/ 2018-06-01 15:14:31 +02:00
nand.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
nvme.c nvme: don't unref ctrl_mem when device unrealized 2018-11-12 17:46:57 +01:00
nvme.h hw/block/nvme: Include "qemu/cutils.h" directly in the source file 2018-06-01 14:15:10 +02:00
onenand.c hw: Do not include "sysemu/blockdev.h" if it is not necessary 2018-06-01 14:15:10 +02:00
pflash_cfi01.c hw/block/pflash_cfi: Convert from DPRINTF() macro to trace events 2018-06-29 15:04:18 +01:00
pflash_cfi02.c hw/block/pflash_cfi: Convert from DPRINTF() macro to trace events 2018-06-29 15:04:18 +01:00
tc58128.c hw/block: Use the IEC binary prefix definitions 2018-07-02 15:41:13 +02:00
trace-events hw/block/pflash_cfi: Convert from DPRINTF() macro to trace events 2018-06-29 15:04:18 +01:00
vhost-user-blk.c vhost-user-blk: start vhost when guest kicks 2018-11-05 13:24:02 -05:00
virtio-blk.c virtio-blk: fix comment for virtio_blk_rw_complete 2018-11-05 13:24:02 -05:00
xen_blkif.h xen: import ring.h from xen 2017-04-21 12:41:29 -07:00
xen_disk.c hw/xen: Use the IEC binary prefix definitions 2018-07-02 15:41:13 +02:00