[CRIU] [PATCH] protobuf: Move x86 core resources to core-x86.proto

Cyrill Gorcunov gorcunov at openvz.org
Mon Jan 21 11:50:03 EST 2013


To unweave arch dependent part from general core.proto file.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 protobuf/Makefile       |  1 +
 protobuf/core-x86.proto | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
 protobuf/core.proto     | 62 +------------------------------------------------
 3 files changed, 63 insertions(+), 61 deletions(-)
 create mode 100644 protobuf/core-x86.proto

diff --git a/protobuf/Makefile b/protobuf/Makefile
index aed518c..f0cc8b4 100644
--- a/protobuf/Makefile
+++ b/protobuf/Makefile
@@ -1,5 +1,6 @@
 PROTO_LIBRARY	:= protobuf-lib.o
 
+PROTO_FILES	+= core-x86.proto
 PROTO_FILES	+= core.proto
 PROTO_FILES	+= inventory.proto
 PROTO_FILES	+= fdinfo.proto
diff --git a/protobuf/core-x86.proto b/protobuf/core-x86.proto
new file mode 100644
index 0000000..ca73734
--- /dev/null
+++ b/protobuf/core-x86.proto
@@ -0,0 +1,61 @@
+message user_x86_regs_entry {
+	required uint64			r15		=  1;
+	required uint64			r14		=  2;
+	required uint64			r13		=  3;
+	required uint64			r12		=  4;
+	required uint64			bp		=  5;
+	required uint64			bx		=  6;
+	required uint64			r11		=  7;
+	required uint64			r10		=  8;
+	required uint64			r9		=  9;
+	required uint64			r8		= 10;
+	required uint64			ax		= 11;
+	required uint64			cx		= 12;
+	required uint64			dx		= 13;
+	required uint64			si		= 14;
+	required uint64			di		= 15;
+	required uint64			orig_ax	 	= 16;
+	required uint64			ip	 	= 17;
+	required uint64			cs		= 18;
+	required uint64			flags		= 19;
+	required uint64			sp		= 20;
+	required uint64			ss		= 21;
+	required uint64			fs_base		= 22;
+	required uint64			gs_base		= 23;
+	required uint64			ds		= 24;
+	required uint64			es		= 25;
+	required uint64			fs		= 26;
+	required uint64			gs		= 27;
+}
+
+message user_x86_xsave_entry {
+	required uint64			xstate_bv	=  1;
+	repeated uint32			ymmh_space	=  2;
+}
+
+message user_x86_fpregs_entry {
+
+	/* fxsave data */
+	required uint32			cwd		=  1;
+	required uint32			swd		=  2;
+	required uint32			twd		=  3;
+	required uint32			fop		=  4;
+	required uint64			rip		=  5;
+	required uint64			rdp		=  6;
+	required uint32			mxcsr		=  7;
+	required uint32			mxcsr_mask	=  8;
+	repeated uint32			st_space	=  9;
+	repeated uint32			xmm_space	= 10;
+
+	/* Unused, but present for backward compatibility */
+	repeated uint32			padding		= 11;
+
+	/* xsave extension */
+	optional user_x86_xsave_entry	xsave		= 13;
+}
+
+message thread_info_x86 {
+	required uint64			clear_tid_addr	= 1;
+	required user_x86_regs_entry	gpregs		= 2;
+	required user_x86_fpregs_entry	fpregs		= 3;
+}
diff --git a/protobuf/core.proto b/protobuf/core.proto
index ec82f82..5c343e8 100644
--- a/protobuf/core.proto
+++ b/protobuf/core.proto
@@ -1,58 +1,4 @@
-message user_x86_regs_entry {
-	required uint64			r15		=  1;
-	required uint64			r14		=  2;
-	required uint64			r13		=  3;
-	required uint64			r12		=  4;
-	required uint64			bp		=  5;
-	required uint64			bx		=  6;
-	required uint64			r11		=  7;
-	required uint64			r10		=  8;
-	required uint64			r9		=  9;
-	required uint64			r8		= 10;
-	required uint64			ax		= 11;
-	required uint64			cx		= 12;
-	required uint64			dx		= 13;
-	required uint64			si		= 14;
-	required uint64			di		= 15;
-	required uint64			orig_ax	 	= 16;
-	required uint64			ip	 	= 17;
-	required uint64			cs		= 18;
-	required uint64			flags		= 19;
-	required uint64			sp		= 20;
-	required uint64			ss		= 21;
-	required uint64			fs_base		= 22;
-	required uint64			gs_base		= 23;
-	required uint64			ds		= 24;
-	required uint64			es		= 25;
-	required uint64			fs		= 26;
-	required uint64			gs		= 27;
-}
-
-message user_x86_xsave_entry {
-	required uint64			xstate_bv	=  1;
-	repeated uint32			ymmh_space	=  2;
-}
-
-message user_x86_fpregs_entry {
-
-	/* fxsave data */
-	required uint32			cwd		=  1;
-	required uint32			swd		=  2;
-	required uint32			twd		=  3;
-	required uint32			fop		=  4;
-	required uint64			rip		=  5;
-	required uint64			rdp		=  6;
-	required uint32			mxcsr		=  7;
-	required uint32			mxcsr_mask	=  8;
-	repeated uint32			st_space	=  9;
-	repeated uint32			xmm_space	= 10;
-
-	/* Unused, but present for backward compatibility */
-	repeated uint32			padding		= 11;
-
-	/* xsave extension */
-	optional user_x86_xsave_entry	xsave		= 13;
-}
+import "core-x86.proto";
 
 message task_core_entry {
 	required uint32			task_state	= 1;
@@ -78,12 +24,6 @@ message task_kobj_ids_entry {
 	optional uint32			mnt_ns_id	= 9;
 }
 
-message thread_info_x86 {
-	required uint64			clear_tid_addr	= 1;
-	required user_x86_regs_entry	gpregs		= 2;
-	required user_x86_fpregs_entry	fpregs		= 3;
-}
-
 message thread_core_entry {
 	required uint64			futex_rla	= 1;
 	required uint32			futex_rla_len	= 2;
-- 
1.8.1



More information about the CRIU mailing list