[PATCH net-next] virtio: kdoc for struct virtio_pci_modern_device

2023-09-11 Thread Shannon Nelson via Virtualization
Finally following up to Simon's suggestion for some kdoc attention on struct virtio_pci_modern_device. Link: https://lore.kernel.org/netdev/ze%2fqs0lnuvxfa...@corigine.com/ Cc: Simon Horman Signed-off-by: Shannon Nelson Acked-by: Eugenio Pérez --- include/linux/virtio_pci_modern.h

[PATCH iproute2] vdpa: consume device_features parameter

2023-09-11 Thread Shannon Nelson via Virtualization
uot;vdpa: allow provisioning device features") Signed-off-by: Allen Hubbe Reviewed-by: Shannon Nelson Reviewed-by: Si-Wei Liu --- vdpa/vdpa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c index 8bbe452c..6e4a9c11 100644 --- a/vdpa/vdpa.c +++ b/vdpa/vdpa.c @@ -35

[PATCH net] virtio: kdoc for struct virtio_pci_modern_device

2023-08-28 Thread Shannon Nelson via Virtualization
Finally following up to Simon's suggestion for some kdoc attention on struct virtio_pci_modern_device. Link: https://lore.kernel.org/netdev/ze%2fqs0lnuvxfa...@corigine.com/ Cc: Simon Horman Signed-off-by: Shannon Nelson --- include/linux/virtio_pci_modern.h

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-20 Thread Shannon Nelson via Virtualization
-off-by: Jason Wang This still leaves hung processes, but at least it doesn't pin the CPU any more. Thanks. Reviewed-by: Shannon Nelson --- drivers/net/virtio_net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/driver

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

2023-07-20 Thread Shannon Nelson via Virtualization
freeze, this means the rx mode setting is lost after resuming. This is not the bug of this patch as we never try to restore rx mode setting during resume. Signed-off-by: Jason Wang Reviewed-by: Shannon Nelson --- drivers/net/virtio_net.c | 55 +--- 1 file

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-20 Thread Shannon Nelson via Virtualization
On 7/20/23 1:38 AM, Jason Wang wrote: Adding cond_resched() to the command waiting loop for a better co-operation with the scheduler. This allows to give CPU a breath to run other task(workqueue) instead of busy looping when preemption is not allowed on a device whose CVQ might be slow. Signed-

Re: [PATCH] vpda: pds: fix building without debugfs

2023-07-19 Thread Shannon Nelson via Virtualization
On 7/19/23 12:40 PM, Arnd Bergmann wrote: From: Arnd Bergmann The new debugfs code still gets called when debugfs is disabled, resulting in a link failure: ERROR: modpost: "pds_vdpa_debugfs_del_vdpadev" [drivers/vdpa/pds/pds_vdpa.ko] undefined! ERROR: modpost: "pds_vdpa_debugfs_add_vdpadev"

[PATCH RFC net] virtio-net: add timeout for virtnet_send_command()

2023-07-18 Thread Shannon Nelson via Virtualization
virtio_net: Add a virtqueue for outbound control commands") Signed-off-by: Shannon Nelson --- drivers/net/virtio_net.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 0db14f6b87d3..c3bf1c9f3244 100644 --

[PATCH v2 virtio 3/5] pds_vdpa: clean and reset vqs entries

2023-07-10 Thread Shannon Nelson via Virtualization
Make sure that we initialize the vqs[] entries the same way both for initial setup and after a vq reset. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Shannon Nelson --- drivers/vdpa/pds/vdpa_dev.c | 24 +--- 1 file c

[PATCH v2 virtio 2/5] pds_vdpa: always allow offering VIRTIO_NET_F_MAC

2023-07-10 Thread Shannon Nelson via Virtualization
he vdpa utility without the VIRTIO_NET_F_MAC set, then don't set the mac. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Shannon Nelson --- drivers/vdpa/pds/debugfs.c | 2 -- drivers/vdpa/pds/vdpa_dev.c | 30 ++

[PATCH v2 virtio 4/5] pds_vdpa: alloc irq vectors on DRIVER_OK

2023-07-10 Thread Shannon Nelson via Virtualization
when we see DRIVER_OK and know that the reassignment of the PCI VF to an iommu domain has already happened. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- driver

[PATCH v2 virtio 1/5] pds_vdpa: reset to vdpa specified mac

