Re: Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-07 Thread Stefano Garzarella
On Wed, Feb 07, 2024 at 11:27:14AM +0800, Jason Wang wrote: On Tue, Feb 6, 2024 at 10:52 PM Stefano Garzarella wrote: If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect the driver to enable virtqueue before setting DRIVER_OK. If the driver tries anyway, better to fail

Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Jason Wang
On Tue, Feb 6, 2024 at 10:52 PM Stefano Garzarella wrote: > > If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect > the driver to enable virtqueue before setting DRIVER_OK. If the driver > tries anyway, better to fail right away as soon as we get the ioctl. > Let's also update

Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Eugenio Perez Martin
On Tue, Feb 6, 2024 at 3:52 PM Stefano Garzarella wrote: > > If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect > the driver to enable virtqueue before setting DRIVER_OK. If the driver > tries anyway, better to fail right away as soon as we get the ioctl. > Let's also update

Re: Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Stefano Garzarella
On Tue, Feb 06, 2024 at 10:56:50AM -0500, Michael S. Tsirkin wrote: better @subj: try late vq enable only if negotiated I rewrote it 3/4 times, and before sending it I was not happy with the result. Thank you, much better! I'll change it in v2. Stefano

Re: [PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Michael S. Tsirkin
better @subj: try late vq enable only if negotiated On Tue, Feb 06, 2024 at 03:51:54PM +0100, Stefano Garzarella wrote: > If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect > the driver to enable virtqueue before setting DRIVER_OK. If the driver > tries anyway, better to fail

[PATCH] vhost-vdpa: fail enabling virtqueue in certain conditions

2024-02-06 Thread Stefano Garzarella
If VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated, we expect the driver to enable virtqueue before setting DRIVER_OK. If the driver tries anyway, better to fail right away as soon as we get the ioctl. Let's also update the documentation to make it clearer. We had a problem in QEMU for