Re: [PATCH V2] virtio-pci: fix queue_enable write

2020-06-11 Thread Stefan Hajnoczi
On Wed, Jun 10, 2020 at 01:43:51PM +0800, Jason Wang wrote: > Spec said: The driver uses this to selectively prevent the device from > executing requests from this virtqueue. 1 - enabled; 0 - disabled. > > Though write 0 to queue_enable is forbidden by the spec, we should not > assume that the

Re: [PATCH V2] virtio-pci: fix queue_enable write

2020-06-10 Thread Jason Wang
On 2020/6/10 下午5:52, Stefano Garzarella wrote: On Wed, Jun 10, 2020 at 05:42:54AM -0400, Michael S. Tsirkin wrote: On Wed, Jun 10, 2020 at 10:57:26AM +0200, Stefano Garzarella wrote: On Wed, Jun 10, 2020 at 01:43:51PM +0800, Jason Wang wrote: Spec said: The driver uses this to selectively

Re: [PATCH V2] virtio-pci: fix queue_enable write

2020-06-10 Thread Stefano Garzarella
On Wed, Jun 10, 2020 at 05:42:54AM -0400, Michael S. Tsirkin wrote: > On Wed, Jun 10, 2020 at 10:57:26AM +0200, Stefano Garzarella wrote: > > On Wed, Jun 10, 2020 at 01:43:51PM +0800, Jason Wang wrote: > > > Spec said: The driver uses this to selectively prevent the device from > > > executing

Re: [PATCH V2] virtio-pci: fix queue_enable write

2020-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2020 at 10:57:26AM +0200, Stefano Garzarella wrote: > On Wed, Jun 10, 2020 at 01:43:51PM +0800, Jason Wang wrote: > > Spec said: The driver uses this to selectively prevent the device from > > executing requests from this virtqueue. 1 - enabled; 0 - disabled. > > > > Though write

Re: [PATCH V2] virtio-pci: fix queue_enable write

2020-06-10 Thread Stefano Garzarella
On Wed, Jun 10, 2020 at 01:43:51PM +0800, Jason Wang wrote: > Spec said: The driver uses this to selectively prevent the device from > executing requests from this virtqueue. 1 - enabled; 0 - disabled. > > Though write 0 to queue_enable is forbidden by the spec, we should not > assume that the

[PATCH V2] virtio-pci: fix queue_enable write

2020-06-10 Thread Jason Wang
Spec said: The driver uses this to selectively prevent the device from executing requests from this virtqueue. 1 - enabled; 0 - disabled. Though write 0 to queue_enable is forbidden by the spec, we should not assume that the value is 1. Fix this by ignore the write value other than 1.