Hello community, here is the log from the commit of package libvirt for openSUSE:Factory checked in at 2014-05-21 16:19:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvirt (Old) and /work/SRC/openSUSE:Factory/.libvirt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvirt" Changes: -------- --- /work/SRC/openSUSE:Factory/libvirt/libvirt.changes 2014-05-08 12:39:06.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libvirt.new/libvirt.changes 2014-05-21 16:19:40.000000000 +0200 @@ -1,0 +2,7 @@ +Mon May 12 15:22:08 MDT 2014 - [email protected] + +- libxl: Fix <interface type='hostdev'> syntax for SR-IOV devices + fd43d1f8-libxl-iface-hostdev.patch, + 99f50208-managed-hostdev-iface.patch + +------------------------------------------------------------------- Old: ---- 0e0c1a74-domid-fix.patch 7a1452f5-libxl-empty-cdrom.patch New: ---- 99f50208-managed-hostdev-iface.patch fd43d1f8-libxl-iface-hostdev.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt.spec ++++++ --- /var/tmp/diff_new_pack.BVzHFa/_old 2014-05-21 16:19:42.000000000 +0200 +++ /var/tmp/diff_new_pack.BVzHFa/_new 2014-05-21 16:19:42.000000000 +0200 @@ -432,6 +432,8 @@ Patch1: c4fe29f8-use-shutdown-flag.patch Patch2: da744120-use-reboot-flag.patch Patch3: d6b27d3e-CVE-2014-0179.patch +Patch4: fd43d1f8-libxl-iface-hostdev.patch +Patch5: 99f50208-managed-hostdev-iface.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: ia64-clone.patch @@ -954,6 +956,8 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 %patch100 -p1 %patch101 -p1 %patch102 -p1 ++++++ 99f50208-managed-hostdev-iface.patch ++++++ commit 99f50208c9ff49bbb8b864407be02522976c1b4f Author: Chunyan Liu <[email protected]> Date: Thu May 8 14:44:05 2014 +0800 update documentation of <interface type='hostdev'> <interface type='hostdev' managed='yes'> is supported, but nowhere mentions 'managed' in <interface type='hostdev'> syntax. Update documentation to cover it. Signed-off-by: Chunyan Liu <[email protected]> Index: libvirt-1.2.4/docs/formatdomain.html.in =================================================================== --- libvirt-1.2.4.orig/docs/formatdomain.html.in +++ libvirt-1.2.4/docs/formatdomain.html.in @@ -3507,10 +3507,22 @@ guest instead of <interface type='hostdev'/>. </p> + <p> + Similar to the functionality of a standard <hostdev> device, + when <code>managed</code> is "yes", it is detached from the host + before being passed on to the guest, and reattached to the host + after the guest exits. If <code>managed</code> is omitted or "no", + the user is responsible to call <code>virNodeDeviceDettach</code> + (or <code>virsh nodedev-dettach</code>) before starting the guest + or hot-plugging the device, and <code>virNodeDeviceReAttach</code> + (or <code>virsh nodedev-reattach</code>) after hot-unplug or + stopping the guest. + </p> + <pre> ... <devices> - <interface type='hostdev'> + <interface type='hostdev' managed='yes'> <driver name='vfio'/> <source> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> ++++++ fd43d1f8-libxl-iface-hostdev.patch ++++++ commit fd43d1f8bd3e8381d266f7c2a7e701568b29e2aa Author: Chunyan Liu <[email protected]> Date: Thu May 8 14:44:04 2014 +0800 libxl: fix support for <interface type="hostdev"> syntax A VIR_DOMAIN_NET_TYPE_HOSTDEV interface device is really a hostdev device, which is created by the libxl driver in libxlMakePCIList(). There is no need to create a libxl_device_nic for such hostdev devices, so skip interfaces of type VIR_DOMAIN_NET_TYPE_HOSTDEV in libxlMakeNicList(). Signed-off-by: Chunyan Liu <[email protected]> Index: libvirt-1.2.4/src/libxl/libxl_conf.c =================================================================== --- libvirt-1.2.4.orig/src/libxl/libxl_conf.c +++ libvirt-1.2.4/src/libxl/libxl_conf.c @@ -921,25 +921,31 @@ static int libxlMakeNicList(virDomainDefPtr def, libxl_domain_config *d_config) { virDomainNetDefPtr *l_nics = def->nets; - int nnics = def->nnets; + size_t nnics = def->nnets; libxl_device_nic *x_nics; - size_t i; + size_t i, nvnics = 0; if (VIR_ALLOC_N(x_nics, nnics) < 0) return -1; for (i = 0; i < nnics; i++) { - if (libxlMakeNic(def, l_nics[i], &x_nics[i])) + if (l_nics[i]->type == VIR_DOMAIN_NET_TYPE_HOSTDEV) + continue; + + if (libxlMakeNic(def, l_nics[i], &x_nics[nvnics])) goto error; /* * The devid (at least right now) will not get initialized by * libxl in the setup case but is required for starting the * device-model. */ - if (x_nics[i].devid < 0) - x_nics[i].devid = i; + if (x_nics[nvnics].devid < 0) + x_nics[nvnics].devid = nvnics; + + nvnics++; } + VIR_SHRINK_N(x_nics, nnics, nnics - nvnics); d_config->nics = x_nics; d_config->num_nics = nnics; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
