HomeFreeBSD

bhyve: allow reading of fwctl signature multiple times

Description

bhyve: allow reading of fwctl signature multiple times

At the moment, you only have one single chance to read the fwctl
signature. At boot bhyve is in the state IDENT_WAIT. It's then
possible to switch to IDENT_SEND. After bhyve sends the signature,
it switches to REQ. From now on it's impossible to switch back to
IDENT_SEND to read the signature. For that reason, only a single
driver can read the signature. A guest can't use two drivers to
identify that fwctl is present. It gets even worse when using
OVMF. OVMF uses a library to access fwctl. Therefore, every single
OVMF driver would try to read the signature. Currently, only a
single OVMF driver accesses the fwctl. So, there's no issue with
it yet. However, no OS driver would have a chance to detect fwctl when
using OVMF because it's signature was already consumed by OVMF.

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D31981

(cherry picked from commit 8ec366ec6c943550a011effe50bc73e3875f8ead)

Details

Provenance
corvinkAuthored on Jan 3 2022, 1:18 PM
manuCommitted on Jan 17 2022, 12:53 PM
Reviewer
markj
Differential Revision
D31981: bhyve: allow reading of fwctl signature multiple times
Parents
rG104c83a999fa: bhyve: enumerate BARs by size
Branches
Unknown
Tags
Unknown