Re: [RFC PATCH v2 5/6] PCI/TSM: Authenticate devices via platform TSM

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

 



> > > +
> > > +/* collect TSM capable devices to rendezvous with the tsm driver */
> > > +static DEFINE_XARRAY(pci_tsm_devs);
> > 
> > imho either this or pci_dev::tsm is enough but not necessarily both.
> 
> You mean:
> 
> s/pci_tsm_devs/tsm_devs/
> 
> ?

I don't think the concern is just a renaming. My understanding is, we
already have a struct pci_tsm embedded in struct pci_dev, we could loop
and find all TSM capable devices by:

	for_each_pci_dev(pdev) {
		if (pdev->tsm)
			pci_tsm_add/del(pdev);
	}

A dedicated list for TSM capable devices seems not necessary.

But my concern is about VFs.  VFs are as well TSM capable but not
applicable for tsm_ops->exec(TSM_EXEC_CONNECT), maybe not applicable
for tsm_ops->add() either.  One way to distinguish PF/VFs is we only
collect PFs in pci_tsm_devs, but all TSM capable devices have
valid pci_dev::tsm pointer.

TSM capable devices in Guest should not been collected in pci_tsm_devs
either.

Thanks,
Yilun




[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