Re: [RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-16 Thread Stefano Garzarella
On Fri, Feb 11, 2022 at 05:13:09PM +0100, Laurent Vivier wrote: vhost_vdpa_host_notifiers_init() initializes queue notifiers for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs", whereas vhost_vdpa_host_notifiers_uninit() uninitializes the same notifiers for queue "0" to queue

Re: [RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 3:33 PM Laurent Vivier wrote: > > On 14/02/2022 04:20, Jason Wang wrote: > > On Sat, Feb 12, 2022 at 12:13 AM Laurent Vivier wrote: > >> > >> vhost_vdpa_host_notifiers_init() initializes queue notifiers > >> for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs",

Re: [RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-13 Thread Laurent Vivier
On 14/02/2022 04:20, Jason Wang wrote: On Sat, Feb 12, 2022 at 12:13 AM Laurent Vivier wrote: vhost_vdpa_host_notifiers_init() initializes queue notifiers for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs", whereas vhost_vdpa_host_notifiers_uninit() uninitializes the same

Re: [RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-13 Thread Jason Wang
On Sat, Feb 12, 2022 at 12:13 AM Laurent Vivier wrote: > > vhost_vdpa_host_notifiers_init() initializes queue notifiers > for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs", > whereas vhost_vdpa_host_notifiers_uninit() uninitializes the > same notifiers for queue "0" to queue

[RFC] vhost-vdpa: make notifiers _init()/_uninit() symmetric

2022-02-11 Thread Laurent Vivier
vhost_vdpa_host_notifiers_init() initializes queue notifiers for queues "dev->vq_index" to queue "dev->vq_index + dev->nvqs", whereas vhost_vdpa_host_notifiers_uninit() uninitializes the same notifiers for queue "0" to queue "dev->nvqs". This asymmetry seems buggy, fix that by using dev->vq_index