2023-07-10 Thread Shannon Nelson via Virtualization
From: Allen Hubbe When the vdpa device is reset, also reinitialize it with the mac address that was assigned when the device was added. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- driver

[PATCH v2 virtio 0/5] pds_vdpa: mac, reset, and irq updates

2023-07-10 Thread Shannon Nelson via Virtualization
. - report the driver negotiated features in get_driver_features() - only map the notify on initial setup, not on every reset. - added patch 5 to clear up some driver feature debugfs output Allen Hubbe (2): pds_vdpa: reset to vdpa specified mac pds_vdpa: alloc irq vectors on DRIVER_OK Shannon Nelson

[PATCH v2 virtio 5/5] pds_vdpa: fix up debugfs feature bit printing

2023-07-10 Thread Shannon Nelson via Virtualization
Make clearer in debugfs output the difference between the hw feature bits, the features supported through the driver, and the features that have been negotiated. Signed-off-by: Shannon Nelson --- drivers/vdpa/pds/debugfs.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions

Re: [PATCH virtio 1/4] pds_vdpa: reset to vdpa specified mac

2023-07-10 Thread Shannon Nelson via Virtualization
On 7/9/23 8:04 PM, Jason Wang wrote: On Sat, Jul 8, 2023 at 4:12 AM Shannon Nelson wrote: On 7/7/23 12:33 AM, Jason Wang wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On Fri, Jun 30, 2023 at

Re: [PATCH virtio 3/4] pds_vdpa: clean and reset vqs entries

2023-07-07 Thread Shannon Nelson via Virtualization
On 7/7/23 12:36 AM, Jason Wang wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On Fri, Jun 30, 2023 at 8:36 AM Shannon Nelson wrote: Make sure that we initialize the vqs[] entries the same way

Re: [PATCH virtio 2/4] pds_vdpa: always allow offering VIRTIO_NET_F_MAC

2023-07-07 Thread Shannon Nelson via Virtualization
On 7/7/23 12:44 AM, Jason Wang wrote: On Fri, Jun 30, 2023 at 8:36 AM Shannon Nelson wrote: Our driver sets a mac if the HW is 00:..:00 so we need to be sure to advertise VIRTIO_NET_F_MAC even if the HW doesn't. We also need to be sure that virtio_net sees the VIRTIO_NET_F_MAC and do

Re: [PATCH virtio 1/4] pds_vdpa: reset to vdpa specified mac

2023-07-07 Thread Shannon Nelson via Virtualization
On 7/7/23 12:33 AM, Jason Wang wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On Fri, Jun 30, 2023 at 8:36 AM Shannon Nelson wrote: From: Allen Hubbe When the vdpa device is reset, also

[PATCH virtio] pds_vdpa: protect Makefile from unconfigured debugfs

2023-07-06 Thread Shannon Nelson via Virtualization
...@infradead.org/ Fixes: a16291b5bcbb ("pds_vdpa: Add new vDPA driver for AMD/Pensando DSC") Signed-off-by: Shannon Nelson --- drivers/vdpa/pds/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/vdpa/pds/Makefile b/drivers/vdpa/pds/Makefile index 2e22418e3ab3..c2

Re: linux-next: Tree for Jul 6 [drivers/vdpa/pds/pds_vdpa.ko]

2023-07-06 Thread Shannon Nelson via Virtualization
On 7/6/23 2:07 PM, Randy Dunlap wrote: On 7/5/23 18:57, Stephen Rothwell wrote: Hi all, Please do *not* add any v6.6 related stuff to your linux-next included branches until after v6.5-rc1 has been released. Changes since 20230705: On loongarch, when DEBUG_FS is not set: ERROR: modpost: "

Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it

2023-07-05 Thread Shannon Nelson via Virtualization
On 7/5/23 11:27 AM, Eugenio Perez Martin wrote: > On Wed, Jul 5, 2023 at 9:50 AM Jason Wang wrote: On Tue, Jul 4, 2023 at 11:45 PM Michael S. Tsirkin wrote: On Tue, Jul 04, 2023 at 01:36:11PM +0200, Eugenio Perez Martin wrote: On Tue, Jul 4, 2023 at 12:38 PM Michael S. Tsirkin wrote: On

[PATCH virtio 1/4] pds_vdpa: reset to vdpa specified mac

2023-06-29 Thread Shannon Nelson via Virtualization
From: Allen Hubbe When the vdpa device is reset, also reinitialize it with the mac address that was assigned when the device was added. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Reviewed

