TPM commands can take up to several seconds to execute. If we hold the
CRB mutex while executing the command, MMIO accesses could be blocked
for a long time. Therefore, just copy all required values and work on
the copied values.
Details
Details
- Reviewers
jhb markj - Group Reviewers
bhyve - Commits
- rGf0124ab11122: bhyve: do not hold CRB mutex when executing TPM commands
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 52390 Build 49281: arc lint + arc unit
Event Timeline
usr.sbin/bhyve/tpm_intf_crb.c | ||
---|---|---|
226 | Now it's possible for the thread to miss wakeups. Suppose the thread is processing a command, and tpm_crb_deinit() is called while the lock is dropped. The thread will reacquire the lock and go to sleep without checking crb->closing. |