Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-24 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 09:18:27AM +0800, Jason Wang wrote: > On Tue, Oct 24, 2023 at 8:03 PM Heng Qi wrote: > > > > > > > > 在 2023/10/12 下午4:29, Jason Wang 写道: > > > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > >> Now, virtio-net already supports per-queue moderation parameter > > >>

Re: [PATCH net-next 5/5] virtio-net: support tx netdim

2023-10-24 Thread Michael S. Tsirkin
On Wed, Oct 25, 2023 at 11:35:43AM +0800, Jason Wang wrote: > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > > > Similar to rx netdim, this patch supports adaptive tx > > coalescing moderation for the virtio-net. > > > > Signed-off-by: Heng Qi > > --- > > drivers/net/virtio_net.c | 143

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-24 Thread Michael S. Tsirkin
On Thu, Oct 12, 2023 at 03:44:04PM +0800, Heng Qi wrote: > Now, virtio-net already supports per-queue moderation parameter > setting. Based on this, we use the netdim library of linux to support > dynamic coalescing moderation for virtio-net. > > Due to hardware scheduling issues, we only tested

Re: [PATCH net-next 5/5] virtio-net: support tx netdim

2023-10-24 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > Similar to rx netdim, this patch supports adaptive tx > coalescing moderation for the virtio-net. > > Signed-off-by: Heng Qi > --- > drivers/net/virtio_net.c | 143 --- > 1 file changed, 119 insertions(+), 24

Re: [PATCH net-next 4/5] virtio-net: support rx netdim

2023-10-24 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > By comparing the traffic information in the complete napi processes, > let the virtio-net driver automatically adjust the coalescing > moderation parameters of each receive queue. > > Signed-off-by: Heng Qi > --- > drivers/net/virtio_net.c |

Re: [PATCH net-next 3/5] virtio-net: extract virtqueue coalescig cmd for reuse

2023-10-24 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > Extract commands to set virtqueue coalescing parameters for reuse > by ethtool -Q, vq resize and netdim. > > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 106 +++ >

Re: [PATCH net-next 1/5] virtio-net: returns whether napi is complete

2023-10-24 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > rx netdim needs to count the traffic during a complete napi process, > and start updating and comparing samples to make decisions after > the napi ends. Let virtqueue_napi_complete() return true if napi is done, > otherwise vice versa. > >

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-24 Thread Jason Wang
On Tue, Oct 24, 2023 at 8:03 PM Heng Qi wrote: > > > > 在 2023/10/12 下午4:29, Jason Wang 写道: > > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > >> Now, virtio-net already supports per-queue moderation parameter > >> setting. Based on this, we use the netdim library of linux to support > >>

Re: [PATCH v4 5/7] vhost-vdpa: clean iotlb map during reset for older userspace

2023-10-24 Thread Jason Wang
On Wed, Oct 25, 2023 at 12:25 AM Si-Wei Liu wrote: > > > > On 10/24/2023 9:21 AM, Si-Wei Liu wrote: > > > > > > On 10/23/2023 10:45 PM, Jason Wang wrote: > >> On Sat, Oct 21, 2023 at 5:28 PM Si-Wei Liu > >> wrote: > >>> Using .compat_reset op from the previous patch, the buggy .reset > >>>

Re: Bug#1054514: linux-image-6.1.0-13-amd64: Debian VM with qxl graphics freezes frequently

2023-10-24 Thread Salvatore Bonaccorso
Hi Timo, On Tue, Oct 24, 2023 at 11:14:32PM +0300, Timo Lindfors wrote: > Package: src:linux > Version: 6.1.55-1 > Severity: normal > > Steps to reproduce: > 1) Install Debian 12 as a virtual machine using virt-manager, choose qxl >graphics card. You only need basic installation without

Re: [PATCH] virtio_console: Annotate struct port_buffer with __counted_by

2023-10-24 Thread Kees Cook
On Fri, 22 Sep 2023 10:51:15 -0700, Kees Cook wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array

