[CRIU] [PATCH 5/9] cpuinfo: x86 -- Add protobuf entry

Cyrill Gorcunov gorcunov at openvz.org
Thu Sep 25 06:03:24 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 | 25 +++++++++++++++++++++++++
 2 files changed, 26 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..a62ff19b5c83
--- /dev/null
+++ b/protobuf/cpuinfo.proto
@@ -0,0 +1,25 @@
+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 uint32			stepping	= 4;
+	required uint32			capability_ver	= 5;
+	repeated uint32			capability	= 6;
+
+	optional string			model_id	= 7;
+}
+
+message cpuinfo_entry {
+	/*
+	 * 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	= 1;
+}
-- 
1.9.3



More information about the CRIU mailing list