Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-17 Thread Jason Wang
On Wed, Oct 18, 2023 at 12:36 PM Si-Wei Liu wrote: > > > > On 10/16/2023 7:35 PM, Jason Wang wrote: > > On Tue, Oct 17, 2023 at 4:30 AM Si-Wei Liu wrote: > >> > >> > >> On 10/16/2023 4:28 AM, Eugenio Perez Martin wrote: > >>> On Mon, Oct 16, 2023 at 8:33 AM Jason Wang wrote: > On Fri, Oct 1

Re: [RFC PATCH] vdpa_sim: implement .reset_map support

2023-10-17 Thread Si-Wei Liu
Hi Stefano, On 10/17/2023 6:44 AM, Stefano Garzarella wrote: On Fri, Oct 13, 2023 at 10:29:26AM -0700, Si-Wei Liu wrote: Hi Stefano, On 10/13/2023 2:22 AM, Stefano Garzarella wrote: Hi Si-Wei, On Fri, Oct 13, 2023 at 01:23:40AM -0700, Si-Wei Liu wrote: RFC only. Not tested on vdpa-sim-blk w

[RFC v2 PATCH] vdpa_sim: implement .reset_map support

2023-10-17 Thread Si-Wei Liu
RFC only. Not tested on vdpa-sim-blk with user virtual address. Works fine with vdpa-sim-net which uses physical address to map. This patch is based on top of [1]. [1] https://lore.kernel.org/virtualization/1696928580-7520-1-git-send-email-si-wei@oracle.com/ Signed-off-by: Si-Wei Liu ---

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-17 Thread Si-Wei Liu
On 10/16/2023 7:35 PM, Jason Wang wrote: On Tue, Oct 17, 2023 at 4:30 AM Si-Wei Liu wrote: On 10/16/2023 4:28 AM, Eugenio Perez Martin wrote: On Mon, Oct 16, 2023 at 8:33 AM Jason Wang wrote: On Fri, Oct 13, 2023 at 3:36 PM Si-Wei Liu wrote: On 10/12/2023 8:01 PM, Jason Wang wrote: O

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Jason Wang
On Wed, Oct 18, 2023 at 11:38 AM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 19:19:41 +0800, Xuan Zhuo > wrote: > > On Tue, 17 Oct 2023 14:43:33 +0800, Xuan Zhuo > > wrote: > > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang > > > wrote: > > > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > >

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Xuan Zhuo
On Tue, 17 Oct 2023 19:19:41 +0800, Xuan Zhuo wrote: > On Tue, 17 Oct 2023 14:43:33 +0800, Xuan Zhuo > wrote: > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang wrote: > > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > > > wrote: > > > > > > > > On Tue, 17 Oct 2023 13:27:47 +0800, Jason Wang

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Xuan Zhuo
On Wed, 18 Oct 2023 10:46:38 +0800, Jason Wang wrote: > On Tue, Oct 17, 2023 at 7:28 PM Xuan Zhuo wrote: > > > > On Tue, 17 Oct 2023 14:43:33 +0800, Xuan Zhuo > > wrote: > > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang > > > wrote: > > > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > > >

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Jason Wang
On Tue, Oct 17, 2023 at 7:28 PM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 14:43:33 +0800, Xuan Zhuo > wrote: > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang wrote: > > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > > > wrote: > > > > > > > > On Tue, 17 Oct 2023 13:27:47 +0800, Jason Wang >

Re: virtio-sound: release control request clarification

2023-10-17 Thread Anton Yakovlev via Virtualization
Hi Matias, On 18.10.2023 00:19, Matias Ezequiel Vara Larsen wrote: Hello, This email is to clarify the VirtIO specification regarding the RELEASE control request. Section 5.14.6.6.5.1 [1] states the following device requirements for the RELEASE control request: 1. The device MUST complete all

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Jason Wang
On Tue, Oct 17, 2023 at 3:00 PM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang wrote: > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > > wrote: > > > > > > On Tue, 17 Oct 2023 13:27:47 +0800, Jason Wang > > > wrote: > > > > On Tue, Oct 17, 2023 at 11:28 AM Jason Wang wrot

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

2023-10-17 Thread Anton Yakovlev via Virtualization
Hi Matias, On 17.10.2023 21:54, Matias Ezequiel Vara Larsen wrote: Hello Anton, Thanks for your help! I am going to send a second version of the patch with your changes. Is it OK if I add you with the "Co-developed-by" tag?. Yes, I'm fine with that. :) Best regards, -- Anton Yakovlev Senio

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

2023-10-17 Thread kernel test robot
Hi Yishai, kernel test robot noticed the following build warnings: [auto build test WARNING on linus/master] [also build test WARNING on v6.6-rc6 next-20231017] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--bas

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

2023-10-17 Thread Alex Williamson
On Tue, 17 Oct 2023 16:42:17 +0300 Yishai Hadas wrote: > +static int virtiovf_pci_probe(struct pci_dev *pdev, > + const struct pci_device_id *id) > +{ > + const struct vfio_device_ops *ops = &virtiovf_acc_vfio_pci_ops; > + struct virtiovf_pci_core_device *virtvdev

Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH

2023-10-17 Thread Alexei Starovoitov
On Mon, Oct 16, 2023 at 7:38 PM Jason Wang wrote: > > On Tue, Oct 17, 2023 at 7:53 AM Alexei Starovoitov > wrote: > > > > On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki > > wrote: > > > > > > On 2023/10/16 1:07, Alexei Starovoitov wrote: > > > > On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki >

Re: virtio-sound: release control request clarification

2023-10-17 Thread Manos Pitsidianakis
On Tue, 17 Oct 2023 at 18:19, Matias Ezequiel Vara Larsen wrote: > > Hello, > > This email is to clarify the VirtIO specification regarding the RELEASE > control request. Section 5.14.6.6.5.1 [1] states the following device > requirements for the RELEASE control request: > 1. The device MUST compl

virtio-sound: release control request clarification

2023-10-17 Thread Matias Ezequiel Vara Larsen
Hello, This email is to clarify the VirtIO specification regarding the RELEASE control request. Section 5.14.6.6.5.1 [1] states the following device requirements for the RELEASE control request: 1. The device MUST complete all pending I/O messages for the specified stream ID. 2. The device MUST N

Re: [RFC PATCH] vdpa_sim: implement .reset_map support

2023-10-17 Thread Stefano Garzarella
On Fri, Oct 13, 2023 at 10:29:26AM -0700, Si-Wei Liu wrote: Hi Stefano, On 10/13/2023 2:22 AM, Stefano Garzarella wrote: Hi Si-Wei, On Fri, Oct 13, 2023 at 01:23:40AM -0700, Si-Wei Liu wrote: RFC only. Not tested on vdpa-sim-blk with user virtual address. I can test it, but what I should st

[PATCH V1 vfio 8/9] vfio/pci: Expose vfio_pci_iowrite/read##size()

2023-10-17 Thread Yishai Hadas via Virtualization
Expose vfio_pci_iowrite/read##size() to let it be used by drivers. This functionality is needed to enable direct access to some physical BAR of the device with the proper locks/checks in place. The next patches from this series will use this functionality on a data path flow when a direct access

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

2023-10-17 Thread Yishai Hadas via Virtualization
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 is a need to support a virtio legacy driver with a device that does n

[PATCH V1 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-10-17 Thread Yishai Hadas via Virtualization
Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the next patches by the vfio/virtio coming driver. Signed-off-by: Yishai Hadas --- drivers/vfio/pci/vfio_pci

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

2023-10-17 Thread Yishai Hadas via Virtualization
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 --- drivers/virtio/virtio_pci_common.c | 11 ++ drivers/virtio/virtio_pci_com

[PATCH V1 vfio 5/9] virtio-pci: Introduce admin commands

2023-10-17 Thread Yishai Hadas via Virtualization
From: Feng Liu Introduces admin commands, as follow: The "list query" command can be used by the driver to query the set of admin commands supported by the virtio device. The "list use" command is used to inform the virtio device which admin commands the driver will use. The "legacy common cfg r

[PATCH V1 vfio 3/9] virtio-pci: Introduce admin virtqueue

2023-10-17 Thread Yishai Hadas via Virtualization
From: Feng Liu Introduce support for the admin virtqueue. By negotiating VIRTIO_F_ADMIN_VQ feature, driver detects capability and creates one administration virtqueue. Administration virtqueue implementation in virtio pci generic layer, enables multiple types of upper layer drivers such as vfio,

[PATCH V1 vfio 4/9] virtio-pci: Introduce admin command sending function

2023-10-17 Thread Yishai Hadas via Virtualization
From: Feng Liu Add support for sending admin command through admin virtqueue interface. Abort any inflight admin commands once device reset completes. To enforce the below statement from the specification [1], the admin queue is activated for the upper layer users only post of setting status to

[PATCH V1 vfio 1/9] virtio-pci: Fix common config map for modern device

2023-10-17 Thread Yishai Hadas via Virtualization
From: Feng Liu Currently vp_modern_probe() missed out to map config space structure starting from notify_data offset. Due to this when such structure elements are accessed it can result in an error. Fix it by considering the minimum size of what device has offered and what driver will access. F

[PATCH V1 vfio 2/9] virtio: Define feature bit for administration virtqueue

2023-10-17 Thread Yishai Hadas via Virtualization
From: Feng Liu Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: Yishai Hadas --- include/uapi/linux/virtio_config.h | 8 +++- 1 file changed, 7 insertions(+), 1 deleti

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

2023-10-17 Thread Yishai Hadas via Virtualization
This series 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 is a need to support a virtio legacy driver with a device

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

2023-10-17 Thread Stefano Garzarella
On Thu, Oct 12, 2023 at 11:16:54AM -0400, Michael S. Tsirkin wrote: On Thu, Oct 12, 2023 at 05:10:50PM +0200, Matias Ezequiel Vara Larsen wrote: This commit replaces the mmap mechanism with the copy() and fill_silence() callbacks for both capturing and playback for the virtio-sound driver. This

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

2023-10-17 Thread Matias Ezequiel Vara Larsen
Hello Anton, Thanks for your help! I am going to send a second version of the patch with your changes. Is it OK if I add you with the "Co-developed-by" tag?. Matias On Tue, Oct 17, 2023 at 05:11:30PM +0900, Anton Yakovlev wrote: > Hi Matias, > > Thanks for your help! I updated and corrected yo

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

2023-10-17 Thread Matias Ezequiel Vara Larsen
On Tue, Oct 17, 2023 at 09:44:04AM +0200, Takashi Iwai wrote: > On Mon, 16 Oct 2023 17:10:00 +0200, > Stefan Hajnoczi wrote: > > > > On Thu, Oct 12, 2023 at 05:10:50PM +0200, Matias Ezequiel Vara Larsen wrote: > > > This commit replaces the mmap mechanism with the copy() and > > > fill_silence() c

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Xuan Zhuo
On Tue, 17 Oct 2023 14:43:33 +0800, Xuan Zhuo wrote: > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang wrote: > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > > wrote: > > > > > > On Tue, 17 Oct 2023 13:27:47 +0800, Jason Wang > > > wrote: > > > > On Tue, Oct 17, 2023 at 11:28 AM Jason Wang w

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

2023-10-17 Thread Anton Yakovlev via Virtualization
Hi Matias, Thanks for your help! I updated and corrected your patch a little bit (see attachment). All changes were tested, there were no problems on my side. See also a few inline comments. On 13.10.2023 00:10, Matias Ezequiel Vara Larsen wrote: This commit replaces the mmap mechanism with

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Xuan Zhuo
On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang wrote: > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo wrote: > > > > On Tue, 17 Oct 2023 13:27:47 +0800, Jason Wang wrote: > > > On Tue, Oct 17, 2023 at 11:28 AM Jason Wang wrote: > > > > > > > > On Tue, Oct 17, 2023 at 11:26 AM Xuan Zhuo > > > > wr