libvirt/ia64-clone.patch
James Fehlig 5016413cf6 - Update to libvirt 1.2.2
- add LXC from native conversion tool
  - vbox: add support for v4.2.20+ and v4.3.4+
  - CVE-2013-6456 (bnc#857490)
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
  - Drop upstream patches: 37564b47-xend-parse-response.patch,
    4f20084-fix-apparmor-install-patch.patch
  - Add local disable-virCgroupGetPercpuStats-test.patch to disable
    failing virCgroupGetPercpuStats test in 'make check'

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=354
2014-03-03 04:22:57 +00:00

67 lines
1.9 KiB
Diff

Index: libvirt-1.2.2/src/lxc/lxc_container.c
===================================================================
--- libvirt-1.2.2.orig/src/lxc/lxc_container.c
+++ libvirt-1.2.2/src/lxc/lxc_container.c
@@ -162,12 +162,19 @@ int lxcContainerHasReboot(void)
VIR_FREE(buf);
cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
+#ifdef __ia64__
+ stacksize *= 2;
+#endif
if (VIR_ALLOC_N(stack, stacksize) < 0)
return -1;
childStack = stack + stacksize;
+#ifdef __ia64__
+ cpid = __clone2(lxcContainerRebootChild, childStack, stacksize, flags, &cmd);
+#else
cpid = clone(lxcContainerRebootChild, childStack, flags, &cmd);
+#endif
VIR_FREE(stack);
if (cpid < 0) {
virReportSystemError(errno, "%s",
@@ -2004,6 +2011,9 @@ int lxcContainerStart(virDomainDefPtr de
.handshakefd = handshakefd
};
+#ifdef __ia64__
+ stacksize *= 2;
+#endif
/* allocate a stack for the container */
if (VIR_ALLOC_N(stack, stacksize) < 0)
return -1;
@@ -2029,7 +2039,11 @@ int lxcContainerStart(virDomainDefPtr de
cflags |= CLONE_NEWNET;
}
+#ifdef __ia64__
+ pid = __clone2(lxcContainerChild, stacktop, stacksize, cflags, &args);
+#else
pid = clone(lxcContainerChild, stacktop, cflags, &args);
+#endif
VIR_FREE(stack);
VIR_DEBUG("clone() completed, new container PID is %d", pid);
@@ -2063,12 +2077,19 @@ int lxcContainerAvailable(int features)
if (features & LXC_CONTAINER_FEATURE_NET)
flags |= CLONE_NEWNET;
+#ifdef __ia64__
+ stacksize *= 2;
+#endif
if (VIR_ALLOC_N(stack, stacksize) < 0)
return -1;
childStack = stack + stacksize;
+#ifdef __ia64__
+ cpid = __clone2(lxcContainerDummyChild, childStack, stacksize, flags, NULL);
+#else
cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);
+#endif
VIR_FREE(stack);
if (cpid < 0) {
char ebuf[1024] ATTRIBUTE_UNUSED;