RE: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync

From: Corvin Köhne <>
Date: Wed, 24 Nov 2021 12:00:20 UTC
Hi John,

> Would you be able to test if that change works in your environment?  I was
> never able to confirm that it fixed the bug I was trying to address, but I
> do think it is more correct.  The busmastering thing is to work around Linux
> clearing that flag on shutdown of a guest, and I wanted to preserve other
> bits in the command register that weren't related to BARs, etc.

The change works in my environment. As you have mentioned, my Linux guest
clears the busmastering bit on shutdown. However, in my opinion we should
initialize the command register bits in the same way as a real system does.

I took a short look into a public available PCI specification
For busmastering (and also for IO/Mem decoding) it states that it's default value
is 0. Therefore, I'd prefer to unconditionally clear those bits on startup.

Best regards

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075