From 5353c641ca35cb6cb2e7a2736073f807f988acc9404f7c4172eb30f04d6f973a Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 17 Sep 2015 15:45:05 +0000 Subject: [PATCH] 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 --- ...e13-libxl-AttachDeviceConfig-hostdev.patch | 26 +++++++++++++++++++ libvirt.changes | 7 +++++ libvirt.spec | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 56945e13-libxl-AttachDeviceConfig-hostdev.patch diff --git a/56945e13-libxl-AttachDeviceConfig-hostdev.patch b/56945e13-libxl-AttachDeviceConfig-hostdev.patch new file mode 100644 index 0000000..437b990 --- /dev/null +++ b/56945e13-libxl-AttachDeviceConfig-hostdev.patch @@ -0,0 +1,26 @@ +commit 56945e1374bd254148643d76a98fba9be67fba15 +Author: Chunyan Liu +Date: Thu Sep 17 01:15:22 2015 -0400 + + libxl: fix AttachDeviceConfig on hostdev type + + After attach-device a 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 + +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: diff --git a/libvirt.changes b/libvirt.changes index 62ba572..aa8507d 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 17 05:29:23 UTC 2015 - cyliu@suse.com + +- bsc#945962: SLES12 SP1 Beta3 - Pass-through NIC device via virsh + not available to VM. + 56945e13-libxl-AttachDeviceConfig-hostdev.patch + ------------------------------------------------------------------- Tue Sep 15 17:37:36 UTC 2015 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 71c694a..33c1a31 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -450,6 +450,7 @@ Patch0: 3468542f-virFileUnlink.patch Patch1: 8b1d84e6-refreshVol-failure.patch Patch2: e0025d29-storage-mode-check.patch Patch3: ba25c214-libxl-log-level.patch +Patch4: 56945e13-libxl-AttachDeviceConfig-hostdev.patch # Patches pending upstream review # Need to go upstream Patch150: xen-pv-cdrom.patch @@ -984,6 +985,7 @@ Provides a dissector for the libvirt RPC protocol to help debugging it. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch150 -p1 %patch151 -p1 %patch152 -p1