Re: [PATCH v5 0/4] Add a vhost RPMsg API

2020-09-08 Thread Michael S. Tsirkin
On Wed, Aug 26, 2020 at 07:46:32PM +0200, Guennadi Liakhovetski wrote: > Hi, > > Next update: OK could we get some acks from rpmsg folks on this please? It's been quite a while, patchset is not huge. > v5: > - don't hard-code message layout > > v4: > - add endianness conversions to comply

Re: [PATCH] Rescan the entire target on transport reset when LUN is 0

2020-09-08 Thread Michael S. Tsirkin
On Fri, Aug 28, 2020 at 12:21:35PM +, Matej Genci wrote: > VirtIO 1.0 spec says > The removed and rescan events ... when sent for LUN 0, they MAY > apply to the entire target so the driver can ask the initiator > to rescan the target to detect this. > > This change introduces the

Re: [PATCH v3] virtio-rng: return available data with O_NONBLOCK

2020-09-08 Thread Michael S. Tsirkin
On Mon, Aug 31, 2020 at 02:37:26PM +0200, Laurent Vivier wrote: > On 28/08/2020 23:34, Martin Wilck wrote: > > On Wed, 2020-08-26 at 08:26 -0400, Michael S. Tsirkin wrote: > >> On Tue, Aug 11, 2020 at 04:42:32PM +0200, Laurent Vivier wrote: > >>> On 11/08/202

Re: [PATCH 1/2] vhost: remove mutex ops in vhost_set_backend_features

2020-09-08 Thread Michael S. Tsirkin
On Mon, Sep 07, 2020 at 06:52:19PM +0800, Zhu Lingshan wrote: > In vhost_vdpa ioctl SET_BACKEND_FEATURES path, currect code > would try to acquire vhost dev mutex twice > (first shown in vhost_vdpa_unlocked_ioctl), which can lead > to a dead lock issue. > This commit removed mutex operations in

