Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread Jiri Pirko
Fri, Apr 20, 2018 at 05:28:02PM CEST, step...@networkplumber.org wrote: >On Thu, 19 Apr 2018 18:42:04 -0700 >Sridhar Samudrala wrote: > >> Use the registration/notification framework supported by the generic >> failover infrastructure. >> >> Signed-off-by: Sridhar

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread David Miller
From: "Michael S. Tsirkin" Date: Fri, 20 Apr 2018 18:43:54 +0300 > On Fri, Apr 20, 2018 at 08:28:02AM -0700, Stephen Hemminger wrote: >> Plus, DPDK is now dependent on existing model. > > DPDK does the kernel bypass thing, doesn't it? Why does the kernel care? +1

Re: [PATCH v7 net-next 2/4] net: Introduce generic failover module

2018-04-20 Thread Michael S. Tsirkin
On Fri, Apr 20, 2018 at 08:21:00AM -0700, Samudrala, Sridhar wrote: > > > + finfo = netdev_priv(failover_dev); > > > + > > > + primary_dev = rtnl_dereference(finfo->primary_dev); > > > + standby_dev = rtnl_dereference(finfo->standby_dev); > > > + > > > + if (slave_dev != primary_dev && slave_dev

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-20 Thread Michael S. Tsirkin
On Fri, Apr 20, 2018 at 02:22:19PM -0300, Marcelo Ricardo Leitner wrote: > On Wed, Apr 18, 2018 at 05:06:46PM +0300, Michael S. Tsirkin wrote: > > On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: > > > On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: > > > > On Mon, Apr 02,

[PATCH 5/6] virtio_console: move removal code

2018-04-20 Thread Michael S. Tsirkin
Will make it reusable for error handling. Signed-off-by: Michael S. Tsirkin --- drivers/char/virtio_console.c | 72 +-- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/drivers/char/virtio_console.c

Re: [virtio-dev] Re: [PATCH v7 net-next 2/4] net: Introduce generic failover module

2018-04-20 Thread Alexander Duyck
On Fri, Apr 20, 2018 at 8:34 AM, Michael S. Tsirkin wrote: > On Fri, Apr 20, 2018 at 08:21:00AM -0700, Samudrala, Sridhar wrote: >> > > + finfo = netdev_priv(failover_dev); >> > > + >> > > + primary_dev = rtnl_dereference(finfo->primary_dev); >> > > + standby_dev =

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread David Miller
From: Stephen Hemminger Date: Fri, 20 Apr 2018 08:28:02 -0700 > On Thu, 19 Apr 2018 18:42:04 -0700 > Sridhar Samudrala wrote: > >> Use the registration/notification framework supported by the generic >> failover infrastructure. >> >>

[PATCH 2/6] virtio: add ability to iterate over vqs

2018-04-20 Thread Michael S. Tsirkin
For cleanup it's helpful to be able to simply scan all vqs and discard all data. Add an iterator to do that. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/virtio.h b/include/linux/virtio.h index

[PATCH 3/6] virtio_console: free buffers after reset

2018-04-20 Thread Michael S. Tsirkin
Console driver is out of spec. The spec says: A driver MUST NOT decrement the available idx on a live virtqueue (ie. there is no way to “unexpose” buffers). and it does exactly that by trying to detach unused buffers without doing a device reset first. Defer detaching the buffers

[PATCH 0/6] virtio-console: spec compliance fixes

2018-04-20 Thread Michael S. Tsirkin
Turns out virtio console tries to take a buffer out of an active vq. Works by sheer luck, and is explicitly forbidden by spec. And while going over it I saw that error handling is also broken - failure is easy to trigger if I force allocations to fail. Lightly tested. Michael S. Tsirkin (6):

[PATCH 1/6] virtio_console: don't tie bufs to a vq

2018-04-20 Thread Michael S. Tsirkin
an allocated buffer doesn't need to be tied to a vq - only vq->vdev is ever used. Pass the function the just what it needs - the vdev. Signed-off-by: Michael S. Tsirkin --- drivers/char/virtio_console.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 4/6] virtio_console: drop custom control queue cleanup

2018-04-20 Thread Michael S. Tsirkin
We now cleanup all VQs on device removal - no need to handle the control VQ specially. Signed-off-by: Michael S. Tsirkin --- drivers/char/virtio_console.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/char/virtio_console.c

[PATCH 6/6] virtio_console: reset on out of memory

2018-04-20 Thread Michael S. Tsirkin
When out of memory and we can't add ctrl vq buffers, probe fails. Unfortunately the error handling is out of spec: it calls del_vqs without bothering to reset the device first. To fix, call the full cleanup function in this case. Cc: sta...@vger.kernel.org Signed-off-by: Michael S. Tsirkin

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread Michael S. Tsirkin
On Fri, Apr 20, 2018 at 08:28:02AM -0700, Stephen Hemminger wrote: > On Thu, 19 Apr 2018 18:42:04 -0700 > Sridhar Samudrala wrote: > > > Use the registration/notification framework supported by the generic > > failover infrastructure. > > > > Signed-off-by: Sridhar

Re: [virtio-dev] Re: [PATCH v7 net-next 2/4] net: Introduce generic failover module

2018-04-20 Thread Michael S. Tsirkin
On Fri, Apr 20, 2018 at 08:56:57AM -0700, Alexander Duyck wrote: > On Fri, Apr 20, 2018 at 8:34 AM, Michael S. Tsirkin wrote: > > On Fri, Apr 20, 2018 at 08:21:00AM -0700, Samudrala, Sridhar wrote: > >> > > + finfo = netdev_priv(failover_dev); > >> > > + > >> > > + primary_dev =

virtio remoteproc device

2018-04-20 Thread Michael S. Tsirkin
Hello! I note the following in the serial console: if (is_rproc_serial(vdev)) { /* * Allocate DMA memory from ancestor. When a virtio * device is created by remoteproc, the DMA memory is * associated with the grandparent

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread Samudrala, Sridhar
On 4/20/2018 8:28 AM, Stephen Hemminger wrote: On Thu, 19 Apr 2018 18:42:04 -0700 Sridhar Samudrala wrote: Use the registration/notification framework supported by the generic failover infrastructure. Signed-off-by: Sridhar Samudrala

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Matthew Wilcox
On Fri, Apr 20, 2018 at 04:54:53PM -0400, Mikulas Patocka wrote: > On Fri, 20 Apr 2018, Michal Hocko wrote: > > No way. This is just wrong! First of all, you will explode most likely > > on many allocations of small sizes. Second, CONFIG_DEBUG_VM tends to be > > enabled quite often. > > You're an

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Mikulas Patocka
On Fri, 20 Apr 2018, Matthew Wilcox wrote: > On Fri, Apr 20, 2018 at 04:54:53PM -0400, Mikulas Patocka wrote: > > On Fri, 20 Apr 2018, Michal Hocko wrote: > > > No way. This is just wrong! First of all, you will explode most likely > > > on many allocations of small sizes. Second,

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Mikulas Patocka
On Fri, 20 Apr 2018, Michal Hocko wrote: > On Fri 20-04-18 06:41:36, Matthew Wilcox wrote: > > On Fri, Apr 20, 2018 at 03:08:52PM +0200, Michal Hocko wrote: > > > > In order to detect these bugs reliably I submit this patch that changes > > > > kvmalloc to always use vmalloc if CONFIG_DEBUG_VM

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Mikulas Patocka
On Fri, 20 Apr 2018, Michal Hocko wrote: > On Thu 19-04-18 12:12:38, Mikulas Patocka wrote: > [...] > > From: Mikulas Patocka > > Subject: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM > > > > The kvmalloc function tries to use kmalloc and falls back to vmalloc

Re: [PATCH v7 net-next 2/4] net: Introduce generic failover module

2018-04-20 Thread Samudrala, Sridhar
On 4/19/2018 7:44 PM, Michael S. Tsirkin wrote: On Thu, Apr 19, 2018 at 06:42:02PM -0700, Sridhar Samudrala wrote: This provides a generic interface for paravirtual drivers to listen for netdev register/unregister/link change events from pci ethernet devices with the same MAC and takeover

Re: [PATCH v7 net-next 4/4] netvsc: refactor notifier/event handling code to use the failover framework

2018-04-20 Thread Stephen Hemminger
On Thu, 19 Apr 2018 18:42:04 -0700 Sridhar Samudrala wrote: > Use the registration/notification framework supported by the generic > failover infrastructure. > > Signed-off-by: Sridhar Samudrala Do what you want to other devices but

Re: drm: qxl: what's going on

2018-04-20 Thread Gerd Hoffmann
On Fri, Apr 20, 2018 at 02:26:11AM -0400, Chunyu Hu wrote: > Hello, > > I am seeing qxl driver is not working in my kvm machine with kernel 4.17, > (4.16 failed too). I'd like to consult your expert is there a fix for it > now? https://www.kraxel.org/cgit/linux/log/?h=drm-qxl-release cheers,

[PATCH v2 4/4] qxl: drop dummy functions

2018-04-20 Thread Gerd Hoffmann
These days drm core checks function pointers everywhere before calling them. So we can drop a bunch of dummy functions now. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 50 --- 1 file changed, 50 deletions(-) diff

Re: [PATCH 1/2] qxl: fix qxl_release_{map,unmap}

2018-04-20 Thread Daniel Vetter
On Wed, Apr 18, 2018 at 07:42:56AM +0200, Gerd Hoffmann wrote: > s/PAGE_SIZE/PAGE_MASK/ > > Luckily release_offset is never larger than PAGE_SIZE, so the bug has no > bad side effects and managed to stay unnoticed for years that way ... > > Signed-off-by: Gerd Hoffmann

Re: [PATCH v2 4/4] qxl: drop dummy functions

2018-04-20 Thread Daniel Vetter
On Fri, Apr 20, 2018 at 09:19:04AM +0200, Gerd Hoffmann wrote: > These days drm core checks function pointers everywhere before calling > them. So we can drop a bunch of dummy functions now. > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 50 >

[PATCH v2 3/4] qxl: hook monitors_config updates into crtc, not encoder.

2018-04-20 Thread Gerd Hoffmann
The encoder callbacks are only called in case the video mode changes. So any layout changes without mode changes will go unnoticed. Add qxl_crtc_update_monitors_config(), based on the old qxl_write_monitors_config_for_encoder() function. Hook it into the enable, disable and flush atomic crtc

[PATCH v2 2/4] qxl: move qxl_send_monitors_config()

2018-04-20 Thread Gerd Hoffmann
Needed to avoid a forward declaration in a followup patch. Pure code move, no functional change. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 47 +++ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git

[PATCH v2 1/4] qxl: remove qxl_io_log()

2018-04-20 Thread Gerd Hoffmann
qxl_io_log() sends messages over to the host (qemu) for logging. Remove the function and all callers, we can just use standard DRM_DEBUG calls (and if needed a serial console). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 3 ---

Re: [PATCH] drm/virtio: fix vq wait_event condition

2018-04-20 Thread Gerd Hoffmann
On Tue, Apr 03, 2018 at 11:59:04AM +0200, Gerd Hoffmann wrote: > Wait until we have enough space in the virt queue to actually queue up > our request. Avoids the guest spinning in case we have a non-zero > amount of free entries but not enough for the request. Ping airlied, can you please either

Re: [PATCH] drm/virtio: fix vq wait_event condition

2018-04-20 Thread Dave Airlie
Reviewed-by: Dave Airlie On Fri., 20 Apr. 2018, 17:23 Gerd Hoffmann, wrote: > On Tue, Apr 03, 2018 at 11:59:04AM +0200, Gerd Hoffmann wrote: > > Wait until we have enough space in the virt queue to actually queue up > > our request. Avoids the guest

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Mikulas Patocka
On Thu, 19 Apr 2018, Andrew Morton wrote: > On Thu, 19 Apr 2018 17:19:20 -0400 (EDT) Mikulas Patocka > wrote: > > > > > In order to detect these bugs reliably I submit this patch that changes > > > > kvmalloc to always use vmalloc if CONFIG_DEBUG_VM is turned on. > > > >

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Matthew Wilcox
On Thu, Apr 19, 2018 at 12:12:38PM -0400, Mikulas Patocka wrote: > Unfortunatelly, some kernel code has bugs - it uses kvmalloc and then > uses DMA-API on the returned memory or frees it with kfree. Such bugs were > found in the virtio-net driver, dm-integrity or RHEL7 powerpc-specific > code.

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Mikulas Patocka
On Fri, 20 Apr 2018, Matthew Wilcox wrote: > On Thu, Apr 19, 2018 at 12:12:38PM -0400, Mikulas Patocka wrote: > > Unfortunatelly, some kernel code has bugs - it uses kvmalloc and then > > uses DMA-API on the returned memory or frees it with kfree. Such bugs were > > found in the virtio-net

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Michal Hocko
On Thu 19-04-18 12:12:38, Mikulas Patocka wrote: [...] > From: Mikulas Patocka > Subject: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM > > The kvmalloc function tries to use kmalloc and falls back to vmalloc if > kmalloc fails. > > Unfortunatelly, some kernel

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Matthew Wilcox
On Fri, Apr 20, 2018 at 03:08:52PM +0200, Michal Hocko wrote: > > In order to detect these bugs reliably I submit this patch that changes > > kvmalloc to always use vmalloc if CONFIG_DEBUG_VM is turned on. > > No way. This is just wrong! First of all, you will explode most likely > on many

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-04-20 Thread Michal Hocko
On Fri 20-04-18 06:41:36, Matthew Wilcox wrote: > On Fri, Apr 20, 2018 at 03:08:52PM +0200, Michal Hocko wrote: > > > In order to detect these bugs reliably I submit this patch that changes > > > kvmalloc to always use vmalloc if CONFIG_DEBUG_VM is turned on. > > > > No way. This is just wrong!

Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-20 Thread Michael S. Tsirkin
On Fri, Apr 20, 2018 at 03:50:41AM +, Liang, Cunming wrote: > > > > -Original Message- > > From: Bie, Tiwei > > Sent: Friday, April 20, 2018 11:28 AM > > To: Michael S. Tsirkin > > Cc: Jason Wang ; alex.william...@redhat.com; > >