Commit e07b4a0e authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

cpuinfo: x86 -- Add protobuf entry

At the moment only x86 is covered, ARM needs own handler.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent de770e02
......@@ -322,6 +322,7 @@ static struct show_image_info show_infos[] = {
SHOW_PLAIN(TUNFILE),
SHOW_PLAINS(EXT_FILE),
SHOW_PLAIN(IRMAP_CACHE),
SHOW_PLAIN(CPUINFO),
{ FILE_LOCKS_MAGIC, PB_FILE_LOCK, false, NULL, "3:%u", },
{ TCP_STREAM_MAGIC, PB_TCP_STREAM, true, show_tcp_stream, "1:%u 2:%u 3:%u 4:%u 12:%u", },
......
......@@ -87,6 +87,7 @@ struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX] = {
FD_ENTRY(TUNFILE, "tunfile"),
FD_ENTRY(CGROUP, "cgroup"),
FD_ENTRY(TIMERFD, "timerfd"),
FD_ENTRY(CPUINFO, "cpuinfo"),
[CR_FD_STATS] = {
.fmt = "stats-%s",
......
......@@ -87,6 +87,7 @@ enum {
CR_FD_FILE_LOCKS_PID,
CR_FD_IRMAP_CACHE,
CR_FD_CPUINFO,
CR_FD_SIGNAL,
CR_FD_PSIGNAL,
......
......@@ -74,6 +74,7 @@
#define TUNFILE_MAGIC 0x57143751 /* Kalyazin */
#define CGROUP_MAGIC 0x59383330 /* Tikhvin */
#define TIMERFD_MAGIC 0x50493712 /* Korocha */
#define CPUINFO_MAGIC 0x61404013 /* Nyandoma */
#define IFADDR_MAGIC RAW_IMAGE_MAGIC
#define ROUTE_MAGIC RAW_IMAGE_MAGIC
......
......@@ -52,14 +52,15 @@ enum {
PB_IRMAP_CACHE,
PB_CGROUP,
PB_TIMERFD,
PB_CPUINFO,
/* PB_AUTOGEN_STOP */
PB_PAGEMAP_HEAD,
PB_IDS,
PB_SIGACT,
PB_NETDEV,
PB_REMAP_FPATH, /* 50 */
PB_NETDEV, /* 50 */
PB_REMAP_FPATH,
PB_SK_QUEUES,
PB_IPCNS_MSG,
PB_IPCNS_MSG_ENT,
......
......@@ -59,6 +59,7 @@
#include "protobuf/tun.pb-c.h"
#include "protobuf/cgroup.pb-c.h"
#include "protobuf/timerfd.pb-c.h"
#include "protobuf/cpuinfo.pb-c.h"
struct cr_pb_message_desc cr_pb_descs[PB_MAX];
......
......@@ -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
......
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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment