The vsmmu and virtio-iommu are known to be buggy with the pcie-to-pci bridge. Fixing that will require important changes in the iommu group probing method in the iommu subsystem. Until this gets fixed, let's compile out the pcie-to-pci bridge emphasizing this is not supported and not to be tested.
Hi Sebastian, Just looking at the attachment, you cannot simply disable CONFIG_PCIE_PORT because we need the root ports which are extensively used in our pcie topologies. I wonder why/if the pcie_pci_bridge.c does not deserve its own config. I would try to understand if there is no way to decouple the pcie_pci_bridge from the root ports. This would require some upstream activity though. Try to gather more info on the rationale while reading docs/pcie* in the qemu directory.
Hej Eric, ..sry, it's the first time I've looked at the qemu build system. I don't think I've disabled CONFIG_PCIE_PORT but removed pcie_pci_bridge.c from the compilation unit when CONFIG_PCIE_PORT is set. If an extra config option that's dependent on CONFIG_PCIE_PORT is the way to go then I'll do that. Thanks!
(In reply to Sebastian Ott from comment #3) > Hej Eric, > > ..sry, it's the first time I've looked at the qemu build system. I don't > think I've disabled CONFIG_PCIE_PORT but removed pcie_pci_bridge.c from the > compilation unit when CONFIG_PCIE_PORT is set. If an extra config option > that's dependent on CONFIG_PCIE_PORT is the way to go then I'll do that. > > Thanks! Oh indeed I skimmed through your patch too quickly. In practice, downstream, we usually modify ./configs/devices/aarch64-softmmu/aarch64-rh-devices.mak to enable devices. This obviously assumes that your device can be selected using a proper config independently on the others. We try to avoid RHEL-only patches as the solution you currently suggests. I would suggest you try to isolate the pcie-to-pci bridge upstream, if this makes sense and if this is feasible. Once isolated we could let the option disabled by default on RHEL.
I've got the build running using: ./configure --with-devices-aarch64=aarch64-rh-devices --target-list=aarch64-softmmu Unless someone objects I'll send https://bugzilla.redhat.com/attachment.cgi?id=1964039&action=diff upstream. I've confirmed that with these hw/pci-bridge/pcie_pci_bridge.c is not compiled. Is there some means to test this? Like a qemu commandline using "pcie-pci-bridge" ?
(In reply to Sebastian Ott from comment #10) > I've got the build running using: > ./configure --with-devices-aarch64=aarch64-rh-devices > --target-list=aarch64-softmmu > > Unless someone objects I'll send > https://bugzilla.redhat.com/attachment.cgi?id=1964039&action=diff upstream. > > I've confirmed that with these hw/pci-bridge/pcie_pci_bridge.c is not > compiled. > > Is there some means to test this? Like a qemu commandline using > "pcie-pci-bridge" ? example: -device pcie-pci-bridge,bus=pcie.0,addr=0x4.0x0,id=pci.1 \ -device pcie-root-port,bus=pcie.0,chassis=3,id=pcie.3,addr=0x3.0x0 \ -device virtio-blk-pci,bus=pcie.3,scsi=off,drive=drv0,id=virtio-disk0,bootindex=1 but you mostly need to check the right devices are compiled here I think. You shall be able to use qmp query-pci to check the pci topology but the qemu cmd would have failed before in your case. Eric
The upstream patch was merged upstream as: 6a36a4ced8 hw/pci-bridge: make building pcie-to-pci bridge configurable I created a request to merge the upstream and downstream patch: https://gitlab.com/redhat/rhel/src/qemu-kvm/qemu-kvm/-/merge_requests/282
(In reply to Sebastian Ott from comment #12) > I created a request to merge the upstream and downstream patch: > https://gitlab.com/redhat/rhel/src/qemu-kvm/qemu-kvm/-/merge_requests/282 wrong repo - new MR: https://gitlab.com/redhat/centos-stream/src/qemu-kvm/-/merge_requests/168
We eventually decided that the removal of the pcie-to-pci bridge device cannot happen in the middle of a major release. So we postpone this action and close the BZ as WONTFIX. Thanks to Sebastian's work upstream, it will be straightforward to compile the device out if we decide to do so.