For QXL in particular, this breaks FreeBSD guests running under common Linux virt-manager for QEMU/KVM with QXL video. (QXL is the default paravirtualized display device there.) The symptom manifests as Xorg segfaulting at NULL+8 in pci_io_write8().
Adding the method is trivial; our existing "legacy" open method works sufficiently to implement the missing one. See patch:
Since this is submitted upstream, together with other changes, I'd like to give upstream a day or two to respond, in case there's something we're misunderstanding.
We have a WIP branch here: https://github.com/FreeBSDDesktop/freebsd-ports/tree/feature/libpciaccess
I'll incorporate your patches there for easy testing.
(In reply to Niclas Zeising from comment #1)
No big hurry, it can wait a few days. This turns an obvious segfault in qxl into a working desktop in a kvm FreeBSD guest, so I believe it’s more or less correct.
A commit references this bug:
Date: Sun Jun 30 17:04:05 UTC 2019
New revision: 505440
x11/libpciaccess: Update to 0.14.0
Update x11/libpciaccess to 0.14.0. Rework the patch to match what has
been submitted upstream.
Remove old code that was used before PCIOCGETBAR. PCIOCGETBAR has been part
of FreeBSD for a long time.
Remove check for if pci_io.pi_sel.pc_domain exists. This has been the case
for quite some time.
Add a function to detect if a driver has been attached to a PCI device
Implement pci_device_freebsd_open_io, this fixes runtime of xf86-video-qxl
and possibly other drivers 
Reformat and try to apply upstream style.
Side note, instead of trying to patch configure, I've elected to change
configure.ac and add a dependency on autoreconf. The difference between the
previous configure and a new configure generated by the patched configure.ac
is quite large.
PR: 238590 
Submitted by: cem 
Obtained from: FreeBSD Graphics Team development repo
Sponsored by: B3 Init (zeising)
Committed the patch together with the libpciaccess 0.14.0.
FWIW, Ajax merged the proposed PR upstream, so newer versions of libpciaccess should have this bug fixed.
(In reply to Conrad Meyer from comment #5)
> FWIW, Ajax merged the proposed PR upstream, so newer versions of
> libpciaccess should have this bug fixed.
Yeah, he merged the other changes as well. I've updated a test branch with the new release, but will let it sit there for a smoke test at least, before merging it.
There's also a little bit of fallout from the update to 0.14.0, that needs to be fixed.
libpciaccess 0.15.0 can be found here, in case you want to test it out.