Re: [PATCH 2/2] gpu: nova-core: add fwctl driver for firmware control interface

From: Jason Gunthorpe

Date: Tue Mar 31 2026 - 08:24:54 EST


On Mon, Mar 30, 2026 at 08:07:42PM +0100, Gary Guo wrote:
> On Mon Mar 30, 2026 at 7:18 PM BST, Jason Gunthorpe wrote:
> > On Mon, Mar 30, 2026 at 01:42:07PM -0400, Joel Fernandes wrote:
> >
> >> Just trying to confirm my understanding: Doesn't that mean
> >> NV2080_CTRL_CMD_VGPU_MGR_INTERNAL_PGPU_ADD_VGPU_TYPE becomes a part of UAPI
> >> then?
> >
> > Yes.
>
> I think it is probably undesirable for nova-core to expose GSP firmware detail
> to userspace directly.

Why? That is the whole point of this mechanism to remove kernel
involvement in the communication channel.

GSP firmware is supposed to commit to a stable ABI for anything
enabled for fwctl.

> > If you use fwctl it should be as I described, it is not an generic
> > interface to send SW command to the kernel, the commands have to be
> > delivered to FW.
>
> If fwctl isn't designed to provide abstraction layer between userspace/FW and is
> for raw access only, then an alternative mechanism should be used instead.

Why?

The purpose here is to upload a chunk of data to the FW. That is what
fwctl does.

> > This series adds a fwctl driver to nova-core, enabling userspace to issue
> > firmware commands to the GSP through the standard fwctl ioctl
> > interface. E.g. uploading the vGPU type blobs and managing the vGPU
> > lifecycle, which is previously implemented in sysfs.
>
> Zhi, is there a reason that sysfs is undesirable interface for this?

Please no, sysfs should not be abused for things like this.

Jason