forked from pool/libvirt
794d4df5d5
implementation does not support libxl in Xen 4.2. - Update to libvirt 0.10.2 - network: define new API virNetworkUpdate - add support for QEmu sandbox support - blockjob: add virDomainBlockCommit - node_memory: Define the APIs to get/set memory parameters - list: Define new API virConnectListAllSecrets - list: Define new API virConnectListAllNWFilter - list: Define new API virConnectListAllNodeDevices - list: Define new API virConnectListAllInterfaces - list: Define new API virConnectListAllNetworks - list: Define new API virStoragePoolListAllVolumes - list: Define new API virStorageListAllStoragePools - parallels: add support of containers to the driver - Add PMSUSPENDED life cycle event - Add per-guest S3/S4 state configuration - qemu: Support for Block Device IO Limits OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=227
59 lines
1.8 KiB
Diff
59 lines
1.8 KiB
Diff
Index: src/lxc/lxc_container.c
|
|
===================================================================
|
|
--- src/lxc/lxc_container.c.orig
|
|
+++ src/lxc/lxc_container.c
|
|
@@ -1932,6 +1932,9 @@ int lxcContainerStart(virDomainDefPtr de
|
|
ttyPaths, nttyPaths, handshakefd};
|
|
|
|
/* allocate a stack for the container */
|
|
+#ifdef __ia64__
|
|
+ stacksize *= 2;
|
|
+#endif
|
|
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
|
virReportOOMError();
|
|
return -1;
|
|
@@ -1951,7 +1954,11 @@ int lxcContainerStart(virDomainDefPtr de
|
|
cflags |= CLONE_NEWNET;
|
|
}
|
|
|
|
+#ifdef __ia64__
|
|
+ pid = __clone2(lxcContainerChild, stack, stacksize, cflags, &args);
|
|
+#else
|
|
pid = clone(lxcContainerChild, stacktop, cflags, &args);
|
|
+#endif
|
|
VIR_FREE(stack);
|
|
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
|
|
|
@@ -1977,6 +1984,7 @@ int lxcContainerAvailable(int features)
|
|
int cpid;
|
|
char *childStack;
|
|
char *stack;
|
|
+ int stacksize = getpagesize() * 4;
|
|
|
|
if (features & LXC_CONTAINER_FEATURE_USER)
|
|
flags |= CLONE_NEWUSER;
|
|
@@ -1984,14 +1992,21 @@ int lxcContainerAvailable(int features)
|
|
if (features & LXC_CONTAINER_FEATURE_NET)
|
|
flags |= CLONE_NEWNET;
|
|
|
|
- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
|
|
+#ifdef __ia64__
|
|
+ stacksize *= 2;
|
|
+#endif
|
|
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
|
VIR_DEBUG("Unable to allocate stack");
|
|
return -1;
|
|
}
|
|
|
|
- childStack = stack + (getpagesize() * 4);
|
|
+ childStack = stack + stacksize;
|
|
|
|
+#ifdef __ia64__
|
|
+ cpid = __clone2(lxcContainerDummyChild, stack, stacksize, flags, NULL);
|
|
+#else
|
|
cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);
|
|
+#endif
|
|
VIR_FREE(stack);
|
|
if (cpid < 0) {
|
|
char ebuf[1024] ATTRIBUTE_UNUSED;
|