- 21 Dec, 2012 11 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The test for fpu transition will require to do a runtime check for the cpu features it's running on. For this sake we need to use cpuid. Thus make it more widely available by providing in the general header. The code is adopted from the linux kernel code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Since at moment we stick with sigreturn restore we need to form a proper FPU frame and set a pointer to it inside sigreturn frame. For this sake we read the FPU image and here are two cases are possible - no fpu data at all -- nothing to restore, simpliest case - xsave frame is present but the host cpu supports only fxsave instruction: we refuse to continue, since it means there are no ymm registers on the machine where we're trying to restore - fxsave frame is present but the host cpu has xsave feature: at moment we refuse to continue, requiring complete match between "checkpoint and restore hosts", but in real we could extend logic and form complete xsave frame from fxsave and continue processing Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
For code simplicity we reserve the maximum size which might be needed to form an FPU frame (ie for both xsave and fxsave operations). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It will be carrying xsave or fxsave frame. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
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>
-
Cyrill Gorcunov authored
And don't forget to undef them once they are not needed. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
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>
-
Cyrill Gorcunov authored
The cpu we're running on must at least support fxsave feature. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This patch add ability to test /proc/cpuinfo data we're interested in at the moment. The code provides the following functionality - cpu_init, to parse cpuinfo and check if the host cpu we're running on is suitable enough for FPU checkpoint/restore. If FPU present then there must be at least fxsave capability present - cpu_set_feature/cpu_has_feature helpers which provides to test certain bits and set them where needed (we need to set bits when parse cpuinfo) Note, we reserve space for all cpuinfo bits known by the kernel at moment, while use only three FPU related bits for a while. This is done because we might need to use or find out other features in future. After all it's just 40 bytes of memory needed to keep all possible bits. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need these structures for restore FPU state via sigframe, as as we decode data provided by ptrace. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 20 Dec, 2012 2 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A name of a unix socket should be uniq Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 18 Dec, 2012 3 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Since we send _fd_ it's pointless to call chmod on image file. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Wrong size was used in mapping and unmapping. But since they are more-less close to each other, nobody noticed it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Dec, 2012 9 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Syntax is crtools exec -t <pid> <syscall_name> [<arguments>] Two types of arguments are supported -- plain, treated as number, passed as is to the syscall. Buffer, started with '&' -- the rest of the string is pushed to the tgt task's memory and pointer to one is passed as syscall argument. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Reserve the cmdline option for this and link empty file. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The fist part prepares ctl to controll the seized task. The 2nd one mmaps shareb buffer for data exchange. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This one calls a syscon on seized task. Existing mmap/munmap just use one. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Will be used by other code. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
I'll include it into a place, that knows nothing about pb types. Use generic pointer instead. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We'll have to generate syscall table in another form, prepare for it . Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Dec, 2012 2 commits
-
-
Pavel Emelyanov authored
This is mostly bugfix and improvements release. Nonetheless, some new features exists, the most interesting are: * proper COW mappings handling * full packet sockets support, thus supporting the tcpdump tool * the --shell-job option, which makes it possible to dump apps launched from one shell and restore them in another Some features are available with the custome kernel, but the good news is that now _all_ of the patches we need are in one of the -next trees or in the -mm one, and thus have good chances to get merged in 3.8 (or soon after it). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We need to test every even index (which represents a slave peer) thus use modulo operation here. Reported-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 10 Dec, 2012 8 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
No spaces between chars and no 0x-s. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Stanislav Kinsbursky authored
IPC shared memory data is aligned by 32 bits. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The dedicated prepare_and_sigreturn makes code harder to read. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We have 3 calls for that, two called directly from cr-restore, one -- from one the former. Clean this mess and write short comments on each stage. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 06 Dec, 2012 5 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Use direct name assignment, it's enough. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This thing on pstre_item was created to carry task-specific information across the "restore" code-flow. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The error handling was not obvious. Clean it up. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-