From 4d700430a20b3d53b7b15bc5f6666f7e570e3f2c Mon Sep 17 00:00:00 2001 From: Michal Novotny Date: Mon, 25 Mar 2013 17:31:33 +0100 Subject: New QMP command query-cpu-max and HMP command cpu_max These commands return the maximum number of CPUs supported by the currently running emulator instance, as defined in its QEMUMachine struct. Signed-off-by: Michal Novotny Signed-off-by: Luiz Capitulino --- hmp.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index d319897767..c12c495dc4 100644 --- a/hmp.c +++ b/hmp.c @@ -748,6 +748,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) { -- cgit v1.2.1