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