[PATCH virtio 2/4] pds_vdpa: always allow offering VIRTIO_NET_F_MAC

2023-06-29 Thread Shannon Nelson via Virtualization
he vdpa utility without the VIRTIO_NET_F_MAC set, then don't set the mac. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley --- drivers/vdpa/pds/vdpa_dev.c | 25 +++-- 1 fil

[PATCH virtio 0/4] pds_vdpa: mac, reset, and irq updates

2023-06-29 Thread Shannon Nelson via Virtualization
g a MAC address, for allocating irq resources later to support vhost use, and for properly cleaning vq info on reset. Allen Hubbe (2): pds_vdpa: reset to vdpa specified mac pds_vdpa: alloc irq vectors on DRIVER_OK Shannon Nelson (2): pds_vdpa: always allow offering VIRTIO_NET_F_MAC pds_vdpa:

[PATCH virtio 3/4] pds_vdpa: clean and reset vqs entries

2023-06-29 Thread Shannon Nelson via Virtualization
Make sure that we initialize the vqs[] entries the same way both for initial setup and after a vq reset. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley --- drivers/vdpa/pds/vdpa_

[PATCH virtio 4/4] pds_vdpa: alloc irq vectors on DRIVER_OK

2023-06-29 Thread Shannon Nelson via Virtualization
when we see DRIVER_OK and know that the reassignment of the PCI VF to an iommu domain has already happened. Fixes: 151cc834f3dd ("pds_vdpa: add support for vdpa and vdpamgmt interfaces") Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley --- driver

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

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

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

2023-05-19 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:

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

2023-05-19 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 Acked-by: Jason Wang --- drivers/vdpa/pds/vdpa_dev.c | 59 - drivers/vdpa/pds/vdpa_

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

2023-05-19 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

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

2023-05-19 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 --- Note: this had previously been Acked-by Jason Wang, but changed enough in v6 that I felt it

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

2023-05-19 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

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

2023-05-19 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

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

2023-05-19 Thread Shannon Nelson via Virtualization
auxiliary device and setting up debugfs entries. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/vdpa/Makefile | 1 + drivers/vdpa/pds/Makefile | 8 drivers/vdpa/pds/aux_drv.c | 83 ++ drivers/vdpa/pds/aux_drv.h | 15

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

2023-05-19 Thread Shannon Nelson via Virtualization
-off-by: Shannon Nelson Acked-by: Jason Wang --- include/linux/pds/pds_adminq.h | 21 + include/linux/pds/pds_common.h | 21 - 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h

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

2023-05-19 Thread Shannon Nelson via Virtualization
ode into an else block. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 30 -- include/linux/virtio_pci_modern.h | 3 +++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/virtio/virtio_pci_mode

[PATCH v7 virtio 00/11] pds_vdpa driver

2023-05-19 Thread Shannon Nelson via Virtualization
of devm_ interfaces as suggested in pds_core reviews - updated copyright strings to reflect the new owner Shannon Nelson (11): virtio: allow caller to override device id in vp_modern virtio: allow caller to override device DMA mask in vp_modern pds_vdpa: Add new vDPA driver for AMD/Pensando D

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

2023-05-19 Thread Shannon Nelson via Virtualization
traditional DMA_BIT_MASK(64). This allows limiting the DMA space on vendor devices with address limitations. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 3 ++- include/linux/virtio_pci_modern.h | 3 +++ 2 files changed, 5 insertions(+), 1

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

2023-05-16 Thread Shannon Nelson via Virtualization
, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Shannon-Nelson/virtio-allow-caller-to-override-device-id-in-vp_moder

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

2023-05-16 Thread Shannon Nelson via Virtualization
On 5/16/23 12:49 AM, Stefano Garzarella wrote: On Mon, May 15, 2023 at 01:41:12PM -0700, Shannon Nelson wrote: 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

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

2023-05-16 Thread Shannon Nelson via Virtualization
On 5/16/23 3:35 AM, Simon Horman wrote: On Mon, May 15, 2023 at 07:55:19PM -0700, Shannon Nelson wrote: 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 N

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

2023-05-16 Thread Shannon Nelson via Virtualization
On 5/15/23 11:12 PM, Michael S. Tsirkin wrote: 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

