Skip to content

Commit

Permalink
Revert "New QMP command query-cpu-max and HMP command cpu_max"
Browse files Browse the repository at this point in the history
This reverts commit 4d70043 as asked by
Luiz. The patch has been obsoleted by extending MachineInfo structure
by cpu-max field.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  • Loading branch information
Michal Novotny authored and Luiz Capitulino committed Apr 12, 2013
1 parent c72e768 commit 315f9e1
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 56 deletions.
2 changes: 0 additions & 2 deletions hmp-commands.hx
Expand Up @@ -1643,8 +1643,6 @@ show qdev device model list
show roms
@item info tpm
show the TPM device
@item info cpu_max
show the number of CPUs supported by the machine being emulated.
@end table
ETEXI

Expand Down
8 changes: 0 additions & 8 deletions hmp.c
Expand Up @@ -750,14 +750,6 @@ 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) {
Expand Down
1 change: 0 additions & 1 deletion hmp.h
Expand Up @@ -42,7 +42,6 @@ void hmp_stop(Monitor *mon, const QDict *qdict);
void hmp_system_reset(Monitor *mon, const QDict *qdict);
void hmp_system_powerdown(Monitor *mon, const QDict *qdict);
void hmp_cpu(Monitor *mon, const QDict *qdict);
void hmp_query_cpu_max(Monitor *mon, const QDict *qdict);
void hmp_memsave(Monitor *mon, const QDict *qdict);
void hmp_pmemsave(Monitor *mon, const QDict *qdict);
void hmp_ringbuf_write(Monitor *mon, const QDict *qdict);
Expand Down
7 changes: 0 additions & 7 deletions monitor.c
Expand Up @@ -2764,13 +2764,6 @@ static mon_cmd_t info_cmds[] = {
.help = "show the TPM device",
.mhandler.cmd = hmp_info_tpm,
},
{
.name = "cpu_max",
.args_type = "",
.params = "",
.help = "Get maximum number of VCPUs supported by machine",
.mhandler.cmd = hmp_query_cpu_max,
},
{
.name = NULL,
},
Expand Down
11 changes: 0 additions & 11 deletions qapi-schema.json
Expand Up @@ -1833,17 +1833,6 @@
##
{ 'command': 'query-migrate-cache-size', 'returns': 'int' }

##
## @query-cpu-max
##
## query maximum number of CPUs supported by machine
##
## Returns: number of CPUs
##
## Since: 1.5
###
{ 'command': 'query-cpu-max', 'returns': 'int' }

##
# @ObjectPropertyInfo:
#
Expand Down
22 changes: 0 additions & 22 deletions qmp-commands.hx
Expand Up @@ -382,28 +382,6 @@ Example:

Note: CPUs' indexes are obtained with the 'query-cpus' command.

EQMP

{
.name = "query-cpu-max",
.args_type = "",
.mhandler.cmd_new = qmp_marshal_input_query_cpu_max,
},

SQMP
query-cpu-max
-------------

Get the maximum CPUs supported by the machine being currently
emulated.

Returns json-int.

Example:

-> { "execute": "query-cpu-max" }
<- { "return": 255 }

EQMP

{
Expand Down
5 changes: 0 additions & 5 deletions vl.c
Expand Up @@ -662,11 +662,6 @@ StatusInfo *qmp_query_status(Error **errp)
return info;
}

int64_t qmp_query_cpu_max(Error **errp)
{
return current_machine->max_cpus;
}

/***********************************************************/
/* real time host monotonic timer */

Expand Down

0 comments on commit 315f9e1

Please sign in to comment.