]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: do not hold CRB mutex when executing TPM commands
authorCorvin Köhne <corvink@FreeBSD.org>
Fri, 23 Jun 2023 06:31:38 +0000 (08:31 +0200)
committerCorvin Köhne <corvink@FreeBSD.org>
Tue, 25 Jul 2023 06:50:23 +0000 (08:50 +0200)
commitf0124ab11122c24166fe83ae6898f629721a7894
tree2ad0a7827355dcdcde4cb421456e681f575f754b
parentb9b8a4769c09d6e9422be242c4de1d881095ba82
bhyve: do not hold CRB mutex when executing TPM commands

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.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40724
usr.sbin/bhyve/tpm_intf_crb.c