From: Lukas Wunner <lukas@wunner.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: stuart hayes <stuart.w.hayes@gmail.com>,
Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>,
linux-pci@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Bjorn Helgaas <bhelgaas@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>,
Keith Busch <kbusch@kernel.org>, Marek Behun <marek.behun@nic.cz>,
Pavel Machek <pavel@ucw.cz>, Randy Dunlap <rdunlap@infradead.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v2 2/3] PCI/NPEM: Add Native PCIe Enclosure Management support
Date: Wed, 19 Jun 2024 11:08:26 +0200 [thread overview]
Message-ID: <ZnKgCos9ZwVzcKuS@wunner.de> (raw)
In-Reply-To: <6671e0d13f20_31012949a@dwillia2-xfh.jf.intel.com.notmuch>
On Tue, Jun 18, 2024 at 12:32:33PM -0700, Dan Williams wrote:
> It strikes me that playing these initcall games is a losing battle and
> that this case would be best served by late loading of NPEM
> functionality.
>
> Something similar is happening with PCI device security where the
> enabling depends on a third-party driver for a platform
> "security-manager" (TSM) to arrive.
>
> The approach there is to make the functionality independent of
> device-discovery vs TSM driver load order. So, if the TSM driver is
> loaded early then pci_init_capabilities() can immediately enable the
> functionality. If the TSM driver is loaded *after* some devices have already
> gone through pci_init_capabilities(), then that event is responsible for
> doing for_each_pci_dev() to catch up on devices that missed their
> initial chance to turn on device security details.
>
> So, for NPEM, the thought would be to implement the same rendezvous
> flow, i.e. s/TSM/NPEM/.
A different viewpoint is that these issues are caused by the
"division of labor" between OS kernel and platform firmware.
In the NPEM case, Dell servers require the OS to call firmware
to change LEDs. But before OS can do that, OS has to initialize
a certain other interface with firmware.
In the TSM case, Intel TDX Connect or AMD SEV-TIO require OS to
ask firmware to perform certain authentication steps with devices,
wherefore OS has to provide another interface to facilitate
communication with the device.
It's a complexity nightmare exacerbated by vendor-specific quirks.
Which is why I'm arguing that firmware functionality (e.g. TDX module)
should be constrained to the absolute minimum and the OS should be
in control of as much as possible. That's the approach Apple has
been following as it's the only way to achieve their close interplay
between hardware and software without making things too complex.
It seems what's keeping this series from working on Dell servers is
primarily that the driver wants to read out LED status on probe.
So I've recommended to Mariusz off-list to do that lazily if possible,
i.e. on first read of a LED's status.
Then if users do try to read or write LED status on Dell servers without
loading IPMI modules first, they get to keep the pieces, sorry. :(
> I am an overdue for a refresh of the TSM patches
No hurry, there's a refresh of the OS-owned PCI device authentication
coming up before end of this month.
I'm taking my "TDX Connect heretic" hat off now. :)
Thanks,
Lukas
next prev parent reply other threads:[~2024-06-19 9:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 13:19 [PATCH v2 0/3] PCIe Enclosure LED Management Mariusz Tkaczyk
2024-05-28 13:19 ` [PATCH v2 1/3] leds: Init leds class earlier Mariusz Tkaczyk
2024-05-29 4:22 ` Dan Williams
2024-06-14 14:08 ` Lukas Wunner
2024-06-14 14:13 ` Greg Kroah-Hartman
2024-05-28 13:19 ` [PATCH v2 2/3] PCI/NPEM: Add Native PCIe Enclosure Management support Mariusz Tkaczyk
2024-05-28 13:55 ` Ilpo Järvinen
2024-06-14 13:40 ` Mariusz Tkaczyk
2024-05-29 5:21 ` Dan Williams
2024-05-29 9:38 ` Lukas Wunner
2024-06-12 11:40 ` Mariusz Tkaczyk
2024-06-13 16:11 ` stuart hayes
2024-06-19 14:28 ` Mariusz Tkaczyk
2024-06-14 21:06 ` stuart hayes
2024-06-15 10:33 ` Lukas Wunner
2024-06-18 8:56 ` Mariusz Tkaczyk
2024-06-18 17:13 ` Lukas Wunner
2024-06-18 18:50 ` stuart hayes
2024-06-18 19:32 ` Dan Williams
2024-06-19 9:08 ` Lukas Wunner [this message]
2024-06-19 12:07 ` Mariusz Tkaczyk
2024-05-28 13:19 ` [PATCH v2 3/3] PCI/NPEM: Add _DSM PCIe SSD status LED management Mariusz Tkaczyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZnKgCos9ZwVzcKuS@wunner.de \
--to=lukas@wunner.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kbusch@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marek.behun@nic.cz \
--cc=mariusz.tkaczyk@linux.intel.com \
--cc=pavel@ucw.cz \
--cc=rdunlap@infradead.org \
--cc=stuart.w.hayes@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox