Re: [PATCH v6 virtio 04/11] pds_vdpa: move enum from common to adminq header

2023-05-15 Thread Michael S. Tsirkin
On Mon, May 15, 2023 at 07:55:14PM -0700, Shannon Nelson wrote: > The pds_core_logical_qtype enum and IFNAMSIZ are not needed > in the common PDS header, only needed when working with the > adminq, so move them to the adminq header. > > Note: This patch might conflict with pds_vfio patches that ar

Re: [PATCH net-next V2 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-15 Thread Michael S. Tsirkin
On Tue, May 16, 2023 at 12:17:50PM +0800, Jason Wang wrote: > On Tue, May 16, 2023 at 12:13 PM Michael S. Tsirkin wrote: > > > > On Tue, May 16, 2023 at 10:44:45AM +0800, Jason Wang wrote: > > > On Mon, May 15, 2023 at 6:17 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, May 15, 2023

Re: [PATCH net-next V2 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-15 Thread Jason Wang
On Tue, May 16, 2023 at 12:13 PM Michael S. Tsirkin wrote: > > On Tue, May 16, 2023 at 10:44:45AM +0800, Jason Wang wrote: > > On Mon, May 15, 2023 at 6:17 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 15, 2023 at 01:13:33PM +0800, Jason Wang wrote: > > > > On Mon, May 15, 2023 at 12:45 PM

Re: [PATCH net-next V2 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-15 Thread Michael S. Tsirkin
On Tue, May 16, 2023 at 10:44:45AM +0800, Jason Wang wrote: > On Mon, May 15, 2023 at 6:17 PM Michael S. Tsirkin wrote: > > > > On Mon, May 15, 2023 at 01:13:33PM +0800, Jason Wang wrote: > > > On Mon, May 15, 2023 at 12:45 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, May 15, 2023

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Mike Christie
On 5/15/23 5:54 PM, Linus Torvalds wrote: > On Mon, May 15, 2023 at 3:23 PM Mike Christie > wrote: >> >> The vhost layer really doesn't want any signals and wants to work like >> kthreads >> for that case. To make it really simple can we do something like this where >> it >> separates user and i

Re: [PATCH v6 virtio 10/11] pds_vdpa: subscribe to the pds_core events

2023-05-15 Thread Jason Wang
On Tue, May 16, 2023 at 10:56 AM Shannon Nelson wrote: > > Register for the pds_core's notification events, primarily to > find out when the FW has been reset so we can pass this on > back up the chain. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > drivers/vdpa/pds/vd

Re: [PATCH v6 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig

2023-05-15 Thread Jason Wang
On Tue, May 16, 2023 at 10:56 AM Shannon Nelson wrote: > > Add the documentation and Kconfig entry for pds_vdpa driver. > > Signed-off-by: Shannon Nelson Acked-by: Jason Wang Thanks > --- > .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++ > .../device_drivers/ethernet/

[PATCH v6 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig

2023-05-15 Thread Shannon Nelson via Virtualization
Add the documentation and Kconfig entry for pds_vdpa driver. Signed-off-by: Shannon Nelson --- .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++ .../device_drivers/ethernet/index.rst | 1 + MAINTAINERS | 4 + drivers/vdpa/Kconfig

[PATCH v6 virtio 09/11] pds_vdpa: add support for vdpa and vdpamgmt interfaces

2023-05-15 Thread Shannon Nelson via Virtualization
This is the vDPA device support, where we advertise that we can support the virtio queues and deal with the configuration work through the pds_core's adminq. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/vdpa/pds/aux_drv.c | 15 + drivers/vdpa/pds/aux_drv.h | 1 + drivers/

[PATCH v6 virtio 10/11] pds_vdpa: subscribe to the pds_core events

2023-05-15 Thread Shannon Nelson via Virtualization
Register for the pds_core's notification events, primarily to find out when the FW has been reset so we can pass this on back up the chain. Signed-off-by: Shannon Nelson --- drivers/vdpa/pds/vdpa_dev.c | 59 - drivers/vdpa/pds/vdpa_dev.h | 1 + 2 files change

[PATCH v6 virtio 03/11] pds_vdpa: Add new vDPA driver for AMD/Pensando DSC

2023-05-15 Thread Shannon Nelson via Virtualization
This is the initial auxiliary driver framework for a new vDPA device driver, an auxiliary_bus client of the pds_core driver. The pds_core driver supplies the PCI services for the VF device and for accessing the adminq in the PF device. This patch adds the very basics of registering for the auxilia

[PATCH v6 virtio 05/11] pds_vdpa: new adminq entries

2023-05-15 Thread Shannon Nelson via Virtualization
Add new adminq definitions in support for vDPA operations. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- include/linux/pds/pds_adminq.h | 226 + 1 file changed, 226 insertions(+) diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq

[PATCH v6 virtio 08/11] pds_vdpa: add vdpa config client commands

2023-05-15 Thread Shannon Nelson via Virtualization
These are the adminq commands that will be needed for setting up and using the vDPA device. There are a number of commands defined in the FW's API, but by making use of the FW's virtio BAR we only need a few of these commands for vDPA support. Signed-off-by: Shannon Nelson Acked-by: Jason Wang

[PATCH v6 virtio 07/11] pds_vdpa: virtio bar setup for vdpa

2023-05-15 Thread Shannon Nelson via Virtualization
Prep and use the "modern" virtio bar utilities to get our virtio config space ready. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/vdpa/pds/aux_drv.c | 25 + drivers/vdpa/pds/aux_drv.h | 3 +++ 2 files changed, 28 insertions(+) diff --git a/drivers/vdp

[PATCH v6 virtio 06/11] pds_vdpa: get vdpa management info

2023-05-15 Thread Shannon Nelson via Virtualization
Find the vDPA management information from the DSC in order to advertise it to the vdpa subsystem. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/vdpa/pds/Makefile | 3 +- drivers/vdpa/pds/aux_drv.c | 17 ++ drivers/vdpa/pds/aux_drv.h | 7 +++ drivers/vdpa/pds/debugf

[PATCH v6 virtio 04/11] pds_vdpa: move enum from common to adminq header

2023-05-15 Thread Shannon Nelson via Virtualization
The pds_core_logical_qtype enum and IFNAMSIZ are not needed in the common PDS header, only needed when working with the adminq, so move them to the adminq header. Note: This patch might conflict with pds_vfio patches that are in review, depending on which patchset gets pulled first. Signed-

[PATCH v6 virtio 00/11] pds_vdpa driver

2023-05-15 Thread Shannon Nelson via Virtualization
This patchset implements a new module for the AMD/Pensando DSC that supports vDPA services on PDS Core VF devices. This code is based on and depends on include files from the pds_core driver described here[0]. The pds_core driver creates the auxiliary_bus devices that this module connects to, and

[PATCH v6 virtio 02/11] virtio: allow caller to override device DMA mask in vp_modern

2023-05-15 Thread Shannon Nelson via Virtualization
To add a bit of vendor flexibility with various virtio based devices, allow the caller to specify a different DMA mask. This adds a dma_mask field to struct virtio_pci_modern_device. If defined by the driver, this mask will be used in a call to dma_set_mask_and_coherent() instead of the tradition

[PATCH v6 virtio 01/11] virtio: allow caller to override device id in vp_modern

2023-05-15 Thread Shannon Nelson via Virtualization
To add a bit of vendor flexibility with various virtio based devices, allow the caller to check for a different device id. This adds a function pointer field to struct virtio_pci_modern_device to specify an override device id check. If defined by the driver, this function will be called to check

Re: [PATCH net-next V2 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-15 Thread Jason Wang
On Mon, May 15, 2023 at 6:17 PM Michael S. Tsirkin wrote: > > On Mon, May 15, 2023 at 01:13:33PM +0800, Jason Wang wrote: > > On Mon, May 15, 2023 at 12:45 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 15, 2023 at 09:05:54AM +0800, Jason Wang wrote: > > > > On Wed, May 10, 2023 at 1:33 PM

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Linus Torvalds
On Mon, May 15, 2023 at 3:23 PM Mike Christie wrote: > > The vhost layer really doesn't want any signals and wants to work like > kthreads > for that case. To make it really simple can we do something like this where it > separates user and io worker behavior where the major diff is how they hand

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Mike Christie
On 5/15/23 10:44 AM, Linus Torvalds wrote: > On Mon, May 15, 2023 at 7:23 AM Christian Brauner wrote: >> >> So I think we will be able to address (1) and (2) by making vhost tasks >> proper threads and blocking every signal except for SIGKILL and SIGSTOP >> and then having vhost handle get_signal(

Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

2023-05-15 Thread Shannon Nelson via Virtualization
On 5/9/23 1:46 AM, Stefano Garzarella wrote: On Mon, Apr 24, 2023 at 03:50:30PM -0700, Shannon Nelson via Virtualization wrote: Use the right structs for PACKED or split vqs when setting and getting the vring base. Signed-off-by: Shannon Nelson --- drivers/vhost/vhost.c | 18 +-

Re: [PATCH v5 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig

2023-05-15 Thread Shannon Nelson via Virtualization
On 5/14/23 10:07 PM, Jason Wang wrote: On Thu, May 4, 2023 at 2:13 AM Shannon Nelson wrote: Add the documentation and Kconfig entry for pds_vdpa driver. Signed-off-by: Shannon Nelson --- .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++ .../device_drivers/ethernet/in

Re: [PATCH v5 virtio 10/11] pds_vdpa: subscribe to the pds_core events

2023-05-15 Thread Shannon Nelson via Virtualization
On 5/14/23 10:02 PM, Jason Wang wrote: On Thu, May 4, 2023 at 2:13 AM Shannon Nelson wrote: Register for the pds_core's notification events, primarily to find out when the FW has been reset so we can pass this on back up the chain. Signed-off-by: Shannon Nelson --- drivers/vdpa/pds/vdpa_de

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Linus Torvalds
On Mon, May 15, 2023 at 8:54 AM Linus Torvalds wrote: > > Blush. I decided to build-test it, and then forgot to attach it. Here. Btw, if this tests out good and we end up doing this, I think we should also just rename that '.ignore_signals' bitfield to '.block_signals' to actually match what it d

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Linus Torvalds
On Mon, May 15, 2023 at 8:52 AM Jens Axboe wrote: > > Only potential downside is that it does make file references more > expensive for other syscalls, since you now have a shared file table. > But probably not something to worry about here? Would the vhost user worker user processes ever be othe

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Linus Torvalds
On Mon, May 15, 2023 at 8:52 AM Jens Axboe wrote: > > On 5/15/23 9:44?AM, Linus Torvalds wrote: > > > > So I think the patch should just look something like the attached. > > Mike, can you test this on whatever vhost test-suite? > > Seems like that didn't get attached... Blush. I decided to built

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Jens Axboe
On 5/15/23 9:44?AM, Linus Torvalds wrote: > On Mon, May 15, 2023 at 7:23?AM Christian Brauner wrote: >> >> So I think we will be able to address (1) and (2) by making vhost tasks >> proper threads and blocking every signal except for SIGKILL and SIGSTOP >> and then having vhost handle get_signal()

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-05-15 Thread Linus Torvalds
On Mon, May 15, 2023 at 7:23 AM Christian Brauner wrote: > > So I think we will be able to address (1) and (2) by making vhost tasks > proper threads and blocking every signal except for SIGKILL and SIGSTOP > and then having vhost handle get_signal() - as you mentioned - the same > way io uring al

[PATCH v2 2/2] iommu/virtio: Return size mapped for a detached domain

2023-05-15 Thread Jean-Philippe Brucker
When map() is called on a detached domain, the domain does not exist in the device so we do not send a MAP request, but we do update the internal mapping tree, to be replayed on the next attach. Since this constitutes a successful iommu_map() call, return *mapped in this case too. Fixes: 7e62edd7a

Re: [PATCH v5 5/6] mm/gup: remove vmas parameter from pin_user_pages()

2023-05-15 Thread Christoph Hellwig
On Sun, May 14, 2023 at 10:26:58PM +0100, Lorenzo Stoakes wrote: > We are now in a position where no caller of pin_user_pages() requires the > vmas parameter at all, so eliminate this parameter from the function and > all callers. > > This clears the way to removing the vmas parameter from GUP alt

[PATCH v2 1/2] iommu/virtio: Detach domain on endpoint release

2023-05-15 Thread Jean-Philippe Brucker
When an endpoint is released, for example a PCIe VF being destroyed or a function hot-unplugged, it should be detached from its domain. Send a DETACH request. Fixes: edcd69ab9a32 ("iommu: Add virtio-iommu driver") Reported-by: Akihiko Odaki Link: https://lore.kernel.org/all/15bf1b00-3aa0-973a-3a

[PATCH v2 0/2] iommu/virtio: Fixes

2023-05-15 Thread Jean-Philippe Brucker
One fix reported by Akihiko, and another found while going over the driver. Jean-Philippe Brucker (2): iommu/virtio: Detach domain on endpoint release iommu/virtio: Return size mapped for a detached domain drivers/iommu/virtio-iommu.c | 57 ++-- 1 file changed

Re: [PATCH net-next V2 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-15 Thread Michael S. Tsirkin
On Mon, May 15, 2023 at 01:13:33PM +0800, Jason Wang wrote: > On Mon, May 15, 2023 at 12:45 PM Michael S. Tsirkin wrote: > > > > On Mon, May 15, 2023 at 09:05:54AM +0800, Jason Wang wrote: > > > On Wed, May 10, 2023 at 1:33 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Apr 17, 2023