[PATCH AUTOSEL 4.14 11/13] virtio_ring: Avoid loop when vq is broken in virtqueue_poll

2020-08-19 Thread Sasha Levin
From: Mao Wenan [ Upstream commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e ] The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call t

[PATCH AUTOSEL 4.4 08/10] virtio_ring: Avoid loop when vq is broken in virtqueue_poll

2020-08-19 Thread Sasha Levin
From: Mao Wenan [ Upstream commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e ] The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call t

[PATCH AUTOSEL 4.9 09/11] virtio_ring: Avoid loop when vq is broken in virtqueue_poll

2020-08-19 Thread Sasha Levin
From: Mao Wenan [ Upstream commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e ] The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call t

[PATCH AUTOSEL 4.19 14/18] virtio_ring: Avoid loop when vq is broken in virtqueue_poll

2020-08-19 Thread Sasha Levin
From: Mao Wenan [ Upstream commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e ] The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call t

[PATCH AUTOSEL 5.7 19/24] virtio_ring: Avoid loop when vq is broken in virtqueue_poll

2020-08-19 Thread Sasha Levin
From: Mao Wenan [ Upstream commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e ] The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call t

[PATCH AUTOSEL 5.4 17/22] virtio_ring: Avoid loop when vq is broken in virtqueue_poll

2020-08-19 Thread Sasha Levin
From: Mao Wenan [ Upstream commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e ] The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call t

[PATCH AUTOSEL 5.8 21/27] virtio_ring: Avoid loop when vq is broken in virtqueue_poll

2020-08-19 Thread Sasha Levin
From: Mao Wenan [ Upstream commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e ] The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call t

[PATCH v3 04/18] virtio: Implement get_shm_region for PCI transport

2020-08-19 Thread Vivek Goyal
From: Sebastien Boeuf On PCI the shm regions are found using capability entries; find a region by searching for the capability. Signed-off-by: Sebastien Boeuf Signed-off-by: Dr. David Alan Gilbert Signed-off-by: kbuild test robot Acked-by: Michael S. Tsirkin Cc: k...@vger.kernel.org Cc: virt

[PATCH v3 05/18] virtio: Implement get_shm_region for MMIO transport

2020-08-19 Thread Vivek Goyal
From: Sebastien Boeuf On MMIO a new set of registers is defined for finding SHM regions. Add their definitions and use them to find the region. Signed-off-by: Sebastien Boeuf Cc: k...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: "Michael S. Tsirkin" --- drivers/virtio/vi

[PATCH v3 03/18] virtio: Add get_shm_region method

2020-08-19 Thread Vivek Goyal
From: Sebastien Boeuf Virtio defines 'shared memory regions' that provide a continuously shared region between the host and guest. Provide a method to find a particular region on a device. Signed-off-by: Sebastien Boeuf Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Cc: k

[PATCH v9 1/2] virtio: let arch advertise guest's memory access restrictions

2020-08-19 Thread Pierre Morel
An architecture may restrict host access to guest memory. Provide a new Kconfig entry the architecture can select, CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, when it provides the arch_has_restricted_virtio_memory_access callback to advertise VIRTIO common code when the architecture restricts

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

2020-08-19 Thread Pierre Morel
Hi all, The goal of the series is to give a chance to the architecture to validate VIRTIO device features. in this respin: The tests are back to virtio_finalize_features. No more argument for the architecture callback which only reports if the architecture needs guest memory access restrictions

[PATCH v9 2/2] s390: virtio: PV needs VIRTIO I/O device protection

2020-08-19 Thread Pierre Morel
If protected virtualization is active on s390, VIRTIO has retricted access to the guest memory. Define CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS and export arch_has_restricted_virtio_memory_access to advertize VIRTIO if that's the case, preventing a host error on access attempt. Signed-off-b

Re: [PATCH 2/2] drm/virtio: Remove open-coded commit-tail function

2020-08-19 Thread Gerd Hoffmann
On Wed, Aug 19, 2020 at 02:43:28PM +0200, Jiri Slaby wrote: > On 09. 07. 20, 14:33, Daniel Vetter wrote: > > Exactly matches the one in the helpers. > > It's not that exact. The order of modeset_enables and planes is > different. And this causes a regression -- no fb in qemu. Does https://patchwo

Re: [PATCH v8 1/2] virtio: let arch validate VIRTIO features

2020-08-19 Thread Cornelia Huck
On Wed, 19 Aug 2020 10:50:18 +0200 Pierre Morel wrote: > On 2020-08-18 19:19, Cornelia Huck wrote: > > On Tue, 18 Aug 2020 16:58:30 +0200 > > Pierre Morel wrote: > > > ... > >> +config ARCH_HAS_RESTRICTED_MEMORY_ACCESS > >> + bool > >> + help > >> +This option is selected by any archite

Re: [PATCH v8 2/2] s390: virtio: PV needs VIRTIO I/O device protection

2020-08-19 Thread Pierre Morel
On 2020-08-18 19:22, Cornelia Huck wrote: + */ +int arch_has_restricted_memory_access(struct virtio_device *dev) +{ + if (!is_prot_virt_guest()) + return 0; If you just did a return is_prot_virt_guest(); and did the virtio feature stuff in the virtio core, this functio

Re: [PATCH v8 1/2] virtio: let arch validate VIRTIO features

2020-08-19 Thread Pierre Morel
On 2020-08-18 19:19, Cornelia Huck wrote: On Tue, 18 Aug 2020 16:58:30 +0200 Pierre Morel wrote: ... +config ARCH_HAS_RESTRICTED_MEMORY_ACCESS + bool + help + This option is selected by any architecture enforcing + VIRTIO_F_IOMMU_PLATFORM This option is only f