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

2018-04-11 Thread Jiri Pirko
Wed, Apr 11, 2018 at 01:28:51AM CEST, m...@redhat.com wrote: >On Tue, Apr 10, 2018 at 02:26:08PM -0700, Stephen Hemminger wrote: >> On Tue, 10 Apr 2018 11:59:50 -0700 >> Sridhar Samudrala wrote: >> >> > Use the registration/notification framework supported by the generic >> > bypass infrastructur

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

2018-04-11 Thread Jiri Pirko
Tue, Apr 10, 2018 at 11:26:08PM CEST, step...@networkplumber.org wrote: >On Tue, 10 Apr 2018 11:59:50 -0700 >Sridhar Samudrala wrote: > >> Use the registration/notification framework supported by the generic >> bypass infrastructure. >> >> Signed-off-by: Sridhar Samudrala >> --- > >Thanks for do

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-11 Thread Jiri Pirko
Wed, Apr 11, 2018 at 08:24:43AM CEST, sridhar.samudr...@intel.com wrote: >On 4/10/2018 11:03 PM, Jiri Pirko wrote: >> Tue, Apr 10, 2018 at 05:59:02PM CEST, sridhar.samudr...@intel.com wrote: >> > On 4/10/2018 8:43 AM, Jiri Pirko wrote: >> > > Tue, Apr 10, 2018 at 05:27:48PM CEST, sridhar.samudr...@

Re: [PATCH v3 1/2] vhost: fix vhost_vq_access_ok() log check

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 10:35:40AM +0800, Stefan Hajnoczi wrote: > Commit d65026c6c62e7d9616c8ceb5a53b68bcdc050525 ("vhost: validate log > when IOTLB is enabled") introduced a regression. The logic was > originally: > > if (vq->iotlb) > return 1; > return A && B; > > After the patch th

Re: [PATCH v3 2/2] vhost: return bool from *_access_ok() functions

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 10:35:41AM +0800, Stefan Hajnoczi wrote: > Currently vhost *_access_ok() functions return int. This is error-prone > because there are two popular conventions: > > 1. 0 means failure, 1 means success > 2. -errno means failure, 0 means success > > Although vhost mostly use

