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

2023-10-20 Thread Casey Schaufler
On 10/20/2023 8:58 AM, Maxime Coquelin wrote: > This patch introduces LSM hooks for devices creation, > destruction and opening operations, checking the > application is allowed to perform these operations for > the Virtio device type. Why do you think that there needs to be a special LSM check fo

Re: [PATCH v4 1/4] vduse: validate block features only with block devices

2023-10-20 Thread Casey Schaufler
On 10/20/2023 8:58 AM, Maxime Coquelin wrote: > This patch is preliminary work to enable network device > type support to VDUSE. > > As VIRTIO_BLK_F_CONFIG_WCE shares the same value as > VIRTIO_NET_F_HOST_TSO4, we need to restrict its check > to Virtio-blk device type. > > Acked-by: Jason Wang > R

[PATCH v4 1/4] vduse: validate block features only with block devices

2023-10-20 Thread Maxime Coquelin
This patch is preliminary work to enable network device type support to VDUSE. As VIRTIO_BLK_F_CONFIG_WCE shares the same value as VIRTIO_NET_F_HOST_TSO4, we need to restrict its check to Virtio-blk device type. Acked-by: Jason Wang Reviewed-by: Xie Yongji Signed-off-by: Maxime Coquelin --- d

[PATCH v4 2/4] vduse: enable Virtio-net device type

2023-10-20 Thread Maxime Coquelin
This patch adds Virtio-net device type to the supported devices types. Initialization fails if the device does not support VIRTIO_F_VERSION_1 feature, in order to guarantee the configuration space is read-only. Acked-by: Jason Wang Reviewed-by: Xie Yongji Signed-off-by: Maxime Coquelin --- dri

[PATCH v4 0/4] vduse: add support for networking devices

2023-10-20 Thread Maxime Coquelin
This small series enables virtio-net device type in VDUSE. With it, basic operation have been tested, both with virtio-vdpa and vhost-vdpa using DPDK Vhost library series adding VDUSE support using split rings layout (merged in DPDK v23.07-rc1). Control queue support (and so multiqueue) has also b

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

2023-10-20 Thread Maxime Coquelin
This patch introduces LSM hooks for devices creation, destruction and opening operations, checking the application is allowed to perform these operations for the Virtio device type. Signed-off-by: Maxime Coquelin --- drivers/vdpa/vdpa_user/vduse_dev.c | 12 +++ include/linux/lsm_hook_defs.h

[PATCH v4 3/4] vduse: Temporarily disable control queue features

2023-10-20 Thread Maxime Coquelin
Virtio-net driver control queue implementation is not safe when used with VDUSE. If the VDUSE application does not reply to control queue messages, it currently ends up hanging the kernel thread sending this command. Some work is on-going to make the control queue implementation robust with VDUSE.

Re: [PATCH v2 3/6] powerpc/smp: Move shared_processor static key to smp.h

2023-10-20 Thread Michael Ellerman
Srikar Dronamraju writes: > * Michael Ellerman [2023-10-19 15:41:40]: > >> Srikar Dronamraju writes: >> > The ability to detect if the system is running in a shared processor >> > mode is helpful in few more generic cases not just in >> > paravirtualization. >> > For example: At boot time, diffe

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Michael S. Tsirkin
On Fri, Oct 20, 2023 at 05:50:22PM +0800, Xuan Zhuo wrote: > On Fri, 20 Oct 2023 05:42:14 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Oct 20, 2023 at 05:36:41PM +0800, Xuan Zhuo wrote: > > > On Fri, 20 Oct 2023 05:34:32 -0400, "Michael S. Tsirkin" > > > wrote: > > > > On Fri, Oct 20, 2023

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Xuan Zhuo
On Fri, 20 Oct 2023 05:42:14 -0400, "Michael S. Tsirkin" wrote: > On Fri, Oct 20, 2023 at 05:36:41PM +0800, Xuan Zhuo wrote: > > On Fri, 20 Oct 2023 05:34:32 -0400, "Michael S. Tsirkin" > > wrote: > > > On Fri, Oct 20, 2023 at 05:23:21PM +0800, Su Hui wrote: > > > > virtqueue_resize_packed() or

Re: [PATCH v2] ALSA: virtio: use copy and fill_silence callbacks

2023-10-20 Thread Matias Ezequiel Vara Larsen
Hello Takashi, On Thu, Oct 19, 2023 at 09:48:03AM +0200, Takashi Iwai wrote: > On Thu, 19 Oct 2023 03:20:19 +0200, > Anton Yakovlev wrote: > > > > Hi Takashi, > > > > On 19.10.2023 03:07, Takashi Iwai wrote: > > > On Wed, 18 Oct 2023 12:48:23 +0200, > > > Matias Ezequiel Vara Larsen wrote: > > >

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Michael S. Tsirkin
On Fri, Oct 20, 2023 at 05:36:41PM +0800, Xuan Zhuo wrote: > On Fri, 20 Oct 2023 05:34:32 -0400, "Michael S. Tsirkin" > wrote: > > On Fri, Oct 20, 2023 at 05:23:21PM +0800, Su Hui wrote: > > > virtqueue_resize_packed() or virtqueue_resize_split() can return > > > error code if failed, so add a ch

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Xuan Zhuo
On Fri, 20 Oct 2023 05:34:32 -0400, "Michael S. Tsirkin" wrote: > On Fri, Oct 20, 2023 at 05:23:21PM +0800, Su Hui wrote: > > virtqueue_resize_packed() or virtqueue_resize_split() can return > > error code if failed, so add a check for this. > > > > Signed-off-by: Su Hui > > --- > > > > I'm not

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Xuan Zhuo
If any error happens, this function should restore to the old status. So, whether the err is true, we should goto the virtqueue_enable_after_reset(). If the err is true, that mean the resize new quuee failed, but the queue status has restored to the old status. We should ignore the return value

Re: [PATCH] virtio_ring: add an error code check in virtqueue_resize

2023-10-20 Thread Michael S. Tsirkin
On Fri, Oct 20, 2023 at 05:23:21PM +0800, Su Hui wrote: > virtqueue_resize_packed() or virtqueue_resize_split() can return > error code if failed, so add a check for this. > > Signed-off-by: Su Hui > --- > > I'm not sure that return directly is right or not, > maybe there are some process should

Re: [PATCH net-next v1 12/19] virtio_net: xsk: tx: support wakeup

2023-10-20 Thread Xuan Zhuo
On Fri, 20 Oct 2023 14:52:18 +0800, Jason Wang wrote: > On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > > > xsk wakeup is used to trigger the logic for xsk xmit by xsk framework or > > user. > > > > Virtio-Net does not support to actively generate an interruption, so it > > tries to trigger

Re: [PATCH net-next v1 11/19] virtio_net: xsk: tx: support tx

2023-10-20 Thread Xuan Zhuo
On Fri, 20 Oct 2023 14:52:08 +0800, Jason Wang wrote: > On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > > > The driver's tx napi is very important for XSK. It is responsible for > > obtaining data from the XSK queue and sending it out. > > > > At the beginning, we need to trigger tx napi. >

Re: [PATCH net-next v1 09/19] virtio_net: xsk: bind/unbind xsk

2023-10-20 Thread Xuan Zhuo
On Fri, 20 Oct 2023 14:51:15 +0800, Jason Wang wrote: > On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > > > This patch implement the logic of bind/unbind xsk pool to sq and rq. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/net/virtio/Makefile | 2 +- > > drivers/net/virtio/mai

Re: [PATCH net-next v1 08/19] virtio_net: sq support premapped mode

2023-10-20 Thread Xuan Zhuo
On Fri, 20 Oct 2023 14:50:52 +0800, Jason Wang wrote: > On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > > > If the xsk is enabling, the xsk tx will share the send queue. > > But the xsk requires that the send queue use the premapped mode. > > So the send queue must support premapped mode. >

Re: [PATCH] vsock: initialize the_virtio_vsock before using VQs

2023-10-20 Thread Stefano Garzarella
On Fri, Oct 20, 2023 at 12:12:04AM +0300, Alexandru Matei wrote: On 10/19/2023 11:54 AM, Stefano Garzarella wrote: On Wed, Oct 18, 2023 at 09:32:47PM +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'

Re: [PATCH net-next v1 04/19] virtio_net: move to virtio_net.h

2023-10-20 Thread Jason Wang
On Thu, Oct 19, 2023 at 3:20 PM Xuan Zhuo wrote: > > On Thu, 19 Oct 2023 14:12:55 +0800, Jason Wang wrote: > > On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo > > wrote: > > > > > > Move some structure definitions and inline functions into the > > > virtio_net.h file. > > > > Some of the functions ar