Re: [PATCH v3 12/16] PCI/DOE: Create mailboxes on device enumeration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/2/23 16:43, Lukas Wunner wrote:
On Tue, Feb 28, 2023 at 12:18:07PM +1100, Alexey Kardashevskiy wrote:
On 11/2/23 07:25, Lukas Wunner wrote:
For the same reason a DOE instance cannot be shared between the PCI core
and a driver.

And we want this sharing why? Any example will do. Thanks,

The PCI core is going to perform CMA/SPDM authentication when a device
gets enumerated (PCIe r6.0 sec 6.31).  That's the main motivation
to lift DOE mailbox creation into the PCI core.  It's not mentioned
here explicitly because I want the patch to stand on its own.
CMA/SPDM support will be submitted separately.

I was going the opposite direction with avoiding adding this into the PCI core as 1) the pci_dev struct is already 2K and 2) it is a niche feature and 3) I wanted this CMA/SPDM session setup to be platform specific as on our platform the SPDM support requires some devices to be probed before we can any SPDM.


A driver that later on gets bound to the device should be allowed
to talk to it via DOE as well, possibly even sharing the same DOE
mailboxes used by the PCI core.

Patches for CMA/SPDM are under development on this branch:

https://github.com/l1k/linux/commits/doe

yes, thanks! Lots of reading :)


Currently a DOE instance cannot be shared by multiple drivers because
each driver creates its own pci_doe_mb struct for a given DOE instance.

Sorry for my ignorance but why/how/when would a device have multiple drivers
bound? Or it only one driver at the time but we also want DOE MBs to survive
switching to another (different or newer) driver?

Conceivably, a driver may have the need to talk to multiple devices
via DOE, even ones it's not bound to.  (E.g. devices in its ancestry
or children.)

Ah ok. Well, a parent device could look for the DOE MB in a child using devres_find(), this requirement alone does not require moving things to the PCI core and potentially allows it to be a module which could be a better way as distros could have it always enabled but it would not waste any memory on my laptop when not loaded. Thanks,


--
Alexey




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux