[PATCH net-next v3 07/11] VSOCK: add AF_VSOCK test cases

2019-12-18 Thread Stefano Garzarella
From: Stefan Hajnoczi The vsock_test.c program runs a test suite of AF_VSOCK test cases. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v2: * Drop unnecessary includes [Stefan] * Aligned with the current SPDX [Stefano] * Set MULTICONN_NFDS to 100 [Stefano] * Change (i

[PATCH net-next v3 02/11] VSOCK: add SPDX identifiers to vsock tests

2019-12-18 Thread Stefano Garzarella
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v2: * Aligned with the current SPDX [Stefano] --- tools/testing/vsock/control.h | 1 + tools/testing/vsock/timeout.h | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/testing/vsock/control.h b

[PATCH net-next v3 03/11] VSOCK: extract utility functions from vsock_diag_test.c

2019-12-18 Thread Stefano Garzarella
From: Stefan Hajnoczi Move useful functions into a separate file in preparation for more vsock test programs. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v2: * aligned with the current SPDX [Stefano] --- tools/testing/vsock/Makefile | 2 +- tools/testing/vs

[PATCH net-next v3 08/11] vsock_test: wait for the remote to close the connection

2019-12-18 Thread Stefano Garzarella
Before check if a send returns -EPIPE, we need to make sure the connection is closed. To do that, we use epoll API to wait EPOLLRDHUP or EPOLLHUP events on the socket. Reported-by: Jorgen Hansen Signed-off-by: Stefano Garzarella --- v3: - removed unnecessary control_expectln("CLOSED") [Stefan]

[PATCH net-next v3 09/11] testing/vsock: add parameters to list and skip tests

2019-12-18 Thread Stefano Garzarella
Some tests can fail with transports that have a slightly different behavior, so let's add the possibility to specify which tests to skip. Signed-off-by: Stefano Garzarella --- tools/testing/vsock/control.c | 15 +- tools/testing/vsock/control.h | 1 + tools/testing/vsock/uti

[PATCH net-next v3 11/11] vsock_test: add SOCK_STREAM MSG_PEEK test

2019-12-18 Thread Stefano Garzarella
Test if the MSG_PEEK flags of recv(2) works as expected. Signed-off-by: Stefano Garzarella --- tools/testing/vsock/vsock_test.c | 34 1 file changed, 34 insertions(+) diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index a63e05d6

[PATCH net-next v3 04/11] VSOCK: extract connect/accept functions from vsock_diag_test.c

2019-12-18 Thread Stefano Garzarella
From: Stefan Hajnoczi Many test cases will need to connect to the server or accept incoming connections. This patch extracts these operations into utility functions that can be reused. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- tools/testing/vsock/util.c

[PATCH net-next v3 05/11] VSOCK: add full barrier between test cases

2019-12-18 Thread Stefano Garzarella
From: Stefan Hajnoczi See code comment for details. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- tools/testing/vsock/util.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c i

[PATCH net-next v3 10/11] testing/vsock: print list of options and description

2019-12-18 Thread Stefano Garzarella
Since we now have several options, in the help we print the list of all supported options and a brief description of them. Signed-off-by: Stefano Garzarella --- tools/testing/vsock/vsock_diag_test.c | 13 - tools/testing/vsock/vsock_test.c | 13 - 2 files changed, 24

[PATCH net-next v3 06/11] VSOCK: add send_byte()/recv_byte() test utilities

2019-12-18 Thread Stefano Garzarella
From: Stefan Hajnoczi Test cases will want to transfer data. This patch adds utility functions to do this. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v3: * check the byte received in the recv_byte() * use send(2)/recv(2) instead of write(2)/read(2) to test also fla

[PATCH net-next v3 01/11] VSOCK: fix header include in vsock_diag_test

2019-12-18 Thread Stefano Garzarella
From: Stefan Hajnoczi The vsock_diag_test program directly included ../../../include/uapi/ headers from the source tree. Tests are supposed to use the usr/include/linux/ headers that have been prepared with make headers_install instead. Suggested-by: David S. Miller Signed-off-by: Stefan Hajno

[PATCH net-next v3 00/11] VSOCK: add vsock_test test suite

2019-12-18 Thread Stefano Garzarella
The vsock_diag.ko module already has a test suite but the core AF_VSOCK functionality has no tests. This patch series adds several test cases that exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept, half-closed connections, simultaneous connections). The v1 of this series wa

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

2019-12-18 Thread Christian Borntraeger
On 18.12.19 16:10, Michael S. Tsirkin wrote: > On Wed, Dec 18, 2019 at 03:43:43PM +0100, Christian Borntraeger wrote: >> Michael, >> >> with >> commit db7286b100b503ef80612884453bed53d74c9a16 >> (refs/bisect/skip-db7286b100b503ef80612884453bed53d74c9a16) >> vhost: use batched version by defau

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

2019-12-18 Thread Christian Borntraeger
Michael, with commit db7286b100b503ef80612884453bed53d74c9a16 (refs/bisect/skip-db7286b100b503ef80612884453bed53d74c9a16) vhost: use batched version by default plus commit 6bd262d5eafcdf8cdfae491e2e748e4e434dcda6 (HEAD, refs/bisect/bad) Revert "vhost/net: add an option to test new code"

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

