summaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/hmp.c b/hmp.c
index e3e833edf4..dbe9b9043e 100644
--- a/hmp.c
+++ b/hmp.c
@@ -633,11 +633,11 @@ void hmp_info_tpm(Monitor *mon, const QDict *qdict)
c, TpmModel_lookup[ti->model]);
monitor_printf(mon, " \\ %s: type=%s",
- ti->id, TpmType_lookup[ti->type]);
+ ti->id, TpmTypeOptionsKind_lookup[ti->options->kind]);
- switch (ti->tpm_options->kind) {
- case TPM_TYPE_OPTIONS_KIND_TPM_PASSTHROUGH_OPTIONS:
- tpo = ti->tpm_options->tpm_passthrough_options;
+ switch (ti->options->kind) {
+ case TPM_TYPE_OPTIONS_KIND_PASSTHROUGH:
+ tpo = ti->options->passthrough;
monitor_printf(mon, "%s%s%s%s",
tpo->has_path ? ",path=" : "",
tpo->has_path ? tpo->path : "",
@@ -750,6 +750,14 @@ void hmp_ringbuf_read(Monitor *mon, const QDict *qdict)
g_free(data);
}
+void hmp_query_cpu_max(Monitor *mon, const QDict *qdict)
+{
+ int cpu_max;
+
+ cpu_max = qmp_query_cpu_max(NULL);
+ monitor_printf(mon, "Maximum number of CPUs is %d\n", cpu_max);
+}
+
static void hmp_cont_cb(void *opaque, int err)
{
if (!err) {