[12/12] x86: cpu -- Require compatibility on instruction level by default

Submitted by Cyrill Gorcunov on Aug. 30, 2018, 11 a.m.

Details

Message ID 20180830110027.12706-13-gorcunov@gmail.com
State Accepted
Series "x86: cpu -- Rework feature testing"
Headers show

Commit Message

Cyrill Gorcunov Aug. 30, 2018, 11 a.m.
For a long time we've been demanding from cpus to be compatible
on fpu frame level, but growing list of cpu features triggers
inability for restored programs to proceed after restore due
to specific intructions execution (such as avx2). Note the
fpu frame may carry same size but not on instruction level
where SIGILL may happen after the restore.

Thus lets require instruction mode to be set and verified by default.
Still one can drop this option via command line or rpc request.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 Documentation/criu.txt    | 2 +-
 criu/include/cr_options.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index 4fc623b2097d..003d748ce410 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -322,7 +322,7 @@  exists as a built-in one: *criu* can either *merge* or *replace* such.
     - *all* for all above set.
 
 +
-By default the option is set to the combination of *fpu* and *cpu*.
+By default the option is set to *fpu* and *ins*.
 
 *--cgroup-root* ['controller':]/'newroot'::
     Change the root for the controller that will be dumped. By default, *criu*
diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h
index 187f58c67a91..d4d5071bf7cd 100644
--- a/criu/include/cr_options.h
+++ b/criu/include/cr_options.h
@@ -30,7 +30,7 @@ 
 #define CPU_CAP_INS		(1u << 2)	/* Instructions CPU capability */
 #define CPU_CAP_IMAGE		(1u << 3)	/* Write capability on dump and read on restore*/
 #define CPU_CAP_ALL		(CPU_CAP_FPU | CPU_CAP_CPU | CPU_CAP_INS)
-#define CPU_CAP_DEFAULT		(CPU_CAP_FPU | CPU_CAP_CPU)
+#define CPU_CAP_DEFAULT		(CPU_CAP_FPU | CPU_CAP_INS)
 
 struct cg_root_opt {
 	struct list_head node;

Comments

Dmitry Safonov Aug. 30, 2018, 1:16 p.m.
2018-08-30 12:00 GMT+01:00 Cyrill Gorcunov <gorcunov@gmail.com>:
> For a long time we've been demanding from cpus to be compatible
> on fpu frame level, but growing list of cpu features triggers
> inability for restored programs to proceed after restore due
> to specific intructions execution (such as avx2). Note the
> fpu frame may carry same size but not on instruction level
> where SIGILL may happen after the restore.
>
> Thus lets require instruction mode to be set and verified by default.
> Still one can drop this option via command line or rpc request.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>

Thanks,
             Dmitry