Re: [PATCH v3 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 10:35:39AM +0800, Stefan Hajnoczi wrote: > v3: > * Rebased onto net/master and resolved conflict [DaveM] > > v2: > * Rewrote the conditional to make the vq access check clearer [Linus] > * Added Patch 2 to make the return type consistent and harder to misuse > [Linus] >

[PATCH] vhost: Fix vhost_copy_to_user()

2018-04-11 Thread Eric Auger
vhost_copy_to_user is used to copy vring used elements to userspace. We should use VHOST_ADDR_USED instead of VHOST_ADDR_DESC. Fixes: f88949138058 ("vhost: introduce O(1) vq metadata cache") Signed-off-by: Eric Auger --- This fixes a stall observed when running an aarch64 guest with virtual smm

Re: [PATCH] vhost: Fix vhost_copy_to_user()

2018-04-11 Thread Jason Wang
On 2018年04月11日 21:30, Eric Auger wrote: vhost_copy_to_user is used to copy vring used elements to userspace. We should use VHOST_ADDR_USED instead of VHOST_ADDR_DESC. Fixes: f88949138058 ("vhost: introduce O(1) vq metadata cache") Signed-off-by: Eric Auger --- This fixes a stall observed wh

Re: [PATCH] vhost: Fix vhost_copy_to_user()

2018-04-11 Thread Auger Eric
Hi Jason, On 11/04/18 15:44, Jason Wang wrote: > > > On 2018年04月11日 21:30, Eric Auger wrote: >> vhost_copy_to_user is used to copy vring used elements to userspace. >> We should use VHOST_ADDR_USED instead of VHOST_ADDR_DESC. >> >> Fixes: f88949138058 ("vhost: introduce O(1) vq metadata cache")

Re: [PATCH] vhost: Fix vhost_copy_to_user()

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 03:30:38PM +0200, Eric Auger wrote: > vhost_copy_to_user is used to copy vring used elements to userspace. > We should use VHOST_ADDR_USED instead of VHOST_ADDR_DESC. > > Fixes: f88949138058 ("vhost: introduce O(1) vq metadata cache") > Signed-off-by: Eric Auger Acked-by:

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 10:03:32AM +0200, Jiri Pirko wrote: > Wed, Apr 11, 2018 at 08:24:43AM CEST, sridhar.samudr...@intel.com wrote: > >On 4/10/2018 11:03 PM, Jiri Pirko wrote: > >> Tue, Apr 10, 2018 at 05:59:02PM CEST, sridhar.samudr...@intel.com wrote: > >> > On 4/10/2018 8:43 AM, Jiri Pirko wr

Re: [RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available

2018-04-11 Thread Jiri Pirko
Wed, Apr 11, 2018 at 04:45:07PM CEST, m...@redhat.com wrote: >On Wed, Apr 11, 2018 at 10:03:32AM +0200, Jiri Pirko wrote: >> Wed, Apr 11, 2018 at 08:24:43AM CEST, sridhar.samudr...@intel.com wrote: >> >On 4/10/2018 11:03 PM, Jiri Pirko wrote: >> >> Tue, Apr 10, 2018 at 05:59:02PM CEST, sridhar.samu

Re: [PATCH v3 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-11 Thread David Miller
From: "Michael S. Tsirkin" Date: Wed, 11 Apr 2018 16:24:02 +0300 > On Wed, Apr 11, 2018 at 10:35:39AM +0800, Stefan Hajnoczi wrote: >> v3: >> * Rebased onto net/master and resolved conflict [DaveM] >> >> v2: >> * Rewrote the conditional to make the vq access check clearer [Linus] >> * Added P

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-11 Thread Jiri Pirko
Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com 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 their datapath. The notifier and >event handling

Re: [PATCH 1/4] iommu: Add virtio-iommu driver

2018-04-11 Thread Jean-Philippe Brucker
On 23/03/18 14:48, Robin Murphy wrote: [..] >> + * Virtio driver for the paravirtualized IOMMU >> + * >> + * Copyright (C) 2018 ARM Limited >> + * Author: Jean-Philippe Brucker >> + * >> + * SPDX-License-Identifier: GPL-2.0 > > This wants to be a // comment at the very top of the file (thankfully

Re: [PATCH 2/4] iommu/virtio: Add probe request

2018-04-11 Thread Jean-Philippe Brucker
On 23/03/18 15:00, Robin Murphy wrote: [...] >> +/* >> + * Treat unknown subtype as RESERVED, but urge users to update their >> + * driver. >> + */ >> +if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED && >> +mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_MSI) >> +

Re: [PATCH 1/4] iommu: Add virtio-iommu driver

2018-04-11 Thread Jean-Philippe Brucker
On 23/03/18 08:27, Tian, Kevin wrote: >>> The host kernel needs to have *some* MSI region in place before the >>> guest can start configuring interrupts, otherwise it won't know what >>> address to give to the underlying hardware. However, as soon as the host >>> kernel has picked a region, host us

[PULL] virtio: feature pull

2018-04-11 Thread Michael S. Tsirkin
The following changes since commit dc32bb678e103afbcfa4d814489af0566307f528: vhost: add vsock compat ioctl (2018-03-20 03:17:42 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to 6c64fe7f2a

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-11 Thread Samudrala, Sridhar
On 4/11/2018 8:51 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com 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 their da

Re: [PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading

2018-04-11 Thread Michael S. Tsirkin
On Mon, Apr 02, 2018 at 09:40:02AM -0400, Vladislav Yasevich wrote: > To support SCTP checksum offloading, we need to add a new feature > to virtio_net, so we can negotiate support between the hypervisor > and the guest. > > The signalling to the guest that an alternate checksum needs to > be used

Re: [virtio-dev] Re: [PATCH v2] virtio_balloon: export hugetlb page allocation counts

2018-04-11 Thread Jonathan Helman
On 04/10/2018 08:12 PM, Jason Wang wrote: On 2018年04月10日 05:11, Jonathan Helman wrote: On 03/22/2018 07:38 PM, Jason Wang wrote: On 2018年03月22日 11:10, Michael S. Tsirkin wrote: On Thu, Mar 22, 2018 at 09:52:18AM +0800, Jason Wang wrote: On 2018年03月20日 12:26, Jonathan Helman wrote: On