Re: [PATCH] virtio-blk: simplify virtio_blk_dma_restart_cb()

2022-11-10 Thread Stefan Hajnoczi
On Thu, Nov 10, 2022 at 07:27:59AM -0500, Michael S. Tsirkin wrote: > On Wed, Nov 02, 2022 at 02:23:37PM -0400, Stefan Hajnoczi wrote: > > virtio_blk_dma_restart_cb() is tricky because the BH must deal with > > virtio_blk_data_plane_start()/virtio_blk_data_plane_stop() being called. > > > > There

Re: [PATCH] virtio-blk: simplify virtio_blk_dma_restart_cb()

2022-11-10 Thread Michael S. Tsirkin
On Wed, Nov 02, 2022 at 02:23:37PM -0400, Stefan Hajnoczi wrote: > virtio_blk_dma_restart_cb() is tricky because the BH must deal with > virtio_blk_data_plane_start()/virtio_blk_data_plane_stop() being called. > > There are two issues with the code: > > 1. virtio_blk_realize() should use qdev_add

Re: [PATCH] virtio-blk: simplify virtio_blk_dma_restart_cb()

2022-11-03 Thread Emanuele Giuseppe Esposito
Am 02/11/2022 um 19:23 schrieb Stefan Hajnoczi: > virtio_blk_dma_restart_cb() is tricky because the BH must deal with > virtio_blk_data_plane_start()/virtio_blk_data_plane_stop() being called. > > There are two issues with the code: > > 1. virtio_blk_realize() should use qdev_add_vm_change_sta

Re: [PATCH] virtio-blk: simplify virtio_blk_dma_restart_cb()

2022-11-02 Thread Michael S. Tsirkin
On Wed, Nov 02, 2022 at 02:23:37PM -0400, Stefan Hajnoczi wrote: > virtio_blk_dma_restart_cb() is tricky because the BH must deal with > virtio_blk_data_plane_start()/virtio_blk_data_plane_stop() being called. > > There are two issues with the code: > > 1. virtio_blk_realize() should use qdev_add

[PATCH] virtio-blk: simplify virtio_blk_dma_restart_cb()

2022-11-02 Thread Stefan Hajnoczi
virtio_blk_dma_restart_cb() is tricky because the BH must deal with virtio_blk_data_plane_start()/virtio_blk_data_plane_stop() being called. There are two issues with the code: 1. virtio_blk_realize() should use qdev_add_vm_change_state_handler() instead of qemu_add_vm_change_state_handler().