From: Daniel Berrange <berrange(a)redhat.com>
NodeDeviceCreateXML and NodeDeviceDestroy methods added for NPIV were
using the wrong privateData field for the remote driver. This doesn't
impact KVM, since the remote driver handles everything, thus
privateData == devMonPrivateData. It does impact Xen though, because
the remote driver only handles a subset of methods and thus
privateData != devMonPrivateData.
---
src/remote/remote_driver.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index cb0d8e1..a945710 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -6164,6 +6164,8 @@ remoteNodeDeviceDettach (virNodeDevicePtr dev)
{
int rv = -1;
remote_node_device_dettach_args args;
+ /* This method is unusual in that it uses the HV driver, not the devMon driver
+ * hence its use of privateData, instead of devMonPrivateData */
struct private_data *priv = dev->conn->privateData;
remoteDriverLock(priv);
@@ -6187,6 +6189,8 @@ remoteNodeDeviceReAttach (virNodeDevicePtr dev)
{
int rv = -1;
remote_node_device_re_attach_args args;
+ /* This method is unusual in that it uses the HV driver, not the devMon driver
+ * hence its use of privateData, instead of devMonPrivateData */
struct private_data *priv = dev->conn->privateData;
remoteDriverLock(priv);
@@ -6210,6 +6214,8 @@ remoteNodeDeviceReset (virNodeDevicePtr dev)
{
int rv = -1;
remote_node_device_reset_args args;
+ /* This method is unusual in that it uses the HV driver, not the devMon driver
+ * hence its use of privateData, instead of devMonPrivateData */
struct private_data *priv = dev->conn->privateData;
remoteDriverLock(priv);
@@ -6237,7 +6243,7 @@ remoteNodeDeviceCreateXML(virConnectPtr conn,
remote_node_device_create_xml_args args;
remote_node_device_create_xml_ret ret;
virNodeDevicePtr dev = NULL;
- struct private_data *priv = conn->privateData;
+ struct private_data *priv = conn->devMonPrivateData;
remoteDriverLock(priv);
@@ -6263,7 +6269,7 @@ remoteNodeDeviceDestroy(virNodeDevicePtr dev)
{
int rv = -1;
remote_node_device_destroy_args args;
- struct private_data *priv = dev->conn->privateData;
+ struct private_data *priv = dev->conn->devMonPrivateData;
remoteDriverLock(priv);
--
1.7.2