Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot

2020-02-13 Thread Christian Borntraeger
repro On 14.02.20 08:43, Christian Borntraeger wrote: > > > On 14.02.20 08:40, Eugenio Perez Martin wrote: >> Hi. >> >> Were the vhost and vhost_net modules loaded with dyndbg='+plt'? I miss >> all the others regular debug traces on that one. > > I did > > echo -n 'file drivers/vhost/vhost.

Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot

2020-02-13 Thread Christian Borntraeger
On 14.02.20 08:40, Eugenio Perez Martin wrote: > Hi. > > Were the vhost and vhost_net modules loaded with dyndbg='+plt'? I miss > all the others regular debug traces on that one. I did echo -n 'file drivers/vhost/vhost.c +plt' > control and echo -n 'file drivers/vhost/net.c +plt' > control

Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot

2020-02-13 Thread Christian Borntraeger
I did ping -c 20 -f ... ; reboot twice The ping after the first reboot showed ...E this was on the host console [ 55.951885] CPU: 34 PID: 1908 Comm: CPU 0/KVM Not tainted 5.5.0+ #21 [ 55.951891] Hardware name: IBM 3906 M04 704 (LPAR) [ 55.951892] Call Trace: [ 55.951902] [<00

Re: [PATCH 41/62] x86/sev-es: Handle MSR events

2020-02-13 Thread Joerg Roedel
On Thu, Feb 13, 2020 at 07:45:00AM -0800, Dave Hansen wrote: > On 2/11/20 5:52 AM, Joerg Roedel wrote: > > Implement a handler for #VC exceptions caused by RDMSR/WRMSR > > instructions. > > As a general comment on all of these event handlers: Why do we bother > having the hypercalls in the interru

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Wang
On 2020/2/14 上午12:13, Jason Gunthorpe wrote: On Thu, Feb 13, 2020 at 10:59:34AM -0500, Michael S. Tsirkin wrote: On Thu, Feb 13, 2020 at 11:51:54AM -0400, Jason Gunthorpe wrote: The 'class' is supposed to provide all the library functions to remove this duplication. Instead of plugging the HW

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Wang
On 2020/2/14 上午12:24, Jason Gunthorpe wrote: On Thu, Feb 13, 2020 at 10:56:00AM -0500, Michael S. Tsirkin wrote: On Thu, Feb 13, 2020 at 11:51:54AM -0400, Jason Gunthorpe wrote: That bus is exactly what Greg KH proposed. There are other ways to solve this I guess but this bikeshedding is getti

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Wang
On 2020/2/13 下午11:05, Jason Gunthorpe wrote: On Thu, Feb 13, 2020 at 10:58:44PM +0800, Jason Wang wrote: On 2020/2/13 下午9:41, Jason Gunthorpe wrote: On Thu, Feb 13, 2020 at 11:34:10AM +0800, Jason Wang wrote: You have dev, type or class to choose from. Type is rarely used and doesn't see

Re: [PATCH v3 3/4] drm/virtio: batch resource creation

2020-02-13 Thread Chia-I Wu
On Thu, Feb 13, 2020 at 5:22 AM Gerd Hoffmann wrote: > > Move virtio_gpu_notify() to higher-level functions for > virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d() > and virtio_gpu_cmd_resource_attach_backing(). > > virtio_gpu_object_create() will batch commands and notify only

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 04:23:24PM +, Anton Ivanov wrote: > > On 13/02/2020 15:53, Michael S. Tsirkin wrote: > > On Thu, Feb 13, 2020 at 07:44:06AM -0800, Eric Dumazet wrote: > > > > > > On 2/13/20 2:00 AM, Michael S. Tsirkin wrote: > > > > On Wed, Feb 12, 2020 at 05:38:09PM +, Anton Ivan

Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot

2020-02-13 Thread Christian Borntraeger
On 13.02.20 17:29, Eugenio Pérez wrote: > Can we try with this traces? Does not apply on eccb852f1fe6bede630e2e4f1a121a81e34354ab, can you double check? > > From b793b4106085ab1970bdedb340e49f37843ed585 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= > Date: Thu, 13 Feb 202

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Gunthorpe
On Thu, Feb 13, 2020 at 10:56:00AM -0500, Michael S. Tsirkin wrote: > On Thu, Feb 13, 2020 at 11:51:54AM -0400, Jason Gunthorpe wrote: > > > That bus is exactly what Greg KH proposed. There are other ways > > > to solve this I guess but this bikeshedding is getting tiring. > > > > This discussion

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Anton Ivanov
On 13/02/2020 15:53, Michael S. Tsirkin wrote: On Thu, Feb 13, 2020 at 07:44:06AM -0800, Eric Dumazet wrote: On 2/13/20 2:00 AM, Michael S. Tsirkin wrote: On Wed, Feb 12, 2020 at 05:38:09PM +, Anton Ivanov wrote: On 11/02/2020 10:37, Michael S. Tsirkin wrote: On Tue, Feb 11, 2020 at 07

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Gunthorpe
On Thu, Feb 13, 2020 at 10:59:34AM -0500, Michael S. Tsirkin wrote: > On Thu, Feb 13, 2020 at 11:51:54AM -0400, Jason Gunthorpe wrote: > > The 'class' is supposed to provide all the library functions to remove > > this duplication. Instead of plugging the HW driver in via some bus > > scheme every

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 11:51:54AM -0400, Jason Gunthorpe wrote: > The 'class' is supposed to provide all the library functions to remove > this duplication. Instead of plugging the HW driver in via some bus > scheme every subsystem has its own 'ops' that the HW driver provides > to the subsystem's

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 11:51:54AM -0400, Jason Gunthorpe wrote: > > That bus is exactly what Greg KH proposed. There are other ways > > to solve this I guess but this bikeshedding is getting tiring. > > This discussion was for a different goal, IMHO. Hmm couldn't find it anymore. What was the go

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 07:44:06AM -0800, Eric Dumazet wrote: > > > On 2/13/20 2:00 AM, Michael S. Tsirkin wrote: > > On Wed, Feb 12, 2020 at 05:38:09PM +, Anton Ivanov wrote: > >> > >> > >> On 11/02/2020 10:37, Michael S. Tsirkin wrote: > >>> On Tue, Feb 11, 2020 at 07:42:37AM +, Anton I

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Gunthorpe
On Thu, Feb 13, 2020 at 10:41:06AM -0500, Michael S. Tsirkin wrote: > On Thu, Feb 13, 2020 at 11:05:42AM -0400, Jason Gunthorpe wrote: > > On Thu, Feb 13, 2020 at 10:58:44PM +0800, Jason Wang wrote: > > > > > > On 2020/2/13 下午9:41, Jason Gunthorpe wrote: > > > > On Thu, Feb 13, 2020 at 11:34:10AM

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Eric Dumazet
On 2/13/20 2:00 AM, Michael S. Tsirkin wrote: > On Wed, Feb 12, 2020 at 05:38:09PM +, Anton Ivanov wrote: >> >> >> On 11/02/2020 10:37, Michael S. Tsirkin wrote: >>> On Tue, Feb 11, 2020 at 07:42:37AM +, Anton Ivanov wrote: On 11/02/2020 02:51, Jason Wang wrote: > > On 2020/2

Re: [PATCH 41/62] x86/sev-es: Handle MSR events

2020-02-13 Thread Dave Hansen
On 2/11/20 5:52 AM, Joerg Roedel wrote: > Implement a handler for #VC exceptions caused by RDMSR/WRMSR > instructions. As a general comment on all of these event handlers: Why do we bother having the hypercalls in the interrupt handler as opposed to just calling them directly. What you have is:

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 11:05:42AM -0400, Jason Gunthorpe wrote: > On Thu, Feb 13, 2020 at 10:58:44PM +0800, Jason Wang wrote: > > > > On 2020/2/13 下午9:41, Jason Gunthorpe wrote: > > > On Thu, Feb 13, 2020 at 11:34:10AM +0800, Jason Wang wrote: > > > > > > > >You have dev, type or > > > > > c

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Gunthorpe
On Thu, Feb 13, 2020 at 10:58:44PM +0800, Jason Wang wrote: > > On 2020/2/13 下午9:41, Jason Gunthorpe wrote: > > On Thu, Feb 13, 2020 at 11:34:10AM +0800, Jason Wang wrote: > > > > > >You have dev, type or > > > > class to choose from. Type is rarely used and doesn't seem to be used > > > > by

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Wang
On 2020/2/13 下午9:41, Jason Gunthorpe wrote: On Thu, Feb 13, 2020 at 11:34:10AM +0800, Jason Wang wrote: You have dev, type or class to choose from. Type is rarely used and doesn't seem to be used by vdpa, so class seems the right choice Jason Yes, but my understanding is class and bus are

Re: [PATCH V2 3/5] vDPA: introduce vDPA bus

2020-02-13 Thread Jason Gunthorpe
On Thu, Feb 13, 2020 at 11:34:10AM +0800, Jason Wang wrote: > > You have dev, type or > > class to choose from. Type is rarely used and doesn't seem to be used > > by vdpa, so class seems the right choice > > > > Jason > > Yes, but my understanding is class and bus are mutually exclusive. So w

[PATCH v3 1/4] drm/virtio: rework notification for better batching

2020-02-13 Thread Gerd Hoffmann
Drop the virtio_gpu_{disable,enable}_notify(). Add a new virtio_gpu_notify() call instead, which must be called whenever the driver wants make sure the host is notified needed. Drop automatic notification from command submission. Add virtio_gpu_notify() calls after each command query instead. Th

[PATCH v3 4/4] drm/virtio: batch display query.

2020-02-13 Thread Gerd Hoffmann
Move virtio_gpu_notify() to higher-level functions for virtio_gpu_cmd_get_display_info() and virtio_gpu_cmd_get_edids(). virtio_gpu_config_changed_work_func() and virtio_gpu_init() will batch commands and notify only once per update Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgp

[PATCH v3 2/4] drm/virtio: batch plane updates (pageflip)

2020-02-13 Thread Gerd Hoffmann
Move virtio_gpu_notify() to higher-level functions for virtio_gpu_cmd_resource_flush(), virtio_gpu_cmd_set_scanout() and virtio_gpu_cmd_transfer_to_host_{2d,3d}(). virtio_gpu_primary_plane_update() will notify only once for a series of commands (restores plane update command batching). Signed-off

[PATCH v3 3/4] drm/virtio: batch resource creation

2020-02-13 Thread Gerd Hoffmann
Move virtio_gpu_notify() to higher-level functions for virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d() and virtio_gpu_cmd_resource_attach_backing(). virtio_gpu_object_create() will batch commands and notify only once when creating a resource. Signed-off-by: Gerd Hoffmann --

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 11:12:45AM +, Anton Ivanov wrote: > > > On 13/02/2020 10:00, Michael S. Tsirkin wrote: > > On Wed, Feb 12, 2020 at 05:38:09PM +, Anton Ivanov wrote: > > > > > > > > > On 11/02/2020 10:37, Michael S. Tsirkin wrote: > > > > On Tue, Feb 11, 2020 at 07:42:37AM +,

Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot

2020-02-13 Thread Christian Borntraeger
On 13.02.20 11:47, Eugenio Pérez wrote: > > Can we try tracing last_avail_idx with the attached patch? Can you enable > also line and thread id (dyndbg='+plt')? [ 326.584446] [2127] 1648: VHOST_SET_VRING_BASE [vq=36fdfcb7][vq->last_avail_idx=0][vq->avail_idx=0] [ 326.584457] [2

[PATCH 2/2] virtio-blk: improve virtqueue error to BLK_STS

2020-02-13 Thread Halil Pasic
Let's change the mapping between virtqueue_add errors to BLK_STS statuses, so that -ENOSPC, which indicates virtqueue full is still mapped to BLK_STS_DEV_RESOURCE, but -ENOMEM which indicates non-device specific resource outage is mapped to BLK_STS_RESOURCE. Signed-off-by: Halil Pasic --- See com

[PATCH 1/2] virtio-blk: fix hw_queue stopped on arbitrary error

2020-02-13 Thread Halil Pasic
Since nobody else is going to restart our hw_queue for us, the blk_mq_start_stopped_hw_queues() is in virtblk_done() is not sufficient necessarily sufficient to ensure that the queue will get started again. In case of global resource outage (-ENOMEM because mapping failure, because of swiotlb full)

[PATCH 0/2] virtio-blk: improve handling of DMA mapping failures

2020-02-13 Thread Halil Pasic
Two patches are handling new edge cases introduced by doing DMA mappings (which can fail) in virtio core. I stumbled upon this while stress testing I/O for Protected Virtual Machines. I deliberately chose a tiny swiotlb size and have generated load with fio. With more than one virtio-blk disk in u

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Anton Ivanov
On 13/02/2020 10:00, Michael S. Tsirkin wrote: On Wed, Feb 12, 2020 at 05:38:09PM +, Anton Ivanov wrote: On 11/02/2020 10:37, Michael S. Tsirkin wrote: On Tue, Feb 11, 2020 at 07:42:37AM +, Anton Ivanov wrote: On 11/02/2020 02:51, Jason Wang wrote: On 2020/2/11 上午12:55, Anton Iva

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Anton Ivanov
On 13/02/2020 03:31, Jason Wang wrote: On 2020/2/13 上午1:38, Anton Ivanov wrote: On 11/02/2020 10:37, Michael S. Tsirkin wrote: On Tue, Feb 11, 2020 at 07:42:37AM +, Anton Ivanov wrote: On 11/02/2020 02:51, Jason Wang wrote: On 2020/2/11 上午12:55, Anton Ivanov wrote: On 09/12/2019

Re: [PATCH] drm/qxl: replace zero-length array with flexible-array member

2020-02-13 Thread Gerd Hoffmann
On Wed, Feb 12, 2020 at 01:33:44PM -0600, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced i

Re: [PATCH] virtio: Work around frames incorrectly marked as gso

2020-02-13 Thread Michael S. Tsirkin
On Wed, Feb 12, 2020 at 05:38:09PM +, Anton Ivanov wrote: > > > On 11/02/2020 10:37, Michael S. Tsirkin wrote: > > On Tue, Feb 11, 2020 at 07:42:37AM +, Anton Ivanov wrote: > > > On 11/02/2020 02:51, Jason Wang wrote: > > > > > > > > On 2020/2/11 上午12:55, Anton Ivanov wrote: > > > > > >

Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot

2020-02-13 Thread Christian Borntraeger
On 12.02.20 17:34, Eugenio Pérez wrote: > On Tue, 2020-02-11 at 14:13 +0100, Christian Borntraeger wrote: >> >> On 11.02.20 14:04, Eugenio Pérez wrote: >>> On Mon, 2020-02-10 at 12:01 +0100, Christian Borntraeger wrote: On 10.02.20 10:47, Eugenio Perez Martin wrote: > Hi Christian. >