Re: [PATCH V1 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO admin commands

2023-10-24 Thread Michael S. Tsirkin
On Tue, Oct 17, 2023 at 04:42:14PM +0300, Yishai Hadas wrote: > Introduce APIs to execute legacy IO admin commands. > > It includes: list_query/use, io_legacy_read/write, > io_legacy_notify_info. > > Those APIs will be used by the next patches from this series. > > Signed-off-by: Yishai Hadas

Re: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-24 Thread Alex Williamson
On Tue, 17 Oct 2023 16:42:17 +0300 Yishai Hadas wrote: > Introduce a vfio driver over virtio devices to support the legacy > interface functionality for VFs. > > Background, from the virtio spec [1]. > > In some systems, there

Re: [PATCH v4 0/7] vdpa: decouple reset of iotlb mapping from device reset

2023-10-24 Thread Si-Wei Liu
Thanks a lot for testing! Please be aware that there's a follow-up fix for a potential oops in this v4 series: https://lore.kernel.org/virtualization/1698102863-21122-1-git-send-email-si-wei@oracle.com/ Would be nice to have it applied for any tests. Thanks, -Siwei On 10/23/2023 11:51

Re: [PATCH v4 5/7] vhost-vdpa: clean iotlb map during reset for older userspace

2023-10-24 Thread Si-Wei Liu
On 10/24/2023 9:21 AM, Si-Wei Liu wrote: On 10/23/2023 10:45 PM, Jason Wang wrote: On Sat, Oct 21, 2023 at 5:28 PM Si-Wei Liu wrote: Using .compat_reset op from the previous patch, the buggy .reset behaviour can be kept as-is on older userspace apps, which don't ack the IOTLB_PERSIST

Re: [PATCH v4 5/7] vhost-vdpa: clean iotlb map during reset for older userspace

2023-10-24 Thread Si-Wei Liu
On 10/23/2023 10:45 PM, Jason Wang wrote: On Sat, Oct 21, 2023 at 5:28 PM Si-Wei Liu wrote: Using .compat_reset op from the previous patch, the buggy .reset behaviour can be kept as-is on older userspace apps, which don't ack the IOTLB_PERSIST backend feature. As this compatibility quirk is

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-10-24 Thread Casey Schaufler
On 10/24/2023 2:49 AM, Maxime Coquelin wrote: > > > On 10/23/23 17:13, Casey Schaufler wrote: >> On 10/23/2023 12:28 AM, Maxime Coquelin wrote: >>> >>> >>> On 10/21/23 00:20, Casey Schaufler wrote: On 10/20/2023 8:58 AM, Maxime Coquelin wrote: > This patch introduces LSM hooks for devices

Re: [PATCH 1/2] virtio_pci: Don't make an extra copy of cpu affinity mask

2023-10-24 Thread Jakub Sitnicki via Virtualization
On Tue, Oct 24, 2023 at 07:46 PM +08, Xuan Zhuo wrote: > On Tue, 24 Oct 2023 13:26:49 +0200, Jakub Sitnicki > wrote: >> On Tue, Oct 24, 2023 at 06:53 PM +08, Xuan Zhuo wrote: >> > On Tue, 24 Oct 2023 10:17:19 +0200, Jakub Sitnicki >> > wrote: >> >> On Tue, Oct 24, 2023 at 10:31 AM +08, Xuan

Re: [PATCH 1/2] virtio_pci: Don't make an extra copy of cpu affinity mask

2023-10-24 Thread Xuan Zhuo
On Tue, 24 Oct 2023 13:26:49 +0200, Jakub Sitnicki wrote: > On Tue, Oct 24, 2023 at 06:53 PM +08, Xuan Zhuo wrote: > > On Tue, 24 Oct 2023 10:17:19 +0200, Jakub Sitnicki > > wrote: > >> On Tue, Oct 24, 2023 at 10:31 AM +08, Xuan Zhuo wrote: > >> > On Mon, 23 Oct 2023 18:52:45 +0200, Jakub

Re: [PATCH 1/2] virtio_pci: Don't make an extra copy of cpu affinity mask

2023-10-24 Thread Jakub Sitnicki via Virtualization
On Tue, Oct 24, 2023 at 06:53 PM +08, Xuan Zhuo wrote: > On Tue, 24 Oct 2023 10:17:19 +0200, Jakub Sitnicki > wrote: >> On Tue, Oct 24, 2023 at 10:31 AM +08, Xuan Zhuo wrote: >> > On Mon, 23 Oct 2023 18:52:45 +0200, Jakub Sitnicki >> > wrote: >> >> On Thu, Oct 19, 2023 at 08:55 PM +08, Xuan

Re: [PATCH v3] ALSA: virtio: use ack callback

2023-10-24 Thread Matias Ezequiel Vara Larsen
On Tue, Oct 24, 2023 at 09:11:10AM +0900, Anton Yakovlev wrote: > Hi Matias, > > Thanks for the new patch! > > > > On 24.10.2023 00:06, Matias Ezequiel Vara Larsen wrote: > > This commit uses the ack() callback to determine when a buffer has been > > updated, then exposes it to guest. > > > >

Re: [PATCH v3] ALSA: virtio: use ack callback

2023-10-24 Thread Matias Ezequiel Vara Larsen
On Mon, Oct 23, 2023 at 05:50:00PM +0200, Takashi Iwai wrote: > On Mon, 23 Oct 2023 17:06:57 +0200, > Matias Ezequiel Vara Larsen wrote: > > > > +static int virtsnd_pcm_ack(struct snd_pcm_substream *substream) > > +{ > > + struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream); >

Re: [PATCH 1/2] virtio_pci: Don't make an extra copy of cpu affinity mask

2023-10-24 Thread Xuan Zhuo
On Tue, 24 Oct 2023 10:17:19 +0200, Jakub Sitnicki wrote: > On Tue, Oct 24, 2023 at 10:31 AM +08, Xuan Zhuo wrote: > > On Mon, 23 Oct 2023 18:52:45 +0200, Jakub Sitnicki > > wrote: > >> On Thu, Oct 19, 2023 at 08:55 PM +08, Xuan Zhuo wrote: > >> > On Thu, 19 Oct 2023 12:16:24 +0200, Jakub

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-10-24 Thread Maxime Coquelin
On 10/23/23 17:13, Casey Schaufler wrote: On 10/23/2023 12:28 AM, Maxime Coquelin wrote: On 10/21/23 00:20, Casey Schaufler wrote: On 10/20/2023 8:58 AM, Maxime Coquelin wrote: This patch introduces LSM hooks for devices creation, destruction and opening operations, checking the

Re: [PATCH 1/2] virtio_pci: Don't make an extra copy of cpu affinity mask

2023-10-24 Thread Jakub Sitnicki via Virtualization
On Tue, Oct 24, 2023 at 10:31 AM +08, Xuan Zhuo wrote: > On Mon, 23 Oct 2023 18:52:45 +0200, Jakub Sitnicki > wrote: >> On Thu, Oct 19, 2023 at 08:55 PM +08, Xuan Zhuo wrote: >> > On Thu, 19 Oct 2023 12:16:24 +0200, Jakub Sitnicki >> > wrote: >> >> Since commit 19e226e8cc5d ("virtio: Make

Re: [PATCH] vhost-vdpa: fix NULL pointer deref in _compat_vdpa_reset

2023-10-24 Thread Dragos Tatulea via Virtualization
On Mon, 2023-10-23 at 16:14 -0700, Si-Wei Liu wrote: > As subject. There's a vhost_vdpa_reset() done earlier before > vhost_dev is initialized via vhost_dev_init(), ending up with > NULL pointer dereference. Fix is to check if vqs is initialized > before checking backend features and resetting the

Re: [RFC] vhost: vmap virtio descriptor table kernel/kvm

2023-10-24 Thread Liang Chen
On Tue, Oct 24, 2023 at 12:45 PM Jason Wang wrote: > > On Tue, Oct 24, 2023 at 11:17 AM Liang Chen wrote: > > > > The current vhost code uses 'copy_from_user' to copy descriptors from > > userspace to vhost. We attempted to 'vmap' the descriptor table to > > reduce the overhead associated with

Re: [PATCH v3] vsock/virtio: initialize the_virtio_vsock before using VQs

2023-10-24 Thread Stefano Garzarella
On Mon, Oct 23, 2023 at 10:22:07PM +0300, Alexandru Matei wrote: Once VQs are filled with empty buffers and we kick the host, it can send connection requests. If the_virtio_vsock is not initialized before, replies are silently dropped and do not reach the host. virtio_transport_send_pkt() can