Re: [PATCH V1 5/5] accel/amd_vpci: Add communication channel service

From: Christophe JAILLET

Date: Tue Nov 11 2025 - 05:06:44 EST


Le 11/11/2025 à 02:15, David Zhang a écrit :
This patch introduces the communication channel (comm_chan) service, which
enables communication between the management PF driver and the user PF
driver.

The comm_chan service provides a shared-memory-based command channel
located in a BAR-mapped region. The user PF driver issues requests by
writing command messages into this region. The management PF driver
periodically polls the region and process any pending requests.

Supported operations include firmware (xclbin) reloads, where the
management PF invokes 'versal_pci_load_xclbin' to reprogram the embedded
firmware through the remote management queue service.

This service provides the foundation for dynamic firmware updates and other
management requests from the user PFs.

Co-developed-by: Nishad Saraf <nishads@xxxxxxx>
Signed-off-by: Nishad Saraf <nishads@xxxxxxx>
Signed-off-by: David Zhang <yidong.zhang@xxxxxxx>

...

@@ -160,10 +222,13 @@ static const struct config_item_type versal_pci_cfs_table = {
static int versal_pci_cfs_init(struct versal_pci_device *vdev)
{
struct configfs_subsystem *subsys = &vdev->cfs_subsys;
+ char dev_name[64] = "";

No need to init I think.

+
+ snprintf(dev_name, sizeof(dev_name), "%s%x", DRV_NAME, versal_pci_devid(vdev));

This hunk could already be in patch 1. This would make this patch smaller.

snprintf(subsys->su_group.cg_item.ci_namebuf,
sizeof(subsys->su_group.cg_item.ci_namebuf),
- "%s%x", DRV_NAME, versal_pci_devid(vdev));
+ "%s", dev_name);
subsys->su_group.cg_item.ci_type = &versal_pci_cfs_table;

...