Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-14 Thread Ilya Maximets
On 14.12.2017 17:31, Ilya Maximets wrote: > One update for the testing scenario: > > No need to kill OVS. The issue reproducible with simple 'del-port' > and 'add-port'. virtio driver in guest could crash on both operations. > Most times it crashes in my case on 'add-port' after deletion. > > H

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-14 Thread Ilya Maximets
One update for the testing scenario: No need to kill OVS. The issue reproducible with simple 'del-port' and 'add-port'. virtio driver in guest could crash on both operations. Most times it crashes in my case on 'add-port' after deletion. Hi Maxime, I already saw below patches and original linux k

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-14 Thread Maxime Coquelin
Hi Ilya, On 12/14/2017 08:06 AM, Ilya Maximets wrote: On 13.12.2017 22:48, Michael S. Tsirkin wrote: On Wed, Dec 13, 2017 at 04:45:20PM +0300, Ilya Maximets wrote: That looks very strange. Some of the functions gets 'old_status', others the 'new_status'. I'm a bit confused. OK, fair enough.

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-13 Thread Ilya Maximets
On 13.12.2017 22:48, Michael S. Tsirkin wrote: > On Wed, Dec 13, 2017 at 04:45:20PM +0300, Ilya Maximets wrote: That looks very strange. Some of the functions gets 'old_status', others the 'new_status'. I'm a bit confused. >>> >>> OK, fair enough. Fixed - let's pass old status everyw

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-13 Thread Michael S. Tsirkin
On Wed, Dec 13, 2017 at 04:45:20PM +0300, Ilya Maximets wrote: > >> That > >> looks very strange. Some of the functions gets 'old_status', others > >> the 'new_status'. I'm a bit confused. > > > > OK, fair enough. Fixed - let's pass old status everywhere, > > users that need the new one can get it

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-13 Thread Ilya Maximets
On 11.12.2017 07:35, Michael S. Tsirkin wrote: > On Fri, Dec 08, 2017 at 05:54:18PM +0300, Ilya Maximets wrote: >> On 07.12.2017 20:27, Michael S. Tsirkin wrote: >>> On Thu, Dec 07, 2017 at 09:39:36AM +0300, Ilya Maximets wrote: On 06.12.2017 19:45, Michael S. Tsirkin wrote: > On Wed, Dec

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-10 Thread Michael S. Tsirkin
On Fri, Dec 08, 2017 at 05:54:18PM +0300, Ilya Maximets wrote: > On 07.12.2017 20:27, Michael S. Tsirkin wrote: > > On Thu, Dec 07, 2017 at 09:39:36AM +0300, Ilya Maximets wrote: > >> On 06.12.2017 19:45, Michael S. Tsirkin wrote: > >>> On Wed, Dec 06, 2017 at 04:06:18PM +0300, Ilya Maximets wrote:

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-08 Thread Ilya Maximets
On 07.12.2017 20:27, Michael S. Tsirkin wrote: > On Thu, Dec 07, 2017 at 09:39:36AM +0300, Ilya Maximets wrote: >> On 06.12.2017 19:45, Michael S. Tsirkin wrote: >>> On Wed, Dec 06, 2017 at 04:06:18PM +0300, Ilya Maximets wrote: In case virtio error occured after vhost_dev_close(), qemu will c

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 09:39:36AM +0300, Ilya Maximets wrote: > On 06.12.2017 19:45, Michael S. Tsirkin wrote: > > On Wed, Dec 06, 2017 at 04:06:18PM +0300, Ilya Maximets wrote: > >> In case virtio error occured after vhost_dev_close(), qemu will crash > >> in nested cleanup while checking IOMMU f

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-07 Thread Michael S. Tsirkin
On Thu, Dec 07, 2017 at 09:39:36AM +0300, Ilya Maximets wrote: > On 06.12.2017 19:45, Michael S. Tsirkin wrote: > > On Wed, Dec 06, 2017 at 04:06:18PM +0300, Ilya Maximets wrote: > >> In case virtio error occured after vhost_dev_close(), qemu will crash > >> in nested cleanup while checking IOMMU f

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-06 Thread Ilya Maximets
On 06.12.2017 19:45, Michael S. Tsirkin wrote: > On Wed, Dec 06, 2017 at 04:06:18PM +0300, Ilya Maximets wrote: >> In case virtio error occured after vhost_dev_close(), qemu will crash >> in nested cleanup while checking IOMMU flag because dev->vdev already >> set to zero and resources are already

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-06 Thread Michael S. Tsirkin
On Wed, Dec 06, 2017 at 04:06:18PM +0300, Ilya Maximets wrote: > In case virtio error occured after vhost_dev_close(), qemu will crash > in nested cleanup while checking IOMMU flag because dev->vdev already > set to zero and resources are already freed. > > Example: > > Program received signal SI

[Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-06 Thread Ilya Maximets
In case virtio error occured after vhost_dev_close(), qemu will crash in nested cleanup while checking IOMMU flag because dev->vdev already set to zero and resources are already freed. Example: Program received signal SIGSEGV, Segmentation fault. vhost_virtqueue_stop at hw/virtio/vhost.c:1155