2019-12-18 Thread Michael S. Tsirkin
On Wed, Dec 18, 2019 at 03:43:43PM +0100, Christian Borntraeger wrote: > Michael, > > with > commit db7286b100b503ef80612884453bed53d74c9a16 > (refs/bisect/skip-db7286b100b503ef80612884453bed53d74c9a16) > vhost: use batched version by default > plus > commit 6bd262d5eafcdf8cdfae491e2e748e4e4

[PATCH v3 4/5] iommu: intel: Use generic_iommu_put_resv_regions()

2019-12-18 Thread Thierry Reding
From: Thierry Reding Use the new standard function instead of open-coding it. Cc: David Woodhouse Signed-off-by: Thierry Reding --- drivers/iommu/intel-iommu.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iom

[PATCH v3 3/5] iommu: amd: Use generic_iommu_put_resv_regions()

2019-12-18 Thread Thierry Reding
From: Thierry Reding Use the new standard function instead of open-coding it. Signed-off-by: Thierry Reding --- drivers/iommu/amd_iommu.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 7a6c056b9b9c..9e

[PATCH v3 2/5] iommu: arm: Use generic_iommu_put_resv_regions()

2019-12-18 Thread Thierry Reding
From: Thierry Reding Use the new standard function instead of open-coding it. Cc: Will Deacon Cc: Robin Murphy Acked-by: Will Deacon Signed-off-by: Thierry Reding --- drivers/iommu/arm-smmu-v3.c | 11 +-- drivers/iommu/arm-smmu.c| 11 +-- 2 files changed, 2 insertions(+)

[PATCH v3 0/5] iommu: Implement generic_iommu_put_resv_regions()

2019-12-18 Thread Thierry Reding
From: Thierry Reding Most IOMMU drivers only need to free the memory allocated for each reserved region. Instead of open-coding the loop to do this in each driver, extract the code into a common function that can be used by all these drivers. Changes in v3: - add Reviewed-by from Jean-Philippe B

[PATCH v3 1/5] iommu: Implement generic_iommu_put_resv_regions()

2019-12-18 Thread Thierry Reding
From: Thierry Reding Implement a generic function for removing reserved regions. This can be used by drivers that don't do anything fancy with these regions other than allocating memory for them. Signed-off-by: Thierry Reding --- drivers/iommu/iommu.c | 19 +++ include/linux/io

[PATCH v3 5/5] iommu: virtio: Use generic_iommu_put_resv_regions()

2019-12-18 Thread Thierry Reding
From: Thierry Reding Use the new standard function instead of open-coding it. Cc: Jean-Philippe Brucker Cc: virtualization@lists.linux-foundation.org Reviewed-by: Jean-Philippe Brucker Signed-off-by: Thierry Reding --- drivers/iommu/virtio-iommu.c | 14 +++--- 1 file changed, 3 inser

[PATCH v4 2/3] drm/virtio: fix mmap page attributes

2019-12-18 Thread Gerd Hoffmann
virtio-gpu uses cached mappings, set drm_gem_shmem_object.map_cached accordingly. Reported-by: Gurchetan Singh Signed-off-by: Gerd Hoffmann virtio fixup --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/dr

Re: [RFC 00/13] virtio-iommu on non-devicetree platforms

2019-12-18 Thread Jean-Philippe Brucker
On Tue, Dec 03, 2019 at 07:01:36PM -0800, Jacob Pan (Jun) wrote: > Hi Jean, > > Sorry for the delay, I was out last week. Comments inline below. > > On Mon, 25 Nov 2019 19:02:47 +0100 > Jean-Philippe Brucker wrote: > > > On Fri, Nov 22, 2019 at 04:01:02PM -0800, Jacob Pan (Jun) wrote: > > > > (

Re: read_barrier_depends() usage in vhost.c

2019-12-18 Thread Herbert Xu
Will Deacon wrote: > >> --->8 >> >> // drivers/vhost/vhost.c >> static int get_indirect(struct vhost_virtqueue *vq, >> struct iovec iov[], unsigned int iov_size, >> unsigned int *out_num, unsigned int *in_num, >> struct vhost_log *

Re: [PATCH 2/2] virtio-pci: check name when counting MSI-X vectors

2019-12-18 Thread Cornelia Huck
On Tue, 17 Dec 2019 11:06:10 -0800 Daniel Verkamp wrote: > VQs without a name specified are not valid; they are skipped in the > later loop that assigns MSI-X vectors to queues, but the per_vq_vectors > loop above that counts the required number of vectors previously still > counted any queue wit

Re: [PATCH 1/2] virtio-balloon: initialize all vq callbacks

2019-12-18 Thread Cornelia Huck
On Tue, 17 Dec 2019 11:06:09 -0800 Daniel Verkamp wrote: > Ensure that elements of the array that correspond to unavailable s/array/callbacks array/ ? > features are set to NULL; previously, they would be left uninitialized. > > Since the corresponding names array elements were explicitly set