Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Nov 2021 12:00:20 +0000
From:      =?utf-8?B?Q29ydmluIEvDtmhuZQ==?= <C.Koehne@beckhoff.com>
To:        John Baldwin <jhb@FreeBSD.org>, Emmanuel Vadot <manu@FreeBSD.org>, "src-committers@FreeBSD.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@FreeBSD.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@FreeBSD.org" <dev-commits-src-main@FreeBSD.org>
Subject:   RE: git: 2eb2079554f4 - main - bhyve: keep physical and virtual COMMAND reg in sync
Message-ID:  <80ac3d256ce94f809a39f5badc864588@beckhoff.com>
In-Reply-To: <0d0a6a77-b2d1-d0c2-f0de-e5c97307e140@FreeBSD.org>
References:  <202111221530.1AMFUUJn079855@gitrepo.freebsd.org> <428e410d-33c1-7ff8-9689-41943db3d9c3@FreeBSD.org> <084d5b5845554221901ce4902fb878d1@beckhoff.com> <0d0a6a77-b2d1-d0c2-f0de-e5c97307e140@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

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
(https://www.ics.uci.edu/~harris/ics216/pci/PCI_22.pdf).
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
Corvin



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



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80ac3d256ce94f809a39f5badc864588>