2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

9 Commits

Author SHA1 Message Date
Cyrill Gorcunov
629e045466 protobuf: Move arch core resources to core-$(ARCH).proto
To unweave arch dependent part from general core.proto file.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-01-23 18:22:47 +04:00
Alexander Kartashov
a0c86a25ab core.proto: added ARM-specific parts to a Core message
Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-01-22 22:52:39 +04:00
Pavel Emelyanov
2105e18eee core: Save tasks' namespaces IDs in the ids image
The recent kernels allow to get namespaces IDs by reading proc-ns links.
Use this to generate IDs for tasks' namespaces (I do generate them, since
IDs provided by kernel look ugly :( ).

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-01-18 13:18:33 +04:00
Cyrill Gorcunov
c1f7ab2150 checkpoint: Add dumping of FPU state
The dumping of FPU state is done with help of ptrace
facility. There are two cases which we need to handle
depending on which features are available on host machine

1) The dump via ptrace(PTRACE_GETFPREGS ...)

   In this case the kernel will use fxsave approach
   inside the kenrel and provides us back the data
   encoded in i387_fxsave_struct format.

2) The dump via ptrace(PTRACE_GETREGSET ...)

   In this case the kernel will use xsave approach
   inside the kernel and provides us back the data
   encoded in xsave_struct format.

In any case we decode data and save it in protobuf format.
This is why core.proto file has been extended to keep new
entries.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-12-21 17:35:39 +04:00
Cyrill Gorcunov
1256c390b6 dump: Drop FPU padding allocation
Actually it was never used, just drop it.
Because of backward compatibility problem we
can't just zap it in protofile.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-12-21 17:35:37 +04:00
Cyrill Gorcunov
4be701794e protobuf: Add @blk_sigset to thread_core_entry
It will hold the blocked signals for threads.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-11-12 17:42:47 +04:00
Pavel Emelyanov
aa731ee1d7 core: Support task scheduler policies and priorities
No magic here, just fetch info using getpriority and sched_getxxx calls.
Good news is that the mentioned syscalls take pid as argument and do work
with it, i.e. -- no need in parasite help here.

Restore is splitted into prep -- copy sched bits from image on restorer
args -- and the restore itself. It's done to avoid restoring tasks info
with IDLE priority ;) To make restorer not-fail sched bits are validated
for sanity on prep stage.

Minimal sanity test is also there.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-10-17 00:23:25 +04:00
Cyrill Gorcunov
097d73a101 dump: Add futex robust list dumping v3
This patch introduces ThreadCoreEntry protobuf structure which is to carry
thread-specific arch-independent information.

Now put there the c/r futex robust lists.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 20:28:59 +04:00
Cyrill Gorcunov
9d918c5964 protobuf: Convert core_entry to PB format v5
This requires some exlanations

 - Since we use protobuf data in restorer
   code we need to carry a copy of appropriate
   PB entities in resident memory. For this
   sake task_restore_core_args and thread_restore_args
   were significantly reworked. In short -- the caller
   code fills PB structures into task arguments space.

v3:
 - Combine everything arch related to thread_info field,
   and make it optional
 - Drop "version" field from message, we check version in
   another specific message
 - Don't forget to call core_entry__free_unpacked where needed
 - We continue dumping FPU state, still it's not yet restored

v4:
 - Don't carry task_core_entry and task_kobs_ids_entry for
   threads, and yield error if present in image.

v5:
 - Allocate core_entry depending on type of task being dumped

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-07-20 14:06:42 +04:00