We have to use "debian.jessie" instead of "ubuntu.xenial" because
qemu-s390x-static can only run z900 instructions and Ubuntu is
built with a more recent architecture level set.
We first enable only gcc because there are still some issues with clang.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Debian is compiled for z900 - therefore we can't use the "laa"
instruction.
Fix this and replace "laa" by the older "cs" (compare and swap) loop.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
The flogr instruction not supported by debian jessie (z900).
So replace it by the gcc built-in.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Use the "-fno-optimize-sibling-calls" gcc option to prevent GOT relocations
caused by gcc versions without the commit "S/390: Fix 64 bit sibcall":
* https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233169
Otherwise we get compile errors like:
GEN criu/pie/parasite-blob.h
Error (compel/src/lib/handle-elf-host.c:572):
Unsupported relocation of type 26
Those can be caused by the following relocation types:
* R_390_GOTENT (e.g. RHEL7 based systems)
* R_390_GOTPCDBL (e.g. Debian Jessie)
* R_390_GOT12 (e.g. Debian Jessie)
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
For kernels that don't have commit ee71d16d22 ("s390/mm: make TASK_SIZE
independent from the number of page table levels") criu sets TASK_SIZE
to 4 TB on s390 (see compel_task_size()).
When dumping tasks >= 4 TB on such systems, we would silently loose
memory >= 4TB.
So add a check and refuse to dump the task in that case.
When restoring tasks >= 4 TB on such systems, the remap() call for
moving the vmas at the end of the restor process would fail
and a very unclear error message is printed.
So add a check and write a more speaking error message in that case.
Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
On s390 we have special console drivers with minors 64 and 65.
Add support for them in criu code and in zdtm testsuite.
Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
If the kernel contains patch ee71d16d22 ("s390/mm: make TASK_SIZE
independent from the number of page table levels") we are able
to checkpoint tasks > 4TB.
Add a testcase to verify this.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Add s390 parts to common code files.
Patch history
-------------
v2->v3:
* Add: Fix big endian byte order checks
Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Add s390 parts to common code files.
Patch history
-------------
v2->v3:
* Add: s390: Consolidate -msoft-float into Makefile.compel
Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This patch only adds the support but does not enable it for building.
Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Same here -- now when we collect info and driver at the same
place late enough we can verify info once, then attach to
files.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Since we need tty driver for info, we may lookup the guy
when collecting info, not when attaching it to a file.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
There are two object for TTY files -- the file itself and tty_info.
The latter is effectively an inode image. Right now we collect infos
before files, so that latter can find former and attach to it.
In order to move tty files on generic file entry we need to collect
files very early, much earlier, that infos. So here's the patch that
changes the order of tty file vs info collection.
The general idea is -- when collecting files put them in a list and
when an info arrives it walks that list and attaches ttys to self.
Next patches will also add some optimization available with that
scheme.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
There are two goals of this merge. First is to reduce the amount
of image files we generate and scan on restore. The latter is
more importaint, as even if we have no weird stuff like signalfd,
we still try to open this file. So after the merge we try to
open ~15 image files (out of ~30) less %) which is nice.
The 2nd goal is to simplify the C/R support for SCM messages.
This becomes possible with the fact, that all files we have can
be distinguished by their ID only, w/o type. This, in turn,
makes image layout for SCMs much simpler.
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
I'm about to merge all the file images into one big image,
so here's the place that would read it and collect.
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
(Try to) Fix the readme problems found by the feedmereadmes guys:
* Tuned up the tagline
* Added info about what for, history, competitors, etc.
* Put more links for potential contributors
This device is an API endpoint, just skip it. Also, prepare the
ground for sit dump.
Issue #11
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Most of the changes this time are preparation for future
new features and optimizations, that hasn't yet been well
tested and polished.
However, we have several new features. The most important
one is the --tcp-close option to help migration of Docker
containers, that constantly change their IP address.
And, as usually, a set of bugfixes.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
The struct fd_link link allocated in inner context might be
freed before dump call (depending on compiler), instead
use a safer approach.
Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
The unified hierarchy controller doesn't have any name, so criu hangs
while parsing this sort of strings.
Let's skip those for now, until we implement cgroup2 support.
https://github.com/xemul/criu/issues/252
v2: Code comments
Reported-and-tested-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
It looks like this call to open_image was left from the
times when we reworked packets sending and collected
them early.
✓ travis-ci: success for sk-packet: Don't open image when not needed
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Code for tcp-close option was added after boolean-valued options
were modified to accept their negations as well. Since tcp-close
option works only with boolean values and does not accept any
argument, it should be wriiten in the same manner to allow users
to override the value when using configuration files.
Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Only long options are supported in configuration files. "-v" is the only
short option which doesn't have a corresponding long option, therefore
users wouldn't be able to setup verbosity in configuration files without
this patch.
Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Use "union semun" for semctl() to make testcase also work on s390x.
Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>