Description of problem: According to the upstream docs file docs/interop/vhost-user.json # [...] The backend JSON files should be searched for in three # directories: # # - /usr/share/qemu/vhost-user -- populated by distro-provided # packages (XDG_DATA_DIRS covers # /usr/share by default), # # - /etc/qemu/vhost-user -- exclusively for sysadmins' local additions, # # - $XDG_CONFIG_HOME/qemu/vhost-user -- exclusively for per-user local # additions (XDG_CONFIG_HOME # defaults to $HOME/.config). However qemu-kvm's downstream specfile overrides the 'confsuffix' to 'qemu-kvm' instead of 'qemu', resulting in these files being installed in /usr/share/qemu-kvm/vhost-user: # rpm -qf /usr/share/qemu-kvm/vhost-user/50-qemu-gpu.json qemu-kvm-core-4.2.0-1.module+el8.2.0+4793+b09dd2fb.x86_64 docs/interop/firmware.json also mentions the path: # - /usr/share/qemu/firmware -- populated by distro-provided firmware # packages (XDG_DATA_DIRS covers # /usr/share by default), Which matches the location where edk2-ovmf installs it. # rpm -qf /usr/share/qemu/firmware/50-edk2-ovmf.json edk2-ovmf-20190829git37eef91017ad-7.el8.noarch Version-Release number of selected component (if applicable): qemu-kvm-core-4.2.0-1.module+el8.2.0+4793+b09dd2fb.x86_64 edk2-ovmf-20190829git37eef91017ad-7.el8.noarch How reproducible: 0x64 % Expected results: The documented path is honored. Additional info: Currently, libvirt only looks into /usr/share/qemu, which has worked so far because the firmware packages honor it. The motivation for this bug is the usage of 50-qemu-virtiofsd.json: https://www.redhat.com/archives/libvir-list/2020-February/msg00109.html
Reproduced this issue. # rpm -qf /usr/share/qemu-kvm/vhost-user/50-qemu-gpu.json qemu-kvm-core-4.2.0-12.module+el8.2.0+5858+afd073bc.x86_64 The firmware packages location is correct # rpm -qf /usr/share/qemu/firmware/50-edk2-ovmf.json edk2-ovmf-20190829git37eef91017ad-8.el8.noarch
Hi Ján. I'm not sure if I understand your proposal. From my point of view, the right fix to this would be to update the docs and the firmware packages to install files under qemu-kvm dirs. But it seems to me that you are proposing the other way around, to make qemu look for them in regular directories ignoring PREFIX, CONFSUFFIX... is that correct? Thanks!
(In reply to Eugenio Pérez Martín from comment #5) > Hi Ján. > > I'm not sure if I understand your proposal. From my point of view, the right > fix to this would be to update the docs and the firmware packages to install > files under qemu-kvm dirs. Yes, this would be one way to achieve consistency. > But it seems to me that you are proposing the > other way around, to make qemu look for them in regular directories ignoring > PREFIX, CONFSUFFIX... is that correct? > Ignoring CONFSUFFIX (at least for these files that are to be used by external tools) looks like the cleaner solution for me - but maybe I lack the necessary insight to make that claim. IIRC the CONFSUFFIX machinery was introduced to upstream QEMU around the time of dowstream qemu-kvm/qemu-kvm-rhev split, so it should not be necessary nowadays. > Thanks!
A non-standard downstream path allows downstream software to be installed alongside upstream software on the same machine without conflicts, but I'm not sure that's the goal here. The non-standard path also exists for legacy reasons in some cases because QEMU and qemu-kvm used to be two separate programs, that doesn't apply here. The non-standard path is problematic because there will be more vhost-user software in the future. Making each piece of software solve the "qemu" vs "qemu-kvm" issue on RHEL will waste time, so a solution is needed. I suggest using /usr/share/qemu/vhost-user/ as the location in compliance with the spec. This way other VMMs and vhost-user device backend programs can interoperate.
> If not, would it be ok to just do a `mv` or a `ln -s` in the qemu-kvm package in the spec? Yes, I think that's the simplest solution. I'll try to send a patch that does this and see if the downstream maintainers, Daniel Berrangé, and Marc-André Lureau agree.
QA_ACK, please?
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.
Reproduced with qemu-kvm-core-6.0.0-22.module+el8.5.0+11677+542c8d77.x86_64. # rpm -qf /usr/share/qemu-kvm/vhost-user/50-qemu-virtiofsd.json qemu-kvm-common-6.0.0-22.module+el8.5.0+11677+542c8d77.x86_64 Verified with qemu-kvm-core-6.0.0-23.module+el8.5.0+11740+35571f13.x86_64 /usr/share/qemu-kvm/vhost-user/ location to the standard /usr/share/qemu/vhost-user/ location # rpm -qf /usr/share/qemu/vhost-user/50-qemu-virtiofsd.json qemu-kvm-common-6.0.0-23.module+el8.5.0+11740+35571f13.x86_64 Set this as verified. If I missed anything, please let QE know.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4684