[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 + dr

[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

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

2023-05-15 Thread Shannon Nelson via Virtualization
auxiliary device and setting up debugfs entries. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/vdpa/Makefile | 1 + drivers/vdpa/pds/Makefile | 8 drivers/vdpa/pds/aux_drv.c | 83 ++ drivers/vdpa/pds/aux_drv.h | 15

[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

[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:

[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

[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

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

2023-05-15 Thread Shannon Nelson via Virtualization
-off-by: Shannon Nelson Acked-by: Jason Wang --- include/linux/pds/pds_adminq.h | 21 + include/linux/pds/pds_common.h | 21 - 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h

[PATCH v6 virtio 00/11] pds_vdpa driver

2023-05-15 Thread Shannon Nelson via Virtualization
uses with direct virtio_net config access - reworked irqs to follow virtio layout - removed local_mac_bit logic - replaced uses of devm_ interfaces as suggested in pds_core reviews - updated copyright strings to reflect the new owner Shannon Nelson (11): virtio: allow caller to override devi

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

2023-05-15 Thread Shannon Nelson via Virtualization
traditional DMA_BIT_MASK(64). This allows limiting the DMA space on vendor devices with address limitations. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 3 ++- include/linux/virtio_pci_modern.h | 3 +++ 2 files changed, 5 insertions(+), 1

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

2023-05-15 Thread Shannon Nelson via Virtualization
ode into an else block. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 30 -- include/linux/virtio_pci_modern.h | 3 +++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/virtio/virtio_pci_mode

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

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/vdp

Re: [PATCH] virtio-vdpa: Fix unchecked call to NULL set_vq_affinity

2023-05-12 Thread Shannon Nelson via Virtualization
On 5/12/23 6:30 AM, Michael S. Tsirkin wrote: On Fri, May 12, 2023 at 12:51:21PM +, Dragos Tatulea wrote: On Thu, 2023-05-04 at 14:51 -0400, Michael S. Tsirkin wrote: On Thu, May 04, 2023 at 01:08:54PM -0400, Feng Liu wrote: On 2023-05-04 a.m.9:50, Dragos Tatulea wrote: External email:

[PATCH] vdpa: consume device_features parameter

2023-05-12 Thread Shannon Nelson
uot;vdpa: allow provisioning device features") Signed-off-by: Allen Hubbe Reviewed-by: Shannon Nelson --- vdpa/vdpa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c index 27647d73d498..8a2fca8647b6 100644 --- a/vdpa/vdpa.c +++ b/vdpa/vdpa.c @@ -353,6

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

2023-05-03 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 --- drivers/vdpa/pds/aux_drv.c | 15 + drivers/vdpa/pds/aux_drv.h | 1 + drivers/vdpa/pds/debu

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

2023-05-03 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 | 68 - drivers/vdpa/pds/vdpa_dev.h | 1 + 2

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

2023-05-03 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 --- driver

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

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

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

2023-05-03 Thread Shannon Nelson via Virtualization
auxiliary device and setting up debugfs entries. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/vdpa/Makefile | 1 + drivers/vdpa/pds/Makefile | 8 drivers/vdpa/pds/aux_drv.c | 83 ++ drivers/vdpa/pds/aux_drv.h | 15

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

2023-05-03 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 v5 virtio 06/11] pds_vdpa: get vdpa management info

2023-05-03 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

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

2023-05-03 Thread Shannon Nelson via Virtualization
ode into an else block. Signed-off-by: Shannon Nelson --- drivers/virtio/virtio_pci_modern_dev.c | 30 -- include/linux/virtio_pci_modern.h | 3 +++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/virtio/virtio_pci_modern_dev.c b/driver

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

2023-05-03 Thread Shannon Nelson via Virtualization
-off-by: Shannon Nelson --- include/linux/pds/pds_adminq.h | 21 + include/linux/pds/pds_common.h | 21 - 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h index 98a60ce87b92

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

2023-05-03 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 --- drivers/vdpa/pds/aux_drv.c | 25 + drivers/vdpa/pds/aux_drv.h | 3 +++ 2 files changed, 28 insertions(+) diff --git a/drivers/vdpa/pds/a

[PATCH v5 virtio 00/11] pds_vdpa driver

2023-05-03 Thread Shannon Nelson via Virtualization
s - reworked irqs to follow virtio layout - removed local_mac_bit logic - replaced uses of devm_ interfaces as suggested in pds_core reviews - updated copyright strings to reflect the new owner Shannon Nelson (11): virtio: allow caller to override device id in vp_modern virtio: allow caller

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

2023-05-03 Thread Shannon Nelson via Virtualization
traditional DMA_BIT_MASK(64). This allows limiting the DMA space on vendor devices with address limitations. Signed-off-by: Shannon Nelson --- drivers/virtio/virtio_pci_modern_dev.c | 3 ++- include/linux/virtio_pci_modern.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v4 virtio 01/10] virtio: allow caller to override device id and DMA mask

2023-05-03 Thread Shannon Nelson via Virtualization
On 5/1/23 7:44 AM, Simon Horman wrote: On Tue, Apr 25, 2023 at 02:25:53PM -0700, Shannon Nelson wrote: To add a bit of flexibility with various virtio based devices, allow the caller to specify a different device id and DMA mask. This adds fields to struct virtio_pci_modern_device to specify

Re: [PATCH v4 virtio 01/10] virtio: allow caller to override device id and DMA mask

2023-04-25 Thread Shannon Nelson via Virtualization
On 4/25/23 7:09 PM, Xuan Zhuo wrote: On Tue, 25 Apr 2023 14:25:53 -0700, Shannon Nelson wrote: To add a bit of flexibility with various virtio based devices, allow the caller to specify a different device id and DMA mask. This adds fields to struct virtio_pci_modern_device to specify an

[PATCH v4 virtio 08/10] pds_vdpa: add support for vdpa and vdpamgmt interfaces

2023-04-25 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 --- drivers/vdpa/pds/aux_drv.c | 15 + drivers/vdpa/pds/aux_drv.h | 1 + drivers/vdpa/pds/debu

[PATCH v4 virtio 09/10] pds_vdpa: subscribe to the pds_core events

2023-04-25 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 | 68 - drivers/vdpa/pds/vdpa_dev.h | 1 + 2

[PATCH v4 virtio 07/10] pds_vdpa: add vdpa config client commands

2023-04-25 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 ---

[PATCH v4 virtio 10/10] pds_vdpa: pds_vdps.rst and Kconfig

2023-04-25 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 v4 virtio 06/10] pds_vdpa: virtio bar setup for vdpa

2023-04-25 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 --- drivers/vdpa/pds/aux_drv.c | 25 + drivers/vdpa/pds/aux_drv.h | 3 +++ 2 files changed, 28 insertions(+) diff --git a/drivers/vdpa/pds/a

[PATCH v4 virtio 02/10] pds_vdpa: Add new vDPA driver for AMD/Pensando DSC

2023-04-25 Thread Shannon Nelson via Virtualization
auxiliary device and setting up debugfs entries. Signed-off-by: Shannon Nelson Acked-by: Jason Wang --- drivers/vdpa/Makefile | 1 + drivers/vdpa/pds/Makefile | 8 drivers/vdpa/pds/aux_drv.c | 83 ++ drivers/vdpa/pds/aux_drv.h | 15

[PATCH v4 virtio 04/10] pds_vdpa: new adminq entries

2023-04-25 Thread Shannon Nelson via Virtualization
Add new adminq definitions in support for vDPA operations. Signed-off-by: Shannon Nelson --- include/linux/pds/pds_adminq.h | 266 + 1 file changed, 266 insertions(+) diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h index 61b0a8634e1a

[PATCH v4 virtio 03/10] pds_vdpa: move enum from common to adminq header

2023-04-25 Thread Shannon Nelson via Virtualization
-off-by: Shannon Nelson --- include/linux/pds/pds_adminq.h | 21 + include/linux/pds/pds_common.h | 21 - 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h index 98a60ce87b92

[PATCH v4 virtio 05/10] pds_vdpa: get vdpa management info

2023-04-25 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

[PATCH v4 virtio 01/10] virtio: allow caller to override device id and DMA mask

2023-04-25 Thread Shannon Nelson via Virtualization
heir own device BAR. u64 dma_mask; If defined by the driver, this mask will be used in a call to dma_set_mask_and_coherent() instead of the traditional DMA_BIT_MASK(64). This allows limiting the DMA space on vendor devices with address limitations. Signed-off-by:

[PATCH v4 virtio 00/10] pds_vdpa driver

2023-04-25 Thread Shannon Nelson via Virtualization
ith direct virtio_net config access - reworked irqs to follow virtio layout - removed local_mac_bit logic - replaced uses of devm_ interfaces as suggested in pds_core reviews - updated copyright strings to reflect the new owner Shannon Nelson (10): virtio: allow caller to override device id and

Re: [PATCH v2 0/3] vhost_vdpa: better PACKED support

2023-04-25 Thread Shannon Nelson via Virtualization
On 4/24/23 11:08 PM, Michael S. Tsirkin wrote: On Mon, Apr 24, 2023 at 03:50:28PM -0700, Shannon Nelson wrote: While testing our vDPA driver with QEMU we found that vhost_vdpa was missing some support for PACKED VQs. Adding these helped us get further in our testing. The first patch makes

[PATCH v2 0/3] vhost_vdpa: better PACKED support

2023-04-24 Thread Shannon Nelson via Virtualization
-April/066253.html - initial version Shannon Nelson (3): vhost_vdpa: tell vqs about the negotiated vhost: support PACKED when setting-getting vring_base vhost_vdpa: support PACKED when setting-getting vring_base drivers/vhost/vdpa.c | 34 ++ drivers/vhost

[PATCH v2 1/3] vhost_vdpa: tell vqs about the negotiated

2023-04-24 Thread Shannon Nelson via Virtualization
As is done in the net, iscsi, and vsock vhost support, let the vdpa vqs know about the features that have been negotiated. This allows vhost to more safely make decisions based on the features, such as when using PACKED vs split queues. Signed-off-by: Shannon Nelson Acked-by: Jason Wang

[PATCH v2 3/3] vhost_vdpa: support PACKED when setting-getting vring_base

2023-04-24 Thread Shannon Nelson via Virtualization
Use the right structs for PACKED or split vqs when setting and getting the vring base. Signed-off-by: Shannon Nelson --- drivers/vhost/vdpa.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 599b8cc238c7

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

2023-04-24 Thread Shannon Nelson via Virtualization
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 +- drivers/vhost/vhost.h | 8 ++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/vhost/vhost.c b

Re: [PATCH 3/3] vhost_vdpa: support PACKED when setting-getting vring_base

2023-04-24 Thread Shannon Nelson via Virtualization
On 4/22/23 11:40 PM, Jason Wang wrote: On Sat, Apr 22, 2023 at 3:57 AM Shannon Nelson wrote: Use the right structs for PACKED or split vqs when setting and getting the vring base. Signed-off-by: Shannon Nelson --- drivers/vhost/vdpa.c | 19 +++ 1 file changed, 15

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

2023-04-24 Thread Shannon Nelson via Virtualization
On 4/22/23 11:36 PM, Jason Wang wrote: On Sat, Apr 22, 2023 at 3:57 AM Shannon Nelson 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 +- 1 file changed, 13

[PATCH 3/3] vhost_vdpa: support PACKED when setting-getting vring_base

2023-04-21 Thread Shannon Nelson via Virtualization
Use the right structs for PACKED or split vqs when setting and getting the vring base. Signed-off-by: Shannon Nelson --- drivers/vhost/vdpa.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 599b8cc238c7

[PATCH 1/3] vhost_vdpa: tell vqs about the negotiated

2023-04-21 Thread Shannon Nelson via Virtualization
As is done in the net, iscsi, and vsock vhost support, let the vdpa vqs know about the features that have been negotiated. This allows vhost to more safely make decisions based on the features, such as when using PACKED vs split queues. Signed-off-by: Shannon Nelson --- drivers/vhost/vdpa.c

[PATCH 0/3] vhost_vdpa: better PACKED support

2023-04-21 Thread Shannon Nelson via Virtualization
third patches use the feature flags to properly format and pass set/get_vq requests. Shannon Nelson (3): vhost_vdpa: tell vqs about the negotiated vhost: support PACKED when setting-getting vring_base vhost_vdpa: support PACKED when setting-getting vring_base drivers/vhost/vdpa.c | 32

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

2023-04-21 Thread Shannon Nelson via Virtualization
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 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index f11bdbe4c2c5

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-12-01 Thread Shannon Nelson
On 11/30/2017 6:11 AM, Michael S. Tsirkin wrote: On Thu, Nov 30, 2017 at 10:08:45AM +0200, achiad shochat wrote: Re. problem #2: Indeed the best way to address it seems to be to enslave the VF driver netdev under a persistent anchor netdev. And it's indeed desired to allow (but not enforce) PV n