]> xenbits.xensource.com Git - libvirt.git/commit
qemu: lookup node device against nodedev driver before getting XML
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 10 Mar 2020 17:03:54 +0000 (17:03 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 17 Mar 2020 13:58:20 +0000 (13:58 +0000)
commitb8a3ed957e643077bbf3b4d8de5ca694903d7f93
tree8f1685724b8fae4e6bf03cc4ea11b47d2a395aad
parent69eee587da9648b5fe98ee7d4c7495d824d03203
qemu: lookup node device against nodedev driver before getting XML

Some of the node device APIs are a little odd because they accept a
virNodeDevicePtr object but are still implemented by the virt drivers.
The first thing the virt drivers need to do is get the XML config
associated with the node device, and that means talking to the node
device driver.

This worked previously because with monolithic libvirtd, both the
virt driver and node device driver were in the same daemon and thus
a single virConnectPtr can talk to both drivers.

With the split daemon world though, the virNodeDevicePtr passed into
the APIs is associated with the QEMU driver virConnectPtr, which has
no ability to invoke APIs against the node device driver. We must thus
get a duplicate virNodeDevicePtr object which is associated with a
virConnectPtr for the node device driver.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/libxl/libxl_driver.c
src/qemu/qemu_driver.c