[CRIU] [PATCH 01/15] cpuinfo: x86 -- Add protobuf entry

Cyrill Gorcunov gorcunov at openvz.org
Fri Sep 19 07:03:03 PDT 2014


At the moment only x86 is covered, ARM needs own handler.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 protobuf/Makefile      |  1 +
 protobuf/cpuinfo.proto | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 protobuf/cpuinfo.proto

diff --git a/protobuf/Makefile b/protobuf/Makefile
index 7f6485b75607..509f3c33cf61 100644
--- a/protobuf/Makefile
+++ b/protobuf/Makefile
@@ -14,6 +14,7 @@ proto-obj-y	+= core.o
 proto-obj-y	+= core-x86.o
 proto-obj-y	+= core-arm.o
 proto-obj-y	+= core-aarch64.o
+proto-obj-y	+= cpuinfo.o
 proto-obj-y	+= inventory.o
 proto-obj-y	+= fdinfo.o
 proto-obj-y	+= fown.o
diff --git a/protobuf/cpuinfo.proto b/protobuf/cpuinfo.proto
new file mode 100644
index 000000000000..d4d2eb8a0d16
--- /dev/null
+++ b/protobuf/cpuinfo.proto
@@ -0,0 +1,32 @@
+message cpuinfo_x86_entry {
+	enum vendor {
+		UNKNOWN		= 0;
+		INTEL		= 1;
+		AMD		= 2;
+	}
+
+	required vendor			vendor_id	= 1;
+	required uint32			cpu_family	= 2;
+	required uint32			model		= 3;
+	required string			model_name	= 4;
+
+	repeated uint32			features	= 5;
+
+	optional uint32			stepping	= 6;
+
+	optional uint32			physical_id	= 8;
+	optional uint32			siblings	= 9;
+	optional uint32			core_id		= 10;
+	optional uint32			cpu_cores	= 11;
+}
+
+message cpuinfo_entry {
+	required uint32			id		= 1;
+
+	/*
+	 * Usually on SMP system there should be same CPUs
+	 * installed, but it might happen that system carries
+	 * various CPUs so @repeated used.
+	 */
+	repeated cpuinfo_x86_entry	x86_entry	= 2;
+}
-- 
1.9.3



More information about the CRIU mailing list