xref: /openbmc/qemu/hmp-commands-info.hx (revision 5a28fa5ba17254d0398a854657b47af3096bd86a)
1HXCOMM See docs/devel/docs.rst for the format of this file.
2HXCOMM
3HXCOMM This file defines the contents of an array of HMPCommand structs
4HXCOMM which specify the name, behaviour and help text for HMP commands.
5HXCOMM Text between SRST and ERST is rST format documentation.
6HXCOMM HXCOMM can be used for comments, discarded from both rST and C.
7HXCOMM
8HXCOMM In this file, generally SRST fragments should have two extra
9HXCOMM spaces of indent, so that the documentation list item for "info foo"
10HXCOMM appears inside the documentation list item for the top level
11HXCOMM "info" documentation entry. The exception is the first SRST
12HXCOMM fragment that defines that top level entry.
13
14SRST
15``info`` *subcommand*
16  Show various information about the system state.
17
18ERST
19
20    {
21        .name       = "version",
22        .args_type  = "",
23        .params     = "",
24        .help       = "show the version of QEMU",
25        .cmd        = hmp_info_version,
26        .flags      = "p",
27    },
28
29SRST
30  ``info version``
31    Show the version of QEMU.
32ERST
33
34    {
35        .name       = "network",
36        .args_type  = "",
37        .params     = "",
38        .help       = "show the network state",
39        .cmd        = hmp_info_network,
40    },
41
42SRST
43  ``info network``
44    Show the network state.
45ERST
46
47    {
48        .name       = "chardev",
49        .args_type  = "",
50        .params     = "",
51        .help       = "show the character devices",
52        .cmd        = hmp_info_chardev,
53        .flags      = "p",
54    },
55
56SRST
57  ``info chardev``
58    Show the character devices.
59ERST
60
61    {
62        .name       = "block",
63        .args_type  = "nodes:-n,verbose:-v,device:B?",
64        .params     = "[-n] [-v] [device]",
65        .help       = "show info of one block device or all block devices "
66                      "(-n: show named nodes; -v: show details)",
67        .cmd        = hmp_info_block,
68    },
69
70SRST
71  ``info block``
72    Show info of one block device or all block devices.
73ERST
74
75    {
76        .name       = "blockstats",
77        .args_type  = "",
78        .params     = "",
79        .help       = "show block device statistics",
80        .cmd        = hmp_info_blockstats,
81    },
82
83SRST
84  ``info blockstats``
85    Show block device statistics.
86ERST
87
88    {
89        .name       = "block-jobs",
90        .args_type  = "",
91        .params     = "",
92        .help       = "show progress of ongoing block device operations",
93        .cmd        = hmp_info_block_jobs,
94    },
95
96SRST
97  ``info block-jobs``
98    Show progress of ongoing block device operations.
99ERST
100
101    {
102        .name       = "registers",
103        .args_type  = "cpustate_all:-a,vcpu:i?",
104        .params     = "[-a|vcpu]",
105        .help       = "show the cpu registers (-a: show register info for all cpus;"
106                      " vcpu: specific vCPU to query; show the current CPU's registers if"
107                      " no argument is specified)",
108        .cmd        = hmp_info_registers,
109    },
110
111SRST
112  ``info registers``
113    Show the cpu registers.
114ERST
115
116#if defined(TARGET_I386)
117    {
118        .name       = "lapic",
119        .args_type  = "apic-id:i?",
120        .params     = "[apic-id]",
121        .help       = "show local apic state (apic-id: local apic to read, default is which of current CPU)",
122
123        .cmd        = hmp_info_local_apic,
124    },
125#endif
126
127SRST
128  ``info lapic``
129    Show local APIC state
130ERST
131
132    {
133        .name       = "cpus",
134        .args_type  = "",
135        .params     = "",
136        .help       = "show infos for each CPU",
137        .cmd        = hmp_info_cpus,
138    },
139
140SRST
141  ``info cpus``
142    Show infos for each CPU.
143ERST
144
145    {
146        .name       = "history",
147        .args_type  = "",
148        .params     = "",
149        .help       = "show the command line history",
150        .cmd        = hmp_info_history,
151        .flags      = "p",
152    },
153
154SRST
155  ``info history``
156    Show the command line history.
157ERST
158
159    {
160        .name       = "irq",
161        .args_type  = "",
162        .params     = "",
163        .help       = "show the interrupts statistics (if available)",
164        .cmd_info_hrt = qmp_x_query_irq,
165    },
166
167SRST
168  ``info irq``
169    Show the interrupts statistics (if available).
170ERST
171
172    {
173        .name       = "pic",
174        .args_type  = "",
175        .params     = "",
176        .help       = "show PIC state",
177        .cmd_info_hrt = qmp_x_query_interrupt_controllers,
178    },
179
180SRST
181  ``info pic``
182    Show PIC state.
183ERST
184
185    {
186        .name       = "pci",
187        .args_type  = "",
188        .params     = "",
189        .help       = "show PCI info",
190        .cmd        = hmp_info_pci,
191    },
192
193SRST
194  ``info pci``
195    Show PCI information.
196ERST
197
198#if defined(TARGET_I386) || defined(TARGET_SH4) || defined(TARGET_SPARC) || \
199    defined(TARGET_PPC) || defined(TARGET_XTENSA) || defined(TARGET_M68K)
200    {
201        .name       = "tlb",
202        .args_type  = "",
203        .params     = "",
204        .help       = "show virtual to physical memory mappings",
205        .cmd        = hmp_info_tlb,
206    },
207#endif
208
209SRST
210  ``info tlb``
211    Show virtual to physical memory mappings.
212ERST
213
214#if defined(TARGET_I386) || defined(TARGET_RISCV)
215    {
216        .name       = "mem",
217        .args_type  = "",
218        .params     = "",
219        .help       = "show the active virtual memory mappings",
220        .cmd        = hmp_info_mem,
221    },
222#endif
223
224SRST
225  ``info mem``
226    Show the active virtual memory mappings.
227ERST
228
229    {
230        .name       = "mtree",
231        .args_type  = "flatview:-f,dispatch_tree:-d,owner:-o,disabled:-D",
232        .params     = "[-f][-d][-o][-D]",
233        .help       = "show memory tree (-f: dump flat view for address spaces;"
234                      "-d: dump dispatch tree, valid with -f only);"
235                      "-o: dump region owners/parents;"
236                      "-D: dump disabled regions",
237        .cmd        = hmp_info_mtree,
238    },
239
240SRST
241  ``info mtree``
242    Show memory tree.
243ERST
244
245#if defined(CONFIG_TCG)
246    {
247        .name       = "jit",
248        .args_type  = "",
249        .params     = "",
250        .help       = "show dynamic compiler info",
251    },
252#endif
253
254SRST
255  ``info jit``
256    Show dynamic compiler info.
257ERST
258
259    {
260        .name       = "sync-profile",
261        .args_type  = "mean:-m,no_coalesce:-n,max:i?",
262        .params     = "[-m] [-n] [max]",
263        .help       = "show synchronization profiling info, up to max entries "
264                      "(default: 10), sorted by total wait time. (-m: sort by "
265                      "mean wait time; -n: do not coalesce objects with the "
266                      "same call site)",
267        .cmd        = hmp_info_sync_profile,
268    },
269
270SRST
271  ``info sync-profile [-m|-n]`` [*max*]
272    Show synchronization profiling info, up to *max* entries (default: 10),
273    sorted by total wait time.
274
275    ``-m``
276      sort by mean wait time
277    ``-n``
278      do not coalesce objects with the same call site
279
280    When different objects that share the same call site are coalesced,
281    the "Object" field shows---enclosed in brackets---the number of objects
282    being coalesced.
283ERST
284
285    {
286        .name       = "kvm",
287        .args_type  = "",
288        .params     = "",
289        .help       = "show KVM information",
290        .cmd        = hmp_info_kvm,
291    },
292
293SRST
294  ``info kvm``
295    Show KVM information.
296ERST
297
298    {
299        .name       = "numa",
300        .args_type  = "",
301        .params     = "",
302        .help       = "show NUMA information",
303        .cmd_info_hrt = qmp_x_query_numa,
304    },
305
306SRST
307  ``info numa``
308    Show NUMA information.
309ERST
310
311    {
312        .name       = "usb",
313        .args_type  = "",
314        .params     = "",
315        .help       = "show guest USB devices",
316        .cmd_info_hrt = qmp_x_query_usb,
317    },
318
319SRST
320  ``info usb``
321    Show guest USB devices.
322ERST
323
324    {
325        .name       = "usbhost",
326        .args_type  = "",
327        .params     = "",
328        .help       = "show host USB devices",
329    },
330
331SRST
332  ``info usbhost``
333    Show host USB devices.
334ERST
335
336    {
337        .name       = "capture",
338        .args_type  = "",
339        .params     = "",
340        .help       = "show capture information",
341        .cmd        = hmp_info_capture,
342    },
343
344SRST
345  ``info capture``
346    Show capture information.
347ERST
348
349    {
350        .name       = "snapshots",
351        .args_type  = "",
352        .params     = "",
353        .help       = "show the currently saved VM snapshots",
354        .cmd        = hmp_info_snapshots,
355    },
356
357SRST
358  ``info snapshots``
359    Show the currently saved VM snapshots.
360ERST
361
362    {
363        .name       = "status",
364        .args_type  = "",
365        .params     = "",
366        .help       = "show the current VM status (running|paused)",
367        .cmd        = hmp_info_status,
368        .flags      = "p",
369    },
370
371SRST
372  ``info status``
373    Show the current VM status (running|paused).
374ERST
375
376    {
377        .name       = "mice",
378        .args_type  = "",
379        .params     = "",
380        .help       = "show which guest mouse is receiving events",
381        .cmd        = hmp_info_mice,
382    },
383
384SRST
385  ``info mice``
386    Show which guest mouse is receiving events.
387ERST
388
389#if defined(CONFIG_VNC)
390    {
391        .name       = "vnc",
392        .args_type  = "",
393        .params     = "",
394        .help       = "show the vnc server status",
395        .cmd        = hmp_info_vnc,
396    },
397#endif
398
399SRST
400  ``info vnc``
401    Show the vnc server status.
402ERST
403
404#if defined(CONFIG_SPICE)
405    {
406        .name       = "spice",
407        .args_type  = "",
408        .params     = "",
409        .help       = "show the spice server status",
410        .cmd        = hmp_info_spice,
411    },
412#endif
413
414SRST
415  ``info spice``
416    Show the spice server status.
417ERST
418
419    {
420        .name       = "name",
421        .args_type  = "",
422        .params     = "",
423        .help       = "show the current VM name",
424        .cmd        = hmp_info_name,
425        .flags      = "p",
426    },
427
428SRST
429  ``info name``
430    Show the current VM name.
431ERST
432
433    {
434        .name       = "uuid",
435        .args_type  = "",
436        .params     = "",
437        .help       = "show the current VM UUID",
438        .cmd        = hmp_info_uuid,
439        .flags      = "p",
440    },
441
442SRST
443  ``info uuid``
444    Show the current VM UUID.
445ERST
446
447#if defined(CONFIG_SLIRP)
448    {
449        .name       = "usernet",
450        .args_type  = "",
451        .params     = "",
452        .help       = "show user network stack connection states",
453        .cmd        = hmp_info_usernet,
454    },
455#endif
456
457SRST
458  ``info usernet``
459    Show user network stack connection states.
460ERST
461
462    {
463        .name       = "migrate",
464        .args_type  = "all:-a",
465        .params     = "[-a]",
466        .help       = "show migration status (-a: all, dump all status)",
467        .cmd        = hmp_info_migrate,
468    },
469
470SRST
471  ``info migrate``
472    Show migration status.
473ERST
474
475    {
476        .name       = "migrate_capabilities",
477        .args_type  = "",
478        .params     = "",
479        .help       = "show current migration capabilities",
480        .cmd        = hmp_info_migrate_capabilities,
481    },
482
483SRST
484  ``info migrate_capabilities``
485    Show current migration capabilities.
486ERST
487
488    {
489        .name       = "migrate_parameters",
490        .args_type  = "",
491        .params     = "",
492        .help       = "show current migration parameters",
493        .cmd        = hmp_info_migrate_parameters,
494    },
495
496SRST
497  ``info migrate_parameters``
498    Show current migration parameters.
499ERST
500
501    {
502        .name       = "balloon",
503        .args_type  = "",
504        .params     = "",
505        .help       = "show balloon information",
506        .cmd        = hmp_info_balloon,
507    },
508
509SRST
510  ``info balloon``
511    Show balloon information.
512ERST
513
514    {
515        .name       = "qtree",
516        .args_type  = "brief:-b",
517        .params     = "[-b]",
518        .help       = "show device tree (-b: brief, omit properties)",
519        .cmd        = hmp_info_qtree,
520    },
521
522SRST
523  ``info qtree``
524    Show device tree.
525ERST
526
527    {
528        .name       = "qdm",
529        .args_type  = "",
530        .params     = "",
531        .help       = "show qdev device model list",
532        .cmd        = hmp_info_qdm,
533    },
534
535SRST
536  ``info qdm``
537    Show qdev device model list.
538ERST
539
540    {
541        .name       = "qom-tree",
542        .args_type  = "path:s?",
543        .params     = "[path]",
544        .help       = "show QOM composition tree",
545        .cmd        = hmp_info_qom_tree,
546        .flags      = "p",
547    },
548
549SRST
550  ``info qom-tree``
551    Show QOM composition tree.
552ERST
553
554    {
555        .name       = "roms",
556        .args_type  = "",
557        .params     = "",
558        .help       = "show roms",
559        .cmd_info_hrt = qmp_x_query_roms,
560    },
561
562SRST
563  ``info roms``
564    Show roms.
565ERST
566
567    {
568        .name       = "trace-events",
569        .args_type  = "name:s?,vcpu:i?",
570        .params     = "[name] [vcpu]",
571        .help       = "show available trace-events & their state "
572                      "(name: event name pattern; vcpu: vCPU to query, default is any)",
573        .cmd = hmp_info_trace_events,
574        .command_completion = info_trace_events_completion,
575    },
576
577SRST
578  ``info trace-events``
579    Show available trace-events & their state.
580ERST
581
582    {
583        .name       = "tpm",
584        .args_type  = "",
585        .params     = "",
586        .help       = "show the TPM device",
587        .cmd        = hmp_info_tpm,
588    },
589
590SRST
591  ``info tpm``
592    Show the TPM device.
593ERST
594
595    {
596        .name       = "memdev",
597        .args_type  = "",
598        .params     = "",
599        .help       = "show memory backends",
600        .cmd        = hmp_info_memdev,
601        .flags      = "p",
602    },
603
604SRST
605  ``info memdev``
606    Show memory backends
607ERST
608
609    {
610        .name       = "memory-devices",
611        .args_type  = "",
612        .params     = "",
613        .help       = "show memory devices",
614        .cmd        = hmp_info_memory_devices,
615    },
616
617SRST
618  ``info memory-devices``
619    Show memory devices.
620ERST
621
622    {
623        .name       = "iothreads",
624        .args_type  = "",
625        .params     = "",
626        .help       = "show iothreads",
627        .cmd        = hmp_info_iothreads,
628        .flags      = "p",
629    },
630
631SRST
632  ``info iothreads``
633    Show iothread's identifiers.
634ERST
635
636    {
637        .name       = "rocker",
638        .args_type  = "name:s",
639        .params     = "name",
640        .help       = "Show rocker switch",
641        .cmd        = hmp_rocker,
642    },
643
644SRST
645  ``info rocker`` *name*
646    Show rocker switch.
647ERST
648
649    {
650        .name       = "rocker-ports",
651        .args_type  = "name:s",
652        .params     = "name",
653        .help       = "Show rocker ports",
654        .cmd        = hmp_rocker_ports,
655    },
656
657SRST
658  ``info rocker-ports`` *name*-ports
659    Show rocker ports.
660ERST
661
662    {
663        .name       = "rocker-of-dpa-flows",
664        .args_type  = "name:s,tbl_id:i?",
665        .params     = "name [tbl_id]",
666        .help       = "Show rocker OF-DPA flow tables",
667        .cmd        = hmp_rocker_of_dpa_flows,
668    },
669
670SRST
671  ``info rocker-of-dpa-flows`` *name* [*tbl_id*]
672    Show rocker OF-DPA flow tables.
673ERST
674
675    {
676        .name       = "rocker-of-dpa-groups",
677        .args_type  = "name:s,type:i?",
678        .params     = "name [type]",
679        .help       = "Show rocker OF-DPA groups",
680        .cmd        = hmp_rocker_of_dpa_groups,
681    },
682
683SRST
684  ``info rocker-of-dpa-groups`` *name* [*type*]
685    Show rocker OF-DPA groups.
686ERST
687
688#if defined(TARGET_S390X)
689    {
690        .name       = "skeys",
691        .args_type  = "addr:l",
692        .params     = "address",
693        .help       = "Display the value of a storage key",
694        .cmd        = hmp_info_skeys,
695    },
696#endif
697
698SRST
699  ``info skeys`` *address*
700    Display the value of a storage key (s390 only)
701ERST
702
703#if defined(TARGET_S390X)
704    {
705        .name       = "cmma",
706        .args_type  = "addr:l,count:l?",
707        .params     = "address [count]",
708        .help       = "Display the values of the CMMA storage attributes for a range of pages",
709        .cmd        = hmp_info_cmma,
710    },
711#endif
712
713SRST
714  ``info cmma`` *address*
715    Display the values of the CMMA storage attributes for a range of
716    pages (s390 only)
717ERST
718
719    {
720        .name       = "dump",
721        .args_type  = "",
722        .params     = "",
723        .help       = "Display the latest dump status",
724        .cmd        = hmp_info_dump,
725    },
726
727SRST
728  ``info dump``
729    Display the latest dump status.
730ERST
731
732    {
733        .name       = "ramblock",
734        .args_type  = "",
735        .params     = "",
736        .help       = "Display system ramblock information",
737        .cmd_info_hrt = qmp_x_query_ramblock,
738    },
739
740SRST
741  ``info ramblock``
742    Dump all the ramblocks of the system.
743ERST
744
745    {
746        .name       = "hotpluggable-cpus",
747        .args_type  = "",
748        .params     = "",
749        .help       = "Show information about hotpluggable CPUs",
750        .cmd        = hmp_hotpluggable_cpus,
751        .flags      = "p",
752    },
753
754SRST
755  ``info hotpluggable-cpus``
756    Show information about hotpluggable CPUs
757ERST
758
759    {
760        .name       = "vm-generation-id",
761        .args_type  = "",
762        .params     = "",
763        .help       = "Show Virtual Machine Generation ID",
764        .cmd = hmp_info_vm_generation_id,
765    },
766
767SRST
768  ``info vm-generation-id``
769    Show Virtual Machine Generation ID
770ERST
771
772    {
773        .name       = "memory_size_summary",
774        .args_type  = "",
775        .params     = "",
776        .help       = "show the amount of initially allocated and "
777                      "present hotpluggable (if enabled) memory in bytes.",
778        .cmd        = hmp_info_memory_size_summary,
779    },
780
781SRST
782  ``info memory_size_summary``
783    Display the amount of initially allocated and present hotpluggable (if
784    enabled) memory in bytes.
785ERST
786
787#if defined(TARGET_I386)
788    {
789        .name       = "sev",
790        .args_type  = "",
791        .params     = "",
792        .help       = "show SEV information",
793        .cmd        = hmp_info_sev,
794    },
795#endif
796
797SRST
798  ``info sev``
799    Show SEV information.
800ERST
801
802    {
803        .name       = "replay",
804        .args_type  = "",
805        .params     = "",
806        .help       = "show record/replay information",
807        .cmd        = hmp_info_replay,
808    },
809
810SRST
811  ``info replay``
812    Display the record/replay information: mode and the current icount.
813ERST
814
815    {
816        .name       = "dirty_rate",
817        .args_type  = "",
818        .params     = "",
819        .help       = "show dirty rate information",
820        .cmd        = hmp_info_dirty_rate,
821    },
822
823SRST
824  ``info dirty_rate``
825    Display the vcpu dirty rate information.
826ERST
827
828    {
829        .name       = "vcpu_dirty_limit",
830        .args_type  = "",
831        .params     = "",
832        .help       = "show dirty page limit information of all vCPU",
833        .cmd        = hmp_info_vcpu_dirty_limit,
834    },
835
836SRST
837  ``info vcpu_dirty_limit``
838    Display the vcpu dirty page limit information.
839ERST
840
841#if defined(TARGET_I386)
842    {
843        .name       = "sgx",
844        .args_type  = "",
845        .params     = "",
846        .help       = "show intel SGX information",
847        .cmd        = hmp_info_sgx,
848    },
849#endif
850
851SRST
852  ``info sgx``
853    Show intel SGX information.
854ERST
855
856#if defined(CONFIG_MOS6522)
857    {
858        .name         = "via",
859        .args_type    = "",
860        .params       = "",
861        .help         = "show guest mos6522 VIA devices",
862        .cmd          = hmp_info_via,
863    },
864#endif
865
866SRST
867  ``info via``
868    Show guest mos6522 VIA devices.
869ERST
870
871    {
872        .name       = "stats",
873        .args_type  = "target:s,names:s?,provider:s?",
874        .params     = "target [names] [provider]",
875        .help       = "show statistics for the given target (vm or vcpu); optionally filter by"
876                      "name (comma-separated list, or * for all) and provider",
877        .cmd        = hmp_info_stats,
878    },
879
880SRST
881  ``info stats``
882    Show runtime-collected statistics
883ERST
884
885    {
886        .name      = "virtio",
887        .args_type = "",
888        .params    = "",
889        .help      = "List all available virtio devices",
890        .cmd       = hmp_virtio_query,
891        .flags     = "p",
892    },
893
894SRST
895  ``info virtio``
896    List all available virtio devices
897ERST
898
899    {
900        .name      = "virtio-status",
901        .args_type = "path:s",
902        .params    = "path",
903        .help      = "Display status of a given virtio device",
904        .cmd       = hmp_virtio_status,
905        .flags     = "p",
906    },
907
908SRST
909  ``info virtio-status`` *path*
910    Display status of a given virtio device
911ERST
912
913    {
914        .name      = "virtio-queue-status",
915        .args_type = "path:s,queue:i",
916        .params    = "path queue",
917        .help      = "Display status of a given virtio queue",
918        .cmd       = hmp_virtio_queue_status,
919        .flags     = "p",
920    },
921
922SRST
923  ``info virtio-queue-status`` *path* *queue*
924    Display status of a given virtio queue
925ERST
926
927    {
928        .name      = "virtio-vhost-queue-status",
929        .args_type = "path:s,queue:i",
930        .params    = "path queue",
931        .help      = "Display status of a given vhost queue",
932        .cmd       = hmp_vhost_queue_status,
933        .flags     = "p",
934    },
935
936SRST
937  ``info virtio-vhost-queue-status`` *path* *queue*
938    Display status of a given vhost queue
939ERST
940
941    {
942        .name       = "virtio-queue-element",
943        .args_type  = "path:s,queue:i,index:i?",
944        .params     = "path queue [index]",
945        .help       = "Display element of a given virtio queue",
946        .cmd        = hmp_virtio_queue_element,
947        .flags      = "p",
948    },
949
950SRST
951  ``info virtio-queue-element`` *path* *queue* [*index*]
952    Display element of a given virtio queue
953ERST
954
955    {
956        .name       = "cryptodev",
957        .args_type  = "",
958        .params     = "",
959        .help       = "show the crypto devices",
960        .cmd        = hmp_info_cryptodev,
961        .flags      = "p",
962    },
963
964SRST
965  ``info cryptodev``
966    Show the crypto devices.
967ERST
968