Remove function calls in virtio_pci_modern.c that convert the byte order. This fixes a bug reported here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294706
Reading a value from the PCI bus with bus_read_x() (with x > 1) requires a byte conversion on a big-endian system, because the PCI bus uses little endian. However, this conversion is done by the bus_space_read_x() functions, which are used (bus_read_x() are macros defined in sys/sys/bus.h that map to bus_space_read_x()). Thus, another byte conversion in virtio_pci_modern.c is incorrect.
The byte order the PCI device uses is irrelevant. For instance, in a big-endian guest, the VirtIO PCI device uses big endian in legacy mode and little endian in modern mode. However, since the data are transferred over the PCI bus, single values arrive in little endian no matter how the PCI device stores them.
QEMU tends to provide a transitional VirtIO PCI device, which means it can run in both modes, legacy and modern. In a FreeBSD guest, the loader tunable hw.virtio.pci.transitional decides which mode is used. If it is 0, legacy mode is used. If it is 1, modern mode is used. The default value had been 0 until D55894, which changed the default to 1. Since then, modern mode is probably used more often, and that discovered this long-existing bug.