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
|
|
|
|
|
2014-04-13 19:25:06 +04:00
|
|
|
#include "qemu/readline.h"
|
2022-10-13 15:36:50 +03:00
|
|
|
#include "qemu/coroutine.h"
|
2021-10-08 17:09:00 +03:00
|
|
|
#include "qapi/qapi-types-common.h"
|
2011-09-02 21:34:48 +04:00
|
|
|
|
2021-10-28 18:18:25 +03:00
|
|
|
bool hmp_handle_error(Monitor *mon, Error *err);
|
2019-06-19 23:10:39 +03: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);
|
2015-03-23 11:32:29 +03:00
|
|
|
void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
|
2013-01-14 10:06:25 +04:00
|
|
|
void hmp_info_cpus(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);
|
2016-09-26 23:23:27 +03:00
|
|
|
void hmp_info_irq(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_pic(Monitor *mon, const QDict *qdict);
|
2019-03-11 13:29:09 +03:00
|
|
|
void hmp_info_rdma(Monitor *mon, const QDict *qdict);
|
2013-01-14 10:06:25 +04:00
|
|
|
void hmp_info_pci(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);
|
2015-06-26 11:07:13 +03:00
|
|
|
void hmp_info_iothreads(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);
|
2018-08-15 23:00:03 +03:00
|
|
|
void hmp_sync_profile(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);
|
2018-06-20 18:39:46 +03:00
|
|
|
void hmp_exit_preconfig(Monitor *mon, const QDict *qdict);
|
2019-02-27 16:24:12 +03:00
|
|
|
void hmp_announce_self(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);
|
hmp: Name HMP command handler functions hmp_COMMAND()
Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
and sometimes COMMAND pointlessly differs in spelling.
Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
with '-' replaced by '_'.
Exceptions:
* do_device_add() and client_migrate_info() *not* renamed to
hmp_device_add(), hmp_client_migrate_info(), because they're also
QMP handlers. They still need to be converted to QAPI.
* do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
hmp_i(), hmp_o(), because those names are too cryptic for my taste.
* do_info_help() renamed to hmp_info_help() instead of hmp_info(),
because it only covers help.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2015-02-06 15:55:43 +03:00
|
|
|
void hmp_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-25 20:38:09 +04:00
|
|
|
void hmp_balloon(Monitor *mon, const QDict *qdict);
|
2017-04-18 12:40:56 +03:00
|
|
|
void hmp_loadvm(Monitor *mon, const QDict *qdict);
|
2017-04-18 12:44:16 +03:00
|
|
|
void hmp_savevm(Monitor *mon, const QDict *qdict);
|
2017-04-18 12:46:23 +03:00
|
|
|
void hmp_delvm(Monitor *mon, const QDict *qdict);
|
2011-11-28 04:54:09 +04:00
|
|
|
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
|
2017-10-20 12:05:54 +03:00
|
|
|
void hmp_migrate_continue(Monitor *mon, const QDict *qdict);
|
2015-02-19 14:40:28 +03:00
|
|
|
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
|
2018-05-02 13:47:37 +03:00
|
|
|
void hmp_migrate_recover(Monitor *mon, const QDict *qdict);
|
2018-05-02 13:47:40 +03:00
|
|
|
void hmp_migrate_pause(Monitor *mon, const QDict *qdict);
|
2012-08-06 22:42:48 +04:00
|
|
|
void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);
|
2015-03-23 11:32:29 +03:00
|
|
|
void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict);
|
2015-03-05 19:29:02 +03:00
|
|
|
void hmp_client_migrate_info(Monitor *mon, const QDict *qdict);
|
2015-11-05 21:10:56 +03:00
|
|
|
void hmp_migrate_start_postcopy(Monitor *mon, const QDict *qdict);
|
COLO: Add 'x-colo-lost-heartbeat' command to trigger failover
We leave users to choose whatever heartbeat solution they want,
if the heartbeat is lost, or other errors they detect, they can use
experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover,
COLO will do operations accordingly.
For example, if the command is sent to the Primary side,
the Primary side will exit COLO mode, does cleanup work,
and then, PVM will take over the service work. If sent to the Secondary side,
the Secondary side will run failover work, then takes over PVM's service work.
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Amit Shah <amit@amitshah.net>
2016-10-27 09:43:03 +03:00
|
|
|
void hmp_x_colo_lost_heartbeat(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-08 17:13:50 +04:00
|
|
|
void hmp_change(Monitor *mon, const QDict *qdict);
|
2011-12-05 20:48:01 +04:00
|
|
|
void hmp_migrate(Monitor *mon, const QDict *qdict);
|
2015-03-05 19:24:48 +03:00
|
|
|
void hmp_device_add(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);
|
hmp: Name HMP command handler functions hmp_COMMAND()
Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
and sometimes COMMAND pointlessly differs in spelling.
Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
with '-' replaced by '_'.
Exceptions:
* do_device_add() and client_migrate_info() *not* renamed to
hmp_device_add(), hmp_client_migrate_info(), because they're also
QMP handlers. They still need to be converted to QAPI.
* do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
hmp_i(), hmp_o(), because those names are too cryptic for my taste.
* do_info_help() renamed to hmp_info_help() instead of hmp_info(),
because it only covers help.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2015-02-06 15:55:43 +03:00
|
|
|
void hmp_sendkey(Monitor *mon, const QDict *qdict);
|
2022-10-13 15:36:50 +03:00
|
|
|
void coroutine_fn hmp_screendump(Monitor *mon, const QDict *qdict);
|
2012-12-19 13:33:40 +04:00
|
|
|
void hmp_chardev_add(Monitor *mon, const QDict *qdict);
|
2017-07-06 15:08:57 +03:00
|
|
|
void hmp_chardev_change(Monitor *mon, const QDict *qdict);
|
2012-12-19 13:33:40 +04:00
|
|
|
void hmp_chardev_remove(Monitor *mon, const QDict *qdict);
|
2017-06-11 10:48:17 +03:00
|
|
|
void hmp_chardev_send_break(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-05-14 13:43:35 +04:00
|
|
|
void hmp_info_memdev(Monitor *mon, const QDict *qdict);
|
2019-06-19 23:10:44 +03:00
|
|
|
void hmp_info_numa(Monitor *mon, const QDict *qdict);
|
2014-09-23 09:35:19 +04:00
|
|
|
void hmp_info_memory_devices(Monitor *mon, const QDict *qdict);
|
2014-05-07 20:08:29 +04:00
|
|
|
void hmp_qom_list(Monitor *mon, const QDict *qdict);
|
2020-05-20 18:11:07 +03:00
|
|
|
void hmp_qom_get(Monitor *mon, const QDict *qdict);
|
2014-05-07 21:48:15 +04:00
|
|
|
void hmp_qom_set(Monitor *mon, const QDict *qdict);
|
2019-06-19 23:10:39 +03:00
|
|
|
void hmp_info_qom_tree(Monitor *mon, const QDict *dict);
|
2022-08-11 15:24:44 +03:00
|
|
|
void hmp_virtio_query(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_virtio_status(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_virtio_queue_status(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_vhost_queue_status(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_virtio_queue_element(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);
|
2014-05-28 02:39:30 +04:00
|
|
|
void ringbuf_write_completion(ReadLineState *rs, int nb_args, const char *str);
|
2016-07-11 13:53:51 +03:00
|
|
|
void info_trace_events_completion(ReadLineState *rs, int nb_args, const char *str);
|
2015-08-14 13:27:43 +03:00
|
|
|
void trace_event_completion(ReadLineState *rs, int nb_args, const char *str);
|
2014-05-28 02:39:31 +04:00
|
|
|
void watchdog_action_completion(ReadLineState *rs, int nb_args,
|
|
|
|
const char *str);
|
2014-05-28 02:39:32 +04:00
|
|
|
void migrate_set_capability_completion(ReadLineState *rs, int nb_args,
|
|
|
|
const char *str);
|
2015-03-23 11:32:29 +03:00
|
|
|
void migrate_set_parameter_completion(ReadLineState *rs, int nb_args,
|
|
|
|
const char *str);
|
2014-05-28 02:39:37 +04:00
|
|
|
void delvm_completion(ReadLineState *rs, int nb_args, const char *str);
|
|
|
|
void loadvm_completion(ReadLineState *rs, int nb_args, const char *str);
|
2015-06-11 04:21:21 +03:00
|
|
|
void hmp_rocker(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_rocker_ports(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_rocker_of_dpa_flows(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict);
|
2016-02-18 08:16:55 +03:00
|
|
|
void hmp_info_dump(Monitor *mon, const QDict *qdict);
|
2017-05-12 07:17:41 +03:00
|
|
|
void hmp_info_ramblock(Monitor *mon, const QDict *qdict);
|
2016-06-10 03:59:07 +03:00
|
|
|
void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict);
|
2017-02-17 02:15:37 +03:00
|
|
|
void hmp_info_vm_generation_id(Monitor *mon, const QDict *qdict);
|
2017-08-29 18:30:22 +03:00
|
|
|
void hmp_info_memory_size_summary(Monitor *mon, const QDict *qdict);
|
2020-10-03 20:13:20 +03:00
|
|
|
void hmp_info_replay(Monitor *mon, const QDict *qdict);
|
2020-10-03 20:13:26 +03:00
|
|
|
void hmp_replay_break(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_replay_delete_break(Monitor *mon, const QDict *qdict);
|
2020-10-03 20:13:31 +03:00
|
|
|
void hmp_replay_seek(Monitor *mon, const QDict *qdict);
|
2021-06-07 04:11:57 +03:00
|
|
|
void hmp_info_dirty_rate(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_calc_dirty_rate(Monitor *mon, const QDict *qdict);
|
2022-06-25 20:38:36 +03:00
|
|
|
void hmp_set_vcpu_dirty_limit(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_cancel_vcpu_dirty_limit(Monitor *mon, const QDict *qdict);
|
|
|
|
void hmp_info_vcpu_dirty_limit(Monitor *mon, const QDict *qdict);
|
2021-10-08 17:09:00 +03:00
|
|
|
void hmp_human_readable_text_helper(Monitor *mon,
|
|
|
|
HumanReadableText *(*qmp_handler)(Error **));
|
2022-04-26 13:17:35 +03:00
|
|
|
void hmp_info_stats(Monitor *mon, const QDict *qdict);
|
2022-12-01 15:11:29 +03:00
|
|
|
void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict);
|
2011-09-02 21:34:48 +04:00
|
|
|
|
|
|
|
#endif
|