aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen/src/xen_host_cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libxen/src/xen_host_cpu.c')
-rw-r--r--tools/libxen/src/xen_host_cpu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/libxen/src/xen_host_cpu.c b/tools/libxen/src/xen_host_cpu.c
index c03241dc84..9509c570e4 100644
--- a/tools/libxen/src/xen_host_cpu.c
+++ b/tools/libxen/src/xen_host_cpu.c
@@ -61,6 +61,9 @@ static const struct_member xen_host_cpu_record_struct_members[] =
{ .key = "flags",
.type = &abstract_type_string,
.offset = offsetof(xen_host_cpu_record, flags) },
+ { .key = "features",
+ .type = &abstract_type_string,
+ .offset = offsetof(xen_host_cpu_record, features) },
{ .key = "utilisation",
.type = &abstract_type_float,
.offset = offsetof(xen_host_cpu_record, utilisation) }
@@ -90,6 +93,7 @@ xen_host_cpu_record_free(xen_host_cpu_record *record)
free(record->modelname);
free(record->stepping);
free(record->flags);
+ free(record->features);
free(record);
}
@@ -252,6 +256,23 @@ xen_host_cpu_get_flags(xen_session *session, char **result, xen_host_cpu host_cp
bool
+xen_host_cpu_get_features(xen_session *session, char **result, xen_host_cpu host_cpu)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = host_cpu }
+ };
+
+ abstract_type result_type = abstract_type_string;
+
+ *result = NULL;
+ XEN_CALL_("host_cpu.get_features");
+ return session->ok;
+}
+
+
+bool
xen_host_cpu_get_utilisation(xen_session *session, double *result, xen_host_cpu host_cpu)
{
abstract_value param_values[] =