]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix domfsinfo for non-PCI device information from guest agent
authorThomas Huth <thuth@redhat.com>
Mon, 20 Jul 2020 10:22:33 +0000 (12:22 +0200)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 2 Sep 2020 16:49:09 +0000 (17:49 +0100)
commitf8333b3b0a7fdbc1f18ed501c043ac7618b86a16
treef345b5d54ad4656ae4ef34422b2f3f2c44eadbff
parent2f5d8ffebe5d3d00e16a051ed62ce8a703f18e7c
qemu: Fix domfsinfo for non-PCI device information from guest agent

qemuAgentFSInfoToPublic() currently only sets the devAlias for PCI devices.
However, the QEMU guest agent could also provide the device name in the
"dev" field of the response for other devices instead (well, at least after
fixing another problem in the current QEMU guest agent...). So if creating
the devAlias from the PCI information failed, let's fall back to the name
provided by the guest agent. This helps to fix the empty "Target" fields
that occur when running "virsh domfsinfo" on s390x where CCW devices are
used for the guest instead of PCI devices.

Also add a proper debug message here in case we completely failed to set the
device alias, since this problem here was very hard to debug: The only two
error messages that I've seen were "Unable to get filesystem information"
and "Unable to encode message payload" - which only indicates that something
went wrong in the RPC call. No debug message indicated the real problem, so
I had to learn the hard way why the RPC call failed (it apparently does not
like devAlias left to be NULL) and where the real problem comes from.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1755075
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
src/qemu/qemu_driver.c