- remove xen.migrate.tools_notify_restore_to_hangup_during_migration_--abort_if_busy.patch It changed migration protocol and upstream wants a different solution - bnc#802221 - fix xenpaging readd xenpaging.qemu.flush-cache.patch - Upstream patches from Jan 26891-x86-S3-Fix-cpu-pool-scheduling-after-suspend-resume.patch 26930-x86-EFI-fix-runtime-call-status-for-compat-mode-Dom0.patch - Additional fix for bnc#816159 CVE-2013-1918-xsa45-followup.patch - bnc#817068 - Xen guest with >1 sr-iov vf won't start xen-managed-pci-device.patch - Update to Xen 4.2.2 c/s 26064 The following recent security patches are included in the tarball CVE-2013-0151-xsa34.patch (bnc#797285) CVE-2012-6075-xsa41.patch (bnc#797523) CVE-2013-1917-xsa44.patch (bnc#813673) CVE-2013-1919-xsa46.patch (bnc#813675) - Upstream patch from Jan 26902-x86-EFI-pass-boot-services-variable-info-to-runtime-code.patch - bnc#816159 - VUL-0: xen: CVE-2013-1918: XSA-45: Several long latency operations are not preemptible CVE-2013-1918-xsa45-1-vcpu-destroy-pagetables-preemptible.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=237
104 lines
3.1 KiB
Diff
104 lines
3.1 KiB
Diff
commit 5420f26507fc5c9853eb1076401a8658d72669da
|
|
Author: Jim Fehlig <jfehlig@suse.com>
|
|
Date: Fri Jan 11 12:22:26 2013 +0000
|
|
|
|
libxl: Set vfb and vkb devid if not done so by the caller
|
|
|
|
Other devices set a sensible devid if the caller has not done so.
|
|
Do the same for vfb and vkb. While at it, factor out the common code
|
|
used to determine a sensible devid, so it can be used by other
|
|
libxl__device_*_add functions.
|
|
|
|
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
|
Acked-by: Ian Campbell <ian.campbell@citrix.com>
|
|
Committed-by: Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
Index: xen-4.2.2-testing/tools/libxl/libxl.c
|
|
===================================================================
|
|
--- xen-4.2.2-testing.orig/tools/libxl/libxl.c
|
|
+++ xen-4.2.2-testing/tools/libxl/libxl.c
|
|
@@ -1710,6 +1710,26 @@ out:
|
|
return;
|
|
}
|
|
|
|
+/* common function to get next device id */
|
|
+static int libxl__device_nextid(libxl__gc *gc, uint32_t domid, char *device)
|
|
+{
|
|
+ char *dompath, **l;
|
|
+ unsigned int nb;
|
|
+ int nextid = -1;
|
|
+
|
|
+ if (!(dompath = libxl__xs_get_dompath(gc, domid)))
|
|
+ return nextid;
|
|
+
|
|
+ l = libxl__xs_directory(gc, XBT_NULL,
|
|
+ GCSPRINTF("%s/device/%s", dompath, device), &nb);
|
|
+ if (l == NULL || nb == 0)
|
|
+ nextid = 0;
|
|
+ else
|
|
+ nextid = strtoul(l[nb - 1], NULL, 10) + 1;
|
|
+
|
|
+ return nextid;
|
|
+}
|
|
+
|
|
/******************************************************************************/
|
|
|
|
int libxl__device_disk_setdefault(libxl__gc *gc, libxl_device_disk *disk)
|
|
@@ -2549,8 +2569,7 @@ void libxl__device_nic_add(libxl__egc *e
|
|
flexarray_t *front;
|
|
flexarray_t *back;
|
|
libxl__device *device;
|
|
- char *dompath, **l;
|
|
- unsigned int nb, rc;
|
|
+ unsigned int rc;
|
|
|
|
rc = libxl__device_nic_setdefault(gc, nic, domid);
|
|
if (rc) goto out;
|
|
@@ -2567,17 +2586,10 @@ void libxl__device_nic_add(libxl__egc *e
|
|
}
|
|
|
|
if (nic->devid == -1) {
|
|
- if (!(dompath = libxl__xs_get_dompath(gc, domid))) {
|
|
+ if ((nic->devid = libxl__device_nextid(gc, domid, "vif") < 0)) {
|
|
rc = ERROR_FAIL;
|
|
goto out_free;
|
|
}
|
|
- if (!(l = libxl__xs_directory(gc, XBT_NULL,
|
|
- libxl__sprintf(gc, "%s/device/vif", dompath), &nb)) ||
|
|
- nb == 0) {
|
|
- nic->devid = 0;
|
|
- } else {
|
|
- nic->devid = strtoul(l[nb - 1], NULL, 10) + 1;
|
|
- }
|
|
}
|
|
|
|
GCNEW(device);
|
|
@@ -2964,6 +2976,13 @@ int libxl__device_vkb_add(libxl__gc *gc,
|
|
goto out_free;
|
|
}
|
|
|
|
+ if (vkb->devid == -1) {
|
|
+ if ((vkb->devid = libxl__device_nextid(gc, domid, "vkb") < 0)) {
|
|
+ rc = ERROR_FAIL;
|
|
+ goto out_free;
|
|
+ }
|
|
+ }
|
|
+
|
|
rc = libxl__device_from_vkb(gc, domid, vkb, &device);
|
|
if (rc != 0) goto out_free;
|
|
|
|
@@ -3065,6 +3084,13 @@ int libxl__device_vfb_add(libxl__gc *gc,
|
|
goto out_free;
|
|
}
|
|
|
|
+ if (vfb->devid == -1) {
|
|
+ if ((vfb->devid = libxl__device_nextid(gc, domid, "vfb") < 0)) {
|
|
+ rc = ERROR_FAIL;
|
|
+ goto out_free;
|
|
+ }
|
|
+ }
|
|
+
|
|
rc = libxl__device_from_vfb(gc, domid, vfb, &device);
|
|
if (rc != 0) goto out_free;
|
|
|