HomeFreeBSD

bhyve: keep physical and virtual COMMAND reg in sync

Description

bhyve: keep physical and virtual COMMAND reg in sync

On startup all virtual BARs are registered.
Additionally, the encoding bit in the virtual cmd register is set.
After that, the passthru emulation overwrites the virtual cmd register with
the physical one.
This could lead to a mismatch between registered BARs and the encoding
bits in the cmd register.
Instead of writing the physical to the virtual cmd register,
write the virtual to the physical cmd register to solve this issue.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D32687
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 2eb2079554f4d54c4283410b4ee1aca549b29616)

Details

Provenance
c.koehne_beckhoff.comAuthored on Nov 22 2021, 3:26 PM
manuCommitted on Jan 14 2022, 2:18 PM
Reviewer
markj
Differential Revision
D32687: bhyve: keep physical and virtual COMMAND reg in sync
Parents
rGf281bda11a1a: bhyve: use a fixed 32 bit BAR base address
Branches
Unknown
Tags
Unknown