SHA256
1
0
forked from pool/libvirt
libvirt/56945e13-libxl-AttachDeviceConfig-hostdev.patch
James Fehlig 5353c641ca Add a SLE12 SP1 bug fix to the Factory libvirt package.
- bsc#945962: SLES12 SP1 Beta3 - Pass-through NIC device via virsh
  not available to VM.
  56945e13-libxl-AttachDeviceConfig-hostdev.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=488
2015-09-17 15:45:05 +00:00

27 lines
929 B
Diff

commit 56945e1374bd254148643d76a98fba9be67fba15
Author: Chunyan Liu <cyliu@suse.com>
Date: Thu Sep 17 01:15:22 2015 -0400
libxl: fix AttachDeviceConfig on hostdev type
After attach-device a <hostdev> with --config, new device doesn't
show up in dumpxml and in guest.
To fix that, set dev->data.hostdev = NULL after work so that the
pointer is not freed, since vmdef has the pointer and still need it.
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Index: libvirt-1.2.19/src/libxl/libxl_driver.c
===================================================================
--- libvirt-1.2.19.orig/src/libxl/libxl_driver.c
+++ libvirt-1.2.19/src/libxl/libxl_driver.c
@@ -3311,6 +3311,7 @@ libxlDomainAttachDeviceConfig(virDomainD
if (virDomainHostdevInsert(vmdef, hostdev) < 0)
return -1;
+ dev->data.hostdev = NULL;
break;
default: