Re: [Qemu-devel] Hot-pluggable device without ->unrealize() is highly suspect

2018-12-03 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 30 Nov 2018 at 07:40, Markus Armbruster wrote: >> Peter Maydell writes: >> > Add an assert somewhere and catch it with the usual >> > "instantiate everything" qtest? > >> The troublemaker is (3), where we may end up with an overridden >> realize-like method and a

Re: [Qemu-devel] Hot-pluggable device without ->unrealize() is highly suspect

2018-11-30 Thread Peter Maydell
On Fri, 30 Nov 2018 at 07:40, Markus Armbruster wrote: > Peter Maydell writes: > > Add an assert somewhere and catch it with the usual > > "instantiate everything" qtest? > The troublemaker is (3), where we may end up with an overridden > realize-like method and an non-matching, un-overridden un

Re: [Qemu-devel] Hot-pluggable device without ->unrealize() is highly suspect

2018-11-29 Thread Markus Armbruster
Juan, David, there's a migration bit for you towards the end. Peter Maydell writes: > On Thu, 29 Nov 2018 at 19:03, Markus Armbruster wrote: >> >> Li Qiang writes: >> >> > Currently the dc390 device has no unrealize function. This >> > can cause memory leak when hotplug/unplug device. Also mor

Re: [Qemu-devel] Hot-pluggable device without ->unrealize() is highly suspect (was: [PATCH] hw: scsi: dc390: add device unrealize function)

2018-11-29 Thread Peter Maydell
On Thu, 29 Nov 2018 at 19:03, Markus Armbruster wrote: > > Li Qiang writes: > > > Currently the dc390 device has no unrealize function. This > > can cause memory leak when hotplug/unplug device. Also more > > serious, it will trigger an assert when rehotplug. > [...] > > When a hot-pluggable devi

[Qemu-devel] Hot-pluggable device without ->unrealize() is highly suspect (was: [PATCH] hw: scsi: dc390: add device unrealize function)

2018-11-29 Thread Markus Armbruster
Li Qiang writes: > Currently the dc390 device has no unrealize function. This > can cause memory leak when hotplug/unplug device. Also more > serious, it will trigger an assert when rehotplug. [...] When a hot-pluggable device doesn't have an ->unrealize() method, unplug is probably broken. I