[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 0/3] virtio-scsi: restart DMA after iothread
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v5 0/3] virtio-scsi: restart DMA after iothread |
Date: |
Thu, 20 Jun 2019 20:07:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 20/06/19 19:37, Stefan Hajnoczi wrote:
> v5:
> * Plumbing vm change state handlers into DeviceClass/BusClass is a rather
> large bug fix. Instead I've combined the previous priorities approach with
> the observation from Kevin and Paolo that we really want to order by qdev
> tree depth.
>
> The new qdev_add_vm_change_state_handler() API lets DeviceStates register
> callbacks that execute in qdev tree depth order. This solves the
> virtio-scsi bug since the virtio-scsi device's callback must complete
> before
> its child scsi-disk's callback runs.
>
> Is this a good compromise for everyone?
Yes! Perhaps a bit of a hack, but it works and both the API and the
implementation are very sane. Converting other devices to use
qdev_add_vm_change_state_handler() is left as an exercise for the
reviewer, I guess? :)
Paolo