mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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 <minovotn@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
e5ecec7bad
commit
4d700430a2
7 changed files with 56 additions and 0 deletions
8
hmp.c
8
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue