On 14/03/2017 06:14, Xu, Anthony wrote: > Below functions are registered in RCU thread > address_space_dispatch_free, > do_address_space_destroy > flatview_unref > reclaim_ramblock, > qht_map_destroy, > migration_bitmap_free > > first three are address space related, should work without global lock per > above analysis. > The rest are very simple, seems doesn't need global lock.
flatview_unref can call object_unref and thus reach: - all QOM instance_finalize callbacks - all QOM property release callbacks In turn, of QOM property release callbacks the more important ones are release_drive (which calls blockdev_auto_del and blk_detach_dev) and release_chr (which calls qemu_chr_fe_deinit). Your patch is incorrect, sorry. If it were that simple, it would have been done already... Paolo