You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PCI/CMA: Grant guests exclusive control of authentication
At any given time, only a single entity in a physical system may have
an SPDM connection to a device. That's because the GET_VERSION request
(which begins an authentication sequence) resets "the connection and all
context associated with that connection" (SPDM 1.3.0 margin no 158).
Thus, when a device is passed through to a guest and the guest has
authenticated it, a subsequent authentication by the host would reset
the device's CMA-SPDM session behind the guest's back.
Prevent by letting the guest claim exclusive CMA ownership of the device
during passthrough. Refuse CMA reauthentication on the host as long.
After passthrough has concluded, reauthenticate the device on the host.
Store the flag indicating guest ownership in struct pci_dev's priv_flags
to avoid the concurrency issues observed by commit 44bda4b ("PCI:
Fix is_added/is_busmaster race condition").
Side note: The Data Object Exchange r1.1 ECN (published Oct 11 2022)
retrofits DOE with Connection IDs. In theory these allow simultaneous
CMA-SPDM connections by multiple entities to the same device. But the
first hardware generation capable of CMA-SPDM only supports DOE r1.0.
The specification also neglects to reserve unique Connection IDs for
hosts and guests, which further limits its usefulness.
In general, forcing the transport to compensate for SPDM's lack of a
connection identifier feels like a questionable layering violation.
Signed-off-by: Lukas Wunner <[email protected]>
Cc: Alex Williamson <[email protected]>
0 commit comments