2011-09-02 21:34:48 +04:00
|
|
|
/*
|
|
|
|
* Human Monitor Interface
|
|
|
|
*
|
|
|
|
* Copyright IBM, Corp. 2011
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Anthony Liguori <aliguori@us.ibm.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2. See
|
|
|
|
* the COPYING file in the top-level directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HMP_H
|
|
|
|
#define HMP_H
|
|
|
|
|
|
|
|
#include "qemu-common.h"
|
2014-04-13 19:25:06 +04:00
|
|
|
#include "qemu/readline.h"
|
2011-09-02 21:34:48 +04:00
|
|
|
#include "qapi-types.h"
|
2012-12-17 21:19:43 +04:00
|
|
|
#include "qapi/qmp/qdict.h"
|
2011-09-02 21:34:48 +04:00
|
|
|
|
2013-01-14 10:06:25 +04:00
|
|
|
void hmp_info_name(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_version(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_kvm(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_status(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_uuid(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_chardev(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_mice(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_migrate(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_cpus(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_block(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_blockstats(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_vnc(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_spice(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_balloon(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_pci(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_block_jobs(Monitor *mon, const QDict *qdict);
|
Support for TPM command line options
This patch adds support for TPM command line options.
The command line options supported here are
./qemu-... -tpmdev passthrough,path=<path to TPM device>,id=<id>
-device tpm-tis,tpmdev=<id>,id=<other id>
and
./qemu-... -tpmdev help
where the latter works similar to -soundhw help and shows a list of
available TPM backends (for example 'passthrough').
Using the type parameter, the backend is chosen, i.e., 'passthrough' for the
passthrough driver. The interpretation of the other parameters along
with determining whether enough parameters were provided is pushed into
the backend driver, which needs to implement the interface function
'create' and return a TPMDriverOpts structure if the VM can be started or
'NULL' if not enough or bad parameters were provided.
Monitor support for 'info tpm' has been added. It for example prints the
following:
(qemu) info tpm
TPM devices:
tpm0: model=tpm-tis
\ tpm0: type=passthrough,path=/dev/tpm0,cancel-path=/sys/devices/pnp0/00:09/cancel
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Message-id: 1361987275-26289-2-git-send-email-stefanb@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-27 21:47:49 +04:00
|
|
|
void hmp_info_tpm(Monitor *mon, const QDict *qdict);
|
2011-09-15 21:20:28 +04:00
|
|
|
void hmp_quit(Monitor *mon, const QDict *qdict);
|
2011-09-15 21:34:39 +04:00
|
|
|
void hmp_stop(Monitor *mon, const QDict *qdict);
|
2011-09-15 21:41:46 +04:00
|
|
|
void hmp_system_reset(Monitor *mon, const QDict *qdict);
|
2011-09-28 18:06:15 +04:00
|
|
|
void hmp_system_powerdown(Monitor *mon, const QDict *qdict);
|
2011-10-06 21:31:39 +04:00
|
|
|
void hmp_cpu(Monitor *mon, const QDict *qdict);
|
2011-11-22 22:32:37 +04:00
|
|
|
void hmp_memsave(Monitor *mon, const QDict *qdict);
|
2011-11-22 23:26:46 +04:00
|
|
|
void hmp_pmemsave(Monitor *mon, const QDict *qdict);
|
qemu-char: Saner naming of memchar stuff & doc fixes
New device, has never been released, so we can still improve things
without worrying about compatibility.
Naming is a mess. The code calls the device driver CirMemCharDriver,
the public API calls it "memory", "memchardev", or "memchar", and the
special commands are named like "memchar-FOO". "memory" is a
particularly unfortunate choice, because there's another character
device driver called MemoryDriver. Moreover, the device's distinctive
property is that it's a ring buffer, not that's in memory. Therefore:
* Rename CirMemCharDriver to RingBufCharDriver, and call the thing a
"ringbuf" in the API.
* Rename QMP and HMP commands from memchar-FOO to ringbuf-FOO.
* Rename device parameter from maxcapacity to size (simple words are
good for you).
* Clearly mark the parameter as optional in documentation.
* Fix error reporting so that chardev-add reports to current monitor,
not stderr.
* Replace cirmem in C identifiers by ringbuf.
* Rework documentation. Document the impact of our crappy UTF-8
handling on reading.
* QMP examples that even work.
I could split this up into multiple commits, but they'd change the
same documentation lines multiple times. Not worth it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-07 00:27:24 +04:00
|
|
|
void hmp_ringbuf_write(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_ringbuf_read(Monitor *mon, const QDict *qdict);
|
2011-11-22 23:58:31 +04:00
|
|
|
void hmp_cont(Monitor *mon, const QDict *qdict);
|
2012-02-23 16:45:21 +04:00
|
|
|
void hmp_system_wakeup(Monitor *mon, const QDict *qdict);
|
2011-11-23 18:55:53 +04:00
|
|
|
void hmp_inject_nmi(Monitor *mon, const QDict *qdict);
|
2011-11-23 19:11:55 +04:00
|
|
|
void hmp_set_link(Monitor *mon, const QDict *qdict);
|
2011-11-23 19:28:21 +04:00
|
|
|
void hmp_block_passwd(Monitor *mon, const QDict *qdict);
|
2011-11-25 20:38:09 +04:00
|
|
|
void hmp_balloon(Monitor *mon, const QDict *qdict);
|
2011-11-25 20:57:10 +04:00
|
|
|
void hmp_block_resize(Monitor *mon, const QDict *qdict);
|
2011-11-25 22:15:19 +04:00
|
|
|
void hmp_snapshot_blkdev(Monitor *mon, const QDict *qdict);
|
2013-09-11 10:04:37 +04:00
|
|
|
void hmp_snapshot_blkdev_internal(Monitor *mon, const QDict *qdict);
|
2013-09-11 10:04:38 +04:00
|
|
|
void hmp_snapshot_delete_blkdev_internal(Monitor *mon, const QDict *qdict);
|
2012-10-18 18:49:24 +04:00
|
|
|
void hmp_drive_mirror(Monitor *mon, const QDict *qdict);
|
2013-06-26 16:11:58 +04:00
|
|
|
void hmp_drive_backup(Monitor *mon, const QDict *qdict);
|
2011-11-28 04:54:09 +04:00
|
|
|
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
|
2011-11-28 05:18:01 +04:00
|
|
|
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
|
2011-11-28 17:59:37 +04:00
|
|
|
void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
|
2012-08-06 22:42:48 +04:00
|
|
|
void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);
|
2012-08-06 22:42:54 +04:00
|
|
|
void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict);
|
2011-12-07 17:17:51 +04:00
|
|
|
void hmp_set_password(Monitor *mon, const QDict *qdict);
|
2011-12-07 17:47:57 +04:00
|
|
|
void hmp_expire_password(Monitor *mon, const QDict *qdict);
|
2011-12-07 22:02:36 +04:00
|
|
|
void hmp_eject(Monitor *mon, const QDict *qdict);
|
2011-12-08 17:13:50 +04:00
|
|
|
void hmp_change(Monitor *mon, const QDict *qdict);
|
2011-12-14 22:49:14 +04:00
|
|
|
void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict);
|
2012-01-18 18:40:46 +04:00
|
|
|
void hmp_block_stream(Monitor *mon, const QDict *qdict);
|
2012-01-18 18:40:47 +04:00
|
|
|
void hmp_block_job_set_speed(Monitor *mon, const QDict *qdict);
|
2012-01-18 18:40:48 +04:00
|
|
|
void hmp_block_job_cancel(Monitor *mon, const QDict *qdict);
|
2012-09-28 19:22:51 +04:00
|
|
|
void hmp_block_job_pause(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_block_job_resume(Monitor *mon, const QDict *qdict);
|
2012-10-18 18:49:21 +04:00
|
|
|
void hmp_block_job_complete(Monitor *mon, const QDict *qdict);
|
2011-12-05 20:48:01 +04:00
|
|
|
void hmp_migrate(Monitor *mon, const QDict *qdict);
|
2012-03-29 19:38:50 +04:00
|
|
|
void hmp_device_del(Monitor *mon, const QDict *qdict);
|
2012-05-07 08:10:47 +04:00
|
|
|
void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict);
|
2012-04-19 00:34:15 +04:00
|
|
|
void hmp_netdev_add(Monitor *mon, const QDict *qdict);
|
2012-04-16 21:36:32 +04:00
|
|
|
void hmp_netdev_del(Monitor *mon, const QDict *qdict);
|
2012-06-22 22:36:09 +04:00
|
|
|
void hmp_getfd(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_closefd(Monitor *mon, const QDict *qdict);
|
2012-08-31 06:56:26 +04:00
|
|
|
void hmp_send_key(Monitor *mon, const QDict *qdict);
|
2012-05-24 20:48:23 +04:00
|
|
|
void hmp_screen_dump(Monitor *mon, const QDict *qdict);
|
2012-08-23 13:53:04 +04:00
|
|
|
void hmp_nbd_server_start(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_nbd_server_add(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict);
|
2012-12-19 13:33:40 +04:00
|
|
|
void hmp_chardev_add(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_chardev_remove(Monitor *mon, const QDict *qdict);
|
2013-06-05 16:19:41 +04:00
|
|
|
void hmp_qemu_io(Monitor *mon, const QDict *qdict);
|
2013-12-11 22:24:14 +04:00
|
|
|
void hmp_cpu_add(Monitor *mon, const QDict *qdict);
|
2013-12-21 02:21:10 +04:00
|
|
|
void hmp_object_add(Monitor *mon, const QDict *qdict);
|
2013-12-21 02:21:09 +04:00
|
|
|
void hmp_object_del(Monitor *mon, const QDict *qdict);
|
2014-04-13 19:25:06 +04:00
|
|
|
void object_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
|
|
|
void object_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-04-13 19:25:07 +04:00
|
|
|
void device_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
|
|
|
void device_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-05-08 02:41:27 +04:00
|
|
|
void sendkey_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-05-08 02:41:28 +04:00
|
|
|
void chardev_remove_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-05-08 02:41:29 +04:00
|
|
|
void chardev_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-05-08 02:41:30 +04:00
|
|
|
void set_link_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-05-08 02:41:31 +04:00
|
|
|
void netdev_add_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-05-08 02:41:32 +04:00
|
|
|
void netdev_del_completion(ReadLineState *rs, int nb_args, const char *str);
|
2011-09-02 21:34:48 +04:00
|
|
|
|
|
|
|
#endif
|