Re: [Qemu-devel] [PATCH] vfio-pci: unparent BAR subregions

2015-01-31 Thread Alex Williamson
On Sat, 2015-01-31 at 09:43 +0100, Paolo Bonzini wrote: On 31/01/2015 00:55, Alex Williamson wrote: Commit d8d95814609e replaced a number of memory_region_destroy() calls with object_unparent() calls. The logic appears to be that subregions need to be unparented, but the base region is

Re: [Qemu-devel] [PATCH] vfio-pci: unparent BAR subregions

2015-01-31 Thread Paolo Bonzini
On 31/01/2015 00:55, Alex Williamson wrote: Commit d8d95814609e replaced a number of memory_region_destroy() calls with object_unparent() calls. The logic appears to be that subregions need to be unparented, but the base region is destroyed with the device object. Doing hotplug testing

Re: [Qemu-devel] [PATCH] vfio-pci: unparent BAR subregions

2015-01-31 Thread Paolo Bonzini
On 31/01/2015 16:10, Alex Williamson wrote: Explicit object_unparent() is only needed if you recreate the memory region during the lifetime of the object. This is rarely needed, and it is simple to spot if it's needed. If you do memory_region_init* outside the realize function, most likely

[Qemu-devel] [PATCH] vfio-pci: unparent BAR subregions

2015-01-30 Thread Alex Williamson
Commit d8d95814609e replaced a number of memory_region_destroy() calls with object_unparent() calls. The logic appears to be that subregions need to be unparented, but the base region is destroyed with the device object. Doing hotplug testing with vfio-pci I occasionally get a segfault from