Re: [PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK

2020-09-08 Thread Michael S. Tsirkin
On Mon, Sep 07, 2020 at 02:43:51PM +0300, Eli Cohen wrote: > On Mon, Sep 07, 2020 at 07:34:00AM -0400, Michael S. Tsirkin wrote: > > On Mon, Sep 07, 2020 at 10:51:36AM +0300, Eli Cohen wrote: > > > If the memory map changes before the driver status is > > > VIRTIO_CONFIG

Re: [PATCH v11 0/2] s390: virtio: let arch validate VIRTIO features

2020-09-08 Thread Michael S. Tsirkin
On Tue, Sep 08, 2020 at 08:55:21AM +0200, Cornelia Huck wrote: > On Tue, 8 Sep 2020 00:39:51 +0200 > Halil Pasic wrote: > > > On Mon, 7 Sep 2020 11:39:05 +0200 > > Pierre Morel wrote: > > > > > Hi all, > > > > > > The goal of the series is to give a chance to the architecture > > > to

Re: [PATCH v11 0/2] s390: virtio: let arch validate VIRTIO features

2020-09-08 Thread Michael S. Tsirkin
On Tue, Sep 08, 2020 at 12:39:51AM +0200, Halil Pasic wrote: > On Mon, 7 Sep 2020 11:39:05 +0200 > Pierre Morel wrote: > > > Hi all, > > > > The goal of the series is to give a chance to the architecture > > to validate VIRTIO device features. > > Michael, is this going in via your tree? I

Re: [PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK

2020-09-07 Thread Michael S. Tsirkin
On Mon, Sep 07, 2020 at 10:51:36AM +0300, Eli Cohen wrote: > If the memory map changes before the driver status is > VIRTIO_CONFIG_S_DRIVER_OK, don't attempt to create resources because it > may fail. For example, if the VQ is not ready there is no point in > creating resources. > > Fixes:

Re: [PATCH] i2c: virtio: add a virtio i2c frontend driver

2020-09-03 Thread Michael S. Tsirkin
On Thu, Sep 03, 2020 at 01:34:45PM +0800, Jie Deng wrote: > Add an I2C bus driver for virtio para-virtualization. > > The controller can be emulated by the backend driver in > any device model software by following the virtio protocol. > > This driver communicates with the backend driver through

Re: [PATCH net-next] vhost: fix typo in error message

2020-09-01 Thread Michael S. Tsirkin
On Tue, Sep 01, 2020 at 10:39:09AM +0800, Yunsheng Lin wrote: > "enable" should be "disable" when the function name is > vhost_disable_notify(), which does the disabling work. > > Signed-off-by: Yunsheng Lin Acked-by: Michael S. Tsirkin Why net-next though

[GIT PULL] virtio: bugfixes

2020-08-26 Thread Michael S. Tsirkin
to cbb523594eb718944b726ba52bb43a1d66188a17: vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms (2020-08-26 08:13:59 -0400) virtio: bugfixes A couple vdpa and vhost bugfixes Signed-off-by: Michael S. Tsirkin

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-08-26 Thread Michael S. Tsirkin
On Fri, Aug 21, 2020 at 03:15:34PM +0200, Jean-Philippe Brucker wrote: > Add a topology description to the virtio-iommu driver and enable x86 > platforms. > > Since [v2] we have made some progress on adding ACPI support for > virtio-iommu, which is the preferred boot method on x86. It will be a >

Re: [PATCH v3] virtio-rng: return available data with O_NONBLOCK

2020-08-26 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 04:42:32PM +0200, Laurent Vivier wrote: > On 11/08/2020 16:28, mwi...@suse.com wrote: > > From: Martin Wilck > > > > If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and > > non-blocking read() to retrieve random data, it ends up in a tight > > loop with

Re: [PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq

2020-08-26 Thread Michael S. Tsirkin
On Fri, Aug 07, 2020 at 11:52:09AM +0800, Jason Wang wrote: > > On 2020/7/23 下午5:12, Jason Wang wrote: > > We ignore the err of requesting config interrupt, fix this. > > > > Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF") > > Cc: Zhu Lingshan > > Signed-off-by: Jason Wang >

Re: [PATCH v4 4/4] vhost: add an RPMsg API

2020-08-25 Thread Michael S. Tsirkin
te: > > Hi Michael, > > > > Thanks for a review. > > > > On Mon, Aug 10, 2020 at 09:44:15AM -0400, Michael S. Tsirkin wrote: > > > On Tue, Aug 04, 2020 at 05:19:17PM +0200, Guennadi Liakhovetski wrote: > > [snip] > > > > > > > +static int vhos

Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 03:53:54PM +0200, Laurent Vivier wrote: > On 11/08/2020 15:14, Michael S. Tsirkin wrote: > > On Tue, Aug 11, 2020 at 03:00:14PM +0200, Laurent Vivier wrote: > >> No problem. This code is tricky and it took me several months to really > &

Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 03:00:14PM +0200, Laurent Vivier wrote: > No problem. This code is tricky and it took me several months to really > start to understand it ... Oh great, we actually have someone who understands the code! Maybe you can help me understand: virtio_read takes the buf pointer

Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 02:07:23PM +0200, Martin Wilck wrote: > On Tue, 2020-08-11 at 07:26 -0400, Michael S. Tsirkin wrote: > > On Wed, Jul 15, 2020 at 03:32:55PM +0200, mwi...@suse.com wrote: > > > drivers/char/hw_random/virtio-rng.c | 14 ++ > > > 1

Re: VDPA Debug/Statistics

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 11:58:23AM +, Eli Cohen wrote: > On Tue, Aug 11, 2020 at 11:26:20AM +, Eli Cohen wrote: > > Hi All > > > > Currently, the only statistics we get for a VDPA instance comes from the > > virtio_net device instance. Since VDPA involves hardware acceleration, > >

Re: VDPA Debug/Statistics

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 11:26:20AM +, Eli Cohen wrote: > Hi All > > Currently, the only statistics we get for a VDPA instance comes from the > virtio_net device instance. Since VDPA involves hardware acceleration, there > can be quite a lot of information that can be fetched from the

Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK

2020-08-11 Thread Michael S. Tsirkin
On Wed, Jul 15, 2020 at 03:32:55PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and > non-blocking read() to retrieve random data, it ends up in a tight > loop with poll() always returning POLLIN and read() returning EAGAIN.

Re: [PATCH] vhost: vdpa: remove per device feature whitelist

2020-08-11 Thread Michael S. Tsirkin
On Mon, Jul 20, 2020 at 04:50:43PM +0800, Jason Wang wrote: > We used to have a per device feature whitelist to filter out the > unsupported virtio features. But this seems unnecessary since: > > - the main idea behind feature whitelist is to block control vq > feature until we finalize the

vdpa: handling of VIRTIO_F_ACCESS_PLATFORM/VIRTIO_F_ORDER_PLATFORM

2020-08-11 Thread Michael S. Tsirkin
Hi! I'd like to raise the question of whether we can drop the requirement of VIRTIO_F_ACCESS_PLATFORM from vdpa? As far as I can see, it is merely required for virtio vdpa - so should we not enforce it there? The point is support for legacy guests - which mostly just works on x86. Also, what is

[GIT PULL] virtio: features, fixes

2020-08-11 Thread Michael S. Tsirkin
10:38:55 -0400) virtio: fixes, features IRQ bypass support for vdpa and IFC MLX5 vdpa driver Endian-ness fixes for virtio drivers Misc other fixes Signed-off-by: Michael S. Tsirkin

Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range

2020-08-11 Thread Michael S. Tsirkin
On Tue, Aug 11, 2020 at 10:53:09AM +0800, Jason Wang wrote: > > On 2020/8/10 下午8:05, Michael S. Tsirkin wrote: > > On Thu, Aug 06, 2020 at 03:43:54PM +0300, Eli Cohen wrote: > > > On Thu, Aug 06, 2020 at 08:29:22AM -0400, Michael S. Tsirkin wrote: > > > > On Thu,

Re: [PATCH] vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config()

2020-08-10 Thread Michael S. Tsirkin
On Mon, Aug 10, 2020 at 01:31:47PM +0300, Dan Carpenter wrote: > On Sun, Aug 09, 2020 at 06:34:04AM +, Eli Cohen wrote: > > Acked-by: Eli Cohen > > > > BTW, vdpa_sim has the same bug. > > > > I sent a patch for that on April 6. > > [PATCH 2/2] vdpa: Fix pointer math bug in

Re: [PATCH v4 4/4] vhost: add an RPMsg API

2020-08-10 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 05:19:17PM +0200, Guennadi Liakhovetski wrote: > On Tue, Aug 04, 2020 at 10:27:08AM -0400, Michael S. Tsirkin wrote: > > On Wed, Jul 22, 2020 at 05:09:27PM +0200, Guennadi Liakhovetski wrote: > > > Linux supports running the RPMsg protocol over th

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-10 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 10:16:16AM +0800, Jason Wang wrote: > > On 2020/8/4 下午5:21, Michael S. Tsirkin wrote: > > > > > >   +struct vhost_vring_call { > > > > > > +    struct eventfd_ctx *ctx; > > > > > > +    struct irq_by

[PATCH] vdpa/mlx5: fix up endian-ness for mtu

2020-08-10 Thread Michael S. Tsirkin
-off-by: Michael S. Tsirkin --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index c6b9ec47e51d..9df69d5efe8c 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c

[PATCH] vdpa_sim: fix pointer math in get_config

2020-08-10 Thread Michael S. Tsirkin
There is a pointer math bug here: the variable cast is a struct so the offset is in units of struct size. If "offset" is non-zero this will copy memory from beyond the end of the array. fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Reported-by: Dan Carpenter Sign

Re: [PATCH][next] vdpa/mlx5: fix memory allocation failure checks

2020-08-10 Thread Michael S. Tsirkin
On Sun, Aug 09, 2020 at 09:03:47AM +0300, Eli Cohen wrote: > On Thu, Aug 06, 2020 at 05:08:28PM +0100, Colin King wrote: > Acked by: Eli Cohen That should be Acked-by: (with a dash). ___ Virtualization mailing list

[PATCH] vdpa_sim: init iommu lock

2020-08-10 Thread Michael S. Tsirkin
The patch adding the iommu lock did not initialize it. The struct is zero-initialized so this is mostly a problem when using lockdep. Reported-by: kernel test robot Cc: Max Gurtovoy Fixes: 0ea9ee430e74 ("vdpasim: protect concurrent access to iommu iotlb") Signed-off-by: Michael

Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range

2020-08-10 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 03:43:54PM +0300, Eli Cohen wrote: > On Thu, Aug 06, 2020 at 08:29:22AM -0400, Michael S. Tsirkin wrote: > > On Thu, Aug 06, 2020 at 03:03:55PM +0300, Eli Cohen wrote: > > > On Wed, Aug 05, 2020 at 08:51:56AM -0400, Michael S. Tsirkin wrote: > >

Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range

2020-08-06 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 03:03:55PM +0300, Eli Cohen wrote: > On Wed, Aug 05, 2020 at 08:51:56AM -0400, Michael S. Tsirkin wrote: > > On Wed, Jun 17, 2020 at 11:29:44AM +0800, Jason Wang wrote: > > > This patch introduce a config op to get valid iova range from the

Re: [PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy

2020-08-06 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 03:27:38PM +0800, Jason Wang wrote: > > On 2020/8/6 下午1:53, Michael S. Tsirkin wrote: > > On Thu, Aug 06, 2020 at 11:23:05AM +0800, Jason Wang wrote: > > > On 2020/8/5 下午7:40, Michael S. Tsirkin wrote: > > > > On Wed, Aug 05, 2020 at 0

Re: [PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space

2020-08-05 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 11:37:38AM +0800, Jason Wang wrote: > > On 2020/8/5 下午7:45, Michael S. Tsirkin wrote: > > > >#define virtio_cread(vdev, structname, member, ptr) > >

Re: [PATCH 4/4] vhost: vdpa: report iova range

2020-08-05 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 11:29:16AM +0800, Jason Wang wrote: > > On 2020/8/5 下午8:58, Michael S. Tsirkin wrote: > > On Wed, Jun 17, 2020 at 11:29:47AM +0800, Jason Wang wrote: > > > This patch introduces a new ioctl for vhost-vdpa device that can > > > repor

Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range

2020-08-05 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 11:25:11AM +0800, Jason Wang wrote: > > On 2020/8/5 下午8:51, Michael S. Tsirkin wrote: > > On Wed, Jun 17, 2020 at 11:29:44AM +0800, Jason Wang wrote: > > > This patch introduce a config op to get valid iova range from the vDPA > > > d

Re: [PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy

2020-08-05 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 11:23:05AM +0800, Jason Wang wrote: > > On 2020/8/5 下午7:40, Michael S. Tsirkin wrote: > > On Wed, Aug 05, 2020 at 02:14:07PM +0800, Jason Wang wrote: > > > On 2020/8/4 上午5:00, Michael S. Tsirkin wrote: > > > > Some legacy guests just

Re: [vhost:vhost 32/52] include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast

2020-08-05 Thread Michael S. Tsirkin
On Thu, Aug 06, 2020 at 04:17:13AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost > head: 4c05433bc6fb4ae172270f0279be8ba89a3da64f > commit: b025584098e621d88894d28e80af686958e273af [32/52] virtio_input: > convert to LE accessors >

Re: [PATCH V4 linux-next 00/12] VDPA support for Mellanox ConnectX devices

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 04:46:46PM -0300, Jason Gunthorpe wrote: > On Wed, Aug 05, 2020 at 07:01:52PM +, Saeed Mahameed wrote: > > On Wed, 2020-08-05 at 09:12 -0400, Michael S. Tsirkin wrote: > > > On Wed, Aug 05, 2020 at 04:01:58PM +0300, Eli Cohen wrote: > > > >

[PATCH v3 34/38] drm/virtio: convert to LE accessors

2020-08-05 Thread Michael S. Tsirkin
Virtgpu is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin --- drivers/gpu/drm/virtio/virtgpu_kms.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c

[PATCH v3 27/38] virtio_caif: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_caif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/virtio_caif.h b/include/linux/virtio_caif.h index 5d2d3124ca3d..ea722479510c 100644

[PATCH v3 31/38] virtio_fs: convert to LE accessors

2020-08-05 Thread Michael S. Tsirkin
Virtio fs is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin --- fs/fuse/virtio_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 4c4ef5d69298..104f35de5270 100644 --- a/fs/fuse

[PATCH v3 35/38] virtio_mem: convert to LE accessors

2020-08-05 Thread Michael S. Tsirkin
Virtio mem is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_mem.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index

[PATCH v3 30/38] virtio_input: convert to LE accessors

2020-08-05 Thread Michael S. Tsirkin
Virtio input is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_input.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio

[PATCH v3 38/38] virtio_net: use LE accessors for speed/duplex

2020-08-05 Thread Michael S. Tsirkin
Speed and duplex config fields depend on VIRTIO_NET_F_SPEED_DUPLEX which being 63>31 depends on VIRTIO_F_VERSION_1. Accordingly, use LE accessors for these fields. Reported-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c| 9 + include/u

[PATCH v3 37/38] virtio_config: drop LE option from config space

2020-08-05 Thread Michael S. Tsirkin
All drivers now use virtio_cread/write_le for LE config space fields. Drop LE option from virtio_cread/write, only leaving the option to access transitional fields. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_config.h | 28 ++-- 1 file changed, 2

[PATCH v3 32/38] virtio_crypto: convert to LE accessors

2020-08-05 Thread Michael S. Tsirkin
Virtio crypto is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin --- drivers/crypto/virtio/virtio_crypto_core.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers

[PATCH v3 36/38] virtio-iommu: convert to LE accessors

2020-08-05 Thread Michael S. Tsirkin
Virtio iommu is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin --- drivers/iommu/virtio-iommu.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c

[PATCH v3 29/38] virtio_balloon: use LE config space accesses

2020-08-05 Thread Michael S. Tsirkin
Balloon is LE, it's cleaner to access it as such directly. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_balloon.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c

[PATCH v3 25/38] virtio_config: disallow native type fields (again)

2020-08-05 Thread Michael S. Tsirkin
_Generic version allowed __uXX types but that is no longer necessary: Transitional devices should all use __virtioXX types (and __leXX for fields not present in the legacy devices). Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin

[PATCH v3 28/38] virtio_config: add virtio_cread_le_feature

2020-08-05 Thread Michael S. Tsirkin
Mirrors virtio_cread_feature but for LE fields. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_config.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 5b5196fec899..cc7a2b1fd7b2 100644 --- a/include

[PATCH v3 24/38] virtio_config: rewrite using _Generic

2020-08-05 Thread Michael S. Tsirkin
Min compiler version has been raised, so that's ok now. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_config.h | 163 -- 1 file changed, 77 insertions(+), 86 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h

[PATCH v3 10/38] virtio_gpu: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Since gpu is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_gpu.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/virtio_gpu.h

[PATCH v3 09/38] virtio_fs: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Since fs is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Acked-by: Vivek Goyal Acked-by: Vivek Goyal Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 13/38] virtio_mem: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Since this is a modern-only device, tag config space fields as having little endian-ness. TODO: check other uses of __virtioXX types in this header, should probably be __leXX. Signed-off-by: Michael S. Tsirkin Acked-by: David Hildenbrand Reviewed-by: Cornelia Huck --- include/uapi/linux

[PATCH v3 19/38] vdpa: make sure set_features is invoked for legacy

2020-08-05 Thread Michael S. Tsirkin
these. Signed-off-by: Michael S. Tsirkin --- drivers/vdpa/vdpa.c | 1 + include/linux/vdpa.h | 34 ++ 2 files changed, 35 insertions(+) diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c index de211ef3738c..7105265e4793 100644 --- a/drivers/vdpa/vdpa.c +++ b

[PATCH v3 12/38] virtio_iommu: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Since this is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Jean-Philippe Brucker Reviewed-by: Jean-Philippe Brucker Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_iommu.h | 12 ++-- 1 file changed

[PATCH v3 23/38] virtio_config: cread/write cleanup

2020-08-05 Thread Michael S. Tsirkin
Use vars of the correct type instead of casting. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_config.h | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index

[PATCH v3 08/38] virtio_crypto: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Since crypto is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_crypto.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git

[PATCH v3 21/38] virtio_vdpa: legacy features handling

2020-08-05 Thread Michael S. Tsirkin
We normally expect vdpa to use the modern interface. However for consistency, let's use same APIs as vhost for legacy guests. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_vdpa.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/virtio

[PATCH v3 20/38] vhost/vdpa: switch to new helpers

2020-08-05 Thread Michael S. Tsirkin
For new helpers handling legacy features to be effective, vhost needs to invoke them. Tie them in. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vdpa.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index

[PATCH v3 17/38] virtio_config: disallow native type fields

2020-08-05 Thread Michael S. Tsirkin
Transitional devices should all use __virtioXX types (and __leXX for fields not present in legacy devices). Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_config.h | 5 ++--- 1 file changed, 2 insertions

[PATCH v3 16/38] virtio_scsi: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- drivers/scsi/virtio_scsi.c | 4 ++-- include/uapi/linux/virtio_scsi.h | 20 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH v3 14/38] virtio_net: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin --- include/uapi/linux/virtio_net.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 19d23e5baa4e

[PATCH v3 22/38] vdpa_sim: fix endian-ness of config space

2020-08-05 Thread Michael S. Tsirkin
-off-by: Michael S. Tsirkin --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 33 +++- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index a9bc5e0fb353..b7d5727fde4c 100644 --- a/drivers/vdpa

[PATCH v3 26/38] virtio_config: LE config space accessors

2020-08-05 Thread Michael S. Tsirkin
To be used by modern code, as well as to handle LE only fields such as balloon. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_config.h | 65 +++ 1 file changed, 65 insertions(+) diff --git a/include/linux/virtio_config.h b/include/linux

[PATCH v3 06/38] virtio_blk: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_blk.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi

[PATCH v3 07/38] virtio_console: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_console.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/virtio_console.h b/include/uapi/linux

[PATCH v3 11/38] virtio_input: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Since this is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_input.h | 18 +- 1 file changed, 9

[PATCH v3 15/38] virtio_pmem: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Since this is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_pmem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/virtio_pmem.h b

[PATCH v3 03/38] virtio: allow __virtioXX, __leXX in config space

2020-08-05 Thread Michael S. Tsirkin
patches will convert config space to use these types. Signed-off-by: Michael S. Tsirkin Acked-by: Cornelia Huck --- include/linux/virtio_config.h | 50 +-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux

[PATCH v3 04/38] virtio_9p: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_9p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/virtio_9p.h b/include/uapi/linux/virtio_9p.h index

[PATCH v3 05/38] virtio_balloon: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
Tag config space fields as having little endian-ness. Note that balloon is special: LE even when using the legacy interface. Signed-off-by: Michael S. Tsirkin Acked-by: David Hildenbrand Reviewed-by: Cornelia Huck --- include/uapi/linux/virtio_balloon.h | 10 +- 1 file changed, 5

[PATCH v3 01/38] virtio_balloon: fix sparse warning

2020-08-05 Thread Michael S. Tsirkin
balloon uses virtio32_to_cpu instead of cpu_to_virtio32 to convert a native endian number to virtio. No practical difference but makes sparse warn. Fix it up. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Acked-by: David Hildenbrand Reviewed-by: Cornelia Huck --- drivers

[PATCH v3 02/38] virtio_ring: sparse warning fixup

2020-08-05 Thread Michael S. Tsirkin
virtio_store_mb was built with split ring in mind so it accepts __virtio16 arguments. Packed ring uses __le16 values, so sparse complains. It's just a store with some barriers so let's convert it to a macro, we don't loose too much type safety by doing that. Signed-off-by: Michael S. Tsirkin

[PATCH] virtio_net: use LE accessors for speed/duplex

2020-08-05 Thread Michael S. Tsirkin
Speed and duplex config fields depend on VIRTIO_NET_F_SPEED_DUPLEX which being 63>31 depends on VIRTIO_F_VERSION_1. Accordingly, use LE accessors for these fields. Reported-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c| 9 + include/u

Re: [PATCH v2 17/24] virtio_config: disallow native type fields

2020-08-05 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 04:50:39PM +0200, Cornelia Huck wrote: > On Mon, 3 Aug 2020 16:59:57 -0400 > "Michael S. Tsirkin" wrote: > > > Transitional devices should all use __virtioXX types. > > I think they should use __leXX for those fields that are no

Re: [PATCH v2 18/24] mlxbf-tmfifo: sparse tags for config access

2020-08-05 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 04:56:34PM +0200, Cornelia Huck wrote: > On Mon, 3 Aug 2020 17:00:01 -0400 > "Michael S. Tsirkin" wrote: > > > mlxbf-tmfifo accesses config space using native types - > > which works for it since the legacy virtio native types. > >

Re: [PATCH v2 14/24] virtio_net: correct tags for config space fields

2020-08-05 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 04:44:44PM +0200, Cornelia Huck wrote: > On Mon, 3 Aug 2020 16:59:37 -0400 > "Michael S. Tsirkin" wrote: > > > Tag config space fields as having virtio endian-ness. > > > > Signed-off-by: Michael S. Tsirkin > > -

Re: [PATCH V4 linux-next 00/12] VDPA support for Mellanox ConnectX devices

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 04:01:58PM +0300, Eli Cohen wrote: > On Wed, Aug 05, 2020 at 08:48:52AM -0400, Michael S. Tsirkin wrote: > > > > > > Did you merge this?: > > > git pull git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git > > > m

Re: [PATCH 4/4] vhost: vdpa: report iova range

2020-08-05 Thread Michael S. Tsirkin
On Wed, Jun 17, 2020 at 11:29:47AM +0800, Jason Wang wrote: > This patch introduces a new ioctl for vhost-vdpa device that can > report the iova range by the device. For device that depends on > platform IOMMU, we fetch the iova range via DOMAIN_ATTR_GEOMETRY. For > devices that has its own DMA

Re: [PATCH 3/4] vdpa: get_iova_range() is mandatory for device specific DMA translation

2020-08-05 Thread Michael S. Tsirkin
On Wed, Jun 17, 2020 at 11:29:46AM +0800, Jason Wang wrote: > In order to let userspace work correctly, get_iova_range() is a must > for the device that has its own DMA translation logic. I guess you mean for a device. However in absence of ths op, I don't see what is wrong with just assuming

Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range

2020-08-05 Thread Michael S. Tsirkin
On Wed, Jun 17, 2020 at 11:29:44AM +0800, Jason Wang wrote: > This patch introduce a config op to get valid iova range from the vDPA > device. > > Signed-off-by: Jason Wang > --- > include/linux/vdpa.h | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git

Re: [PATCH V4 linux-next 00/12] VDPA support for Mellanox ConnectX devices

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 03:40:54PM +0300, Eli Cohen wrote: > On Wed, Aug 05, 2020 at 08:00:55AM -0400, Michael S. Tsirkin wrote: > > On Tue, Aug 04, 2020 at 07:20:36PM +0300, Eli Cohen wrote: > > > Hi Michael, > > > please note that this series depends on mlx5

Re: [PATCH v2 22/24] vdpa_sim: fix endian-ness of config space

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 02:21:07PM +0800, Jason Wang wrote: > > On 2020/8/4 上午5:00, Michael S. Tsirkin wrote: > > VDPA sim accesses config space as native endian - this is > > wrong since it's a modern device and actually uses LE. > > > > It only supports

Re: [PATCH V4 linux-next 00/12] VDPA support for Mellanox ConnectX devices

2020-08-05 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 07:20:36PM +0300, Eli Cohen wrote: > Hi Michael, > please note that this series depends on mlx5 core device driver patches > in mlx5-next branch in > git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git. > > git pull

Re: [PATCH 2/2] vhost_vdpa: unified set_vq_irq() and update_vq_irq()

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 07:38:32PM +0800, Zhu Lingshan wrote: > This commit merge vhost_vdpa_update_vq_irq() logics into > vhost_vdpa_setup_vq_irq(), so that code are unified. > > In vhost_vdpa_setup_vq_irq(), added checks for the existence > for get_vq_irq(). > > Signed-off-by: Zhu Lingshan

Re: [PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 02:28:23PM +0800, Jason Wang wrote: > > On 2020/8/4 上午4:58, Michael S. Tsirkin wrote: > > Currently all config space fields are of the type __uXX. > > This confuses people and some drivers (notably vdpa) > > access them using CPU endian-ness - w

Re: [PATCH v2 22/24] vdpa_sim: fix endian-ness of config space

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 02:21:07PM +0800, Jason Wang wrote: > > On 2020/8/4 上午5:00, Michael S. Tsirkin wrote: > > VDPA sim accesses config space as native endian - this is > > wrong since it's a modern device and actually uses LE. > > > > It only supports

Re: [PATCH v2 19/24] vdpa: make sure set_features in invoked for legacy

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 02:14:07PM +0800, Jason Wang wrote: > > On 2020/8/4 上午5:00, Michael S. Tsirkin wrote: > > Some legacy guests just assume features are 0 after reset. > > We detect that config space is accessed before features are > > set and set features to 0 autom

Re: [PATCH v4 0/4] Add a vhost RPMsg API

2020-08-05 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 01:30:32PM -0600, Mathieu Poirier wrote: > On Tue, 4 Aug 2020 at 08:07, Michael S. Tsirkin wrote: > > > > On Tue, Aug 04, 2020 at 07:37:49AM -0600, Mathieu Poirier wrote: > > > On Mon, 3 Aug 2020 at 14:47, Michael S. Tsirkin wrote: > > &g

Re: [PATCH V4 linux-next 00/12] VDPA support for Mellanox ConnectX devices

2020-08-04 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 07:20:36PM +0300, Eli Cohen wrote: > Hi Michael, > please note that this series depends on mlx5 core device driver patches > in mlx5-next branch in > git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git. Thanks! OK so what's the plan for merging this? Do

Re: [PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space

2020-08-04 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 04:23:40PM +0200, Cornelia Huck wrote: > On Mon, 3 Aug 2020 16:58:46 -0400 > "Michael S. Tsirkin" wrote: > > > Currently all config space fields are of the type __uXX. > > This confuses people and some drivers (notably vdpa) > > acce

Re: [PATCH v4 4/4] vhost: add an RPMsg API

2020-08-04 Thread Michael S. Tsirkin
On Wed, Jul 22, 2020 at 05:09:27PM +0200, Guennadi Liakhovetski wrote: > Linux supports running the RPMsg protocol over the VirtIO transport > protocol, but currently there is only support for VirtIO clients and > no support for a VirtIO server. This patch adds a vhost-based RPMsg > server

Re: [PATCH v4 0/4] Add a vhost RPMsg API

2020-08-04 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 03:19:19PM +0200, Guennadi Liakhovetski wrote: > Hi Michael, > > On Tue, Aug 04, 2020 at 08:26:53AM -0400, Michael S. Tsirkin wrote: > > On Wed, Jul 22, 2020 at 05:09:23PM +0200, Guennadi Liakhovetski wrote: > > > Hi, > > > > > &

Re: [PATCH v4 0/4] Add a vhost RPMsg API

2020-08-04 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 07:37:49AM -0600, Mathieu Poirier wrote: > On Mon, 3 Aug 2020 at 14:47, Michael S. Tsirkin wrote: > > > > On Mon, Aug 03, 2020 at 07:25:24AM -0600, Mathieu Poirier wrote: > > > On Thu, 30 Jul 2020 at 23:47, Guennadi Liakhovetski > > >

Re: [PATCH v4 0/4] Add a vhost RPMsg API

2020-08-04 Thread Michael S. Tsirkin
On Wed, Jul 22, 2020 at 05:09:23PM +0200, Guennadi Liakhovetski wrote: > Hi, > > Now that virtio-rpmsg endianness fixes have been merged we can > proceed with the next step. OK my attempts to resolve conflicts just created a mess. I dropped these for now, could you pls rebase on top of

Re: [PATCH V3 vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices

2020-08-04 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 02:54:19PM +0300, Eli Cohen wrote: > On Tue, Jul 28, 2020 at 04:43:00PM +0300, kernel test robot wrote: > > Hi Eli, > > > > Thank you for the patch! Yet something to improve: > > > > [auto build test ERROR on next-20200727] > > > > url: > >

  1   2   3   4   5   6   7   8   9   10   >