[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <26a13b81674655e7c2b5f7c53c98ba321acfc358.camel@intel.com>
Date: Wed, 14 Jun 2023 17:15:29 +0000
From: "Verma, Vishal L" <vishal.l.verma@...el.com>
To: "Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>
CC: "Jiang, Dave" <dave.jiang@...el.com>,
"Schofield, Alison" <alison.schofield@...el.com>,
"linux-cxl@...r.kernel.org" <linux-cxl@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"Weiny, Ira" <ira.weiny@...el.com>,
"bwidawsk@...nel.org" <bwidawsk@...nel.org>,
"Weight, Russell H" <russell.h.weight@...el.com>,
"dave@...olabs.net" <dave@...olabs.net>
Subject: Re: [PATCH v3 1/4] cxl: add a firmware update mechanism using the
sysfs firmware loader
On Wed, 2023-06-14 at 15:14 +0100, Jonathan Cameron wrote:
> On Mon, 12 Jun 2023 00:55:56 -0600
> Vishal Verma <vishal.l.verma@...el.com> wrote:
>
> > The sysfs based firmware loader mechanism was created to easily allow
> > userspace to upload firmware images to FPGA cards. This also happens to
> > be pretty suitable to create a user-initiated but kernel-controlled
> > firmware update mechanism for CXL devices, using the CXL specified
> > mailbox commands.
> >
> > Since firmware update commands can be long-running, and can be processed
> > in the background by the endpoint device, it is desirable to have the
> > ability to chunk the firmware transfer down to smaller pieces, so that
> > one operation does not monopolize the mailbox, locking out any other
> > long running background commands entirely - e.g. security commands like
> > 'sanitize' or poison scanning operations.
> >
> > The firmware loader mechanism allows a natural way to perform this
> > chunking, as after each mailbox command, that is restricted to the
> > maximum mailbox payload size, the cxl memdev driver relinquishes control
> > back to the fw_loader system and awaits the next chunk of data to
> > transfer. This opens opportunities for other background commands to
> > access the mailbox and send their own slices of background commands.
> >
> > Add the necessary helpers and state tracking to be able to perform the
> > 'Get FW Info', 'Transfer FW', and 'Activate FW' mailbox commands as
> > described in the CXL spec. Wire these up to the firmware loader
> > callbacks, and register with that system to create the memX/firmware/
> > sysfs ABI.
> >
> > Cc: Davidlohr Bueso <dave@...olabs.net>
> > Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> > Cc: Russ Weight <russell.h.weight@...el.com>
> > Cc: Alison Schofield <alison.schofield@...el.com>
> > Cc: Ira Weiny <ira.weiny@...el.com>
> > Cc: Dave Jiang <dave.jiang@...el.com>
> > Cc: Ben Widawsky <bwidawsk@...nel.org>
> > Cc: Dan Williams <dan.j.williams@...el.com>
> > Signed-off-by: Vishal Verma <vishal.l.verma@...el.com>
>
> One issue and one trivial comment inline.
> With those fixed up and subject to the fact I haven't looked at the firmware
> class before...
>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Thanks for the review Jonathan - fixed these for v4!
Powered by blists - more mailing lists