Paolo Bonzini
4cb96b9742
monitor: add more *_locked() functions
...
Allow flushing and printing to the monitor while mon->mon_lock is
held. This will help cleaning up the locking of mon->mux_out and
mon->suspend_cnt.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-05-25 10:18:33 +02:00
Peter Maydell
e9ccfdd91d
hmp: Add 'one-insn-per-tb' command equivalent to 'singlestep'
...
The 'singlestep' HMP command is confusing, because it doesn't
actually have anything to do with single-stepping the CPU. What it
does do is force TCG emulation to put one guest instruction in each
TB, which can be useful in some situations.
Create a new HMP command 'one-insn-per-tb', so we can document that
'singlestep' is just a deprecated synonym for it, and eventually
perhaps drop it.
We aren't obliged to do deprecate-and-drop for HMP commands,
but it's easy enough to do so, so we do.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-id: 20230417164041.684562-9-peter.maydell@linaro.org
2023-05-02 15:47:40 +01:00
zhenwei pi and Michael S. Tsirkin
ef52091aeb
hmp: add cryptodev info command
...
Example of this command:
# virsh qemu-monitor-command vm --hmp info cryptodev
cryptodev1: service=[akcipher|mac|hash|cipher]
queue 0: type=builtin
cryptodev0: service=[akcipher]
queue 0: type=lkcf
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com >
Message-Id: <20230301105847.253084-8-pizhenwei@bytedance.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
2023-03-07 12:38:59 -05:00
Joao Martins and David Woodhouse
507cb64d6e
i386/xen: add monitor commands to test event injection
...
Specifically add listing, injection of event channels.
Signed-off-by: Joao Martins <joao.m.martins@oracle.com >
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk >
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Reviewed-by: Paul Durrant <paul@xen.org >
2023-03-01 08:22:50 +00:00
Markus Armbruster
cbf819979b
monitor: Move remaining HMP commands from misc.c to hmp-cmds.c
...
This requires giving them external linkage. Rename do_help_cmd() to
hmp_help(), and do_print() to hmp_print().
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-30-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
e22455664b
monitor: Move target-dependent HMP commands to hmp-cmds-target.c
...
Target-independent hmp_gpa2hva(), hmp_gpa2hpa() move along to stay
next to hmp_gva2gpa().
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-29-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
dd00d7fa65
monitor: Move monitor_putc() next to monitor_puts & external linkage
...
monitor_putc() will soon be used from more than one .c file.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-28-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
aa09b3d5f8
stats: Move QMP commands from monitor/ to stats/
...
This moves these commands from MAINTAINERS section "QMP" to new
section "Stats". Status is Orphan. Volunteers welcome!
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-23-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
bab46b8180
runstate: Move HMP commands from monitor/ to softmmu/
...
This moves these commands from MAINTAINERS section "Human
Monitor (HMP)" and "QMP" to "Main loop".
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-22-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
ae71d13d4e
net: Move hmp_info_network() to net-hmp-cmds.c
...
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-17-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
0d79271b57
hmp: Rewrite strlist_from_comma_list() as hmp_split_at_comma()
...
Use g_strsplit() for the actual splitting. Give external linkage, so
the next commit can move one of its users to another source file.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-15-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
fa1d2f8f63
block: Factor out hmp_change_medium(), and move to block/monitor/
...
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-13-armbru@redhat.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
29b62a1063
trace: Move HMP commands from monitor/ to trace/
...
This moves these commands from MAINTAINERS sections "Human
Monitor (HMP)" and "QMP" to "Tracing".
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-9-armbru@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
5ec92f2d92
hmp: Rename help_cmd() to hmp_help_cmd(), move declaration to hmp.h
...
The next commit will move a caller of help_cmd() to a new file.
Including monitor/monitor-internal.h there just for help_cmd() feels
silly. Better to provide it in monitor/hmp.h suitably renamed.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-8-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
c3054a6e6a
char: Factor out qmp_add_client() parts and move to chardev/
...
Code moves from MAINTAINERS section "QMP" to "Character device
backends".
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-5-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Markus Armbruster
98b5362bdd
audio: Move HMP commands from monitor/ to audio/
...
This moves these commands from MAINTAINERS sections "Human
Monitor (HMP)" and "QMP" to "Overall Audio backends".
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230124121946.1139465-3-armbru@redhat.com >
2023-02-04 07:56:54 +01:00
Peter Maydell
fcb7e040f5
Merge tag 'pull-include-2023-01-20' of https://repo.or.cz/qemu/armbru into staging
...
Header cleanup patches for 2023-01-20
# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmPKN6YSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTPeoQAIKl/BF6PFRNq0/k3vPqMe6nltjgkpa/
# p7E5qRlo31RCeUB+f0iW26mySnNTgYkE28yy57HxUML/9Lp1bbxyDgRNiJ406a4L
# kFVF04kOIFez1+mfvWN92DZqcl/EAAqNL6XqSFyO38kYwcsFsi+BZ7DLZbL9Ea8v
# wVywB96mN6KyrLWCJ2D0OqIVuPHSHol+5zt9e6+ShBgN0FfElLbv0F4KH3VJ1olA
# psKl6w6V9+c2zV1kT/H+S763m6mQdwtVo/UuOJoElI+Qib/UBxDOrhdYf4Zg7hKf
# ByUuhJUASm8y9yD/42mFs90B6eUNzLSBC8v1PgRqSqDHtllveP4RysklBlyIMlOs
# DKtqEuRuIJ/qDXliIFHY6tBnUkeITSd7BCxkQYfaGyaSOcviDSlE3AyaaBC0sY4F
# P/lTTiRg5ksvhDYtJnW3mSfmT2PY7aBtyE3D1Z84v9hek6D0reMQTE97yL/j4m7P
# wJP8aM3Z8GILCVxFIh02wmqWZhZUCGsIDS/vxVm+u060n66qtDIQFBoazsFJrCME
# eWI+qDNDr6xhLegeYajGDM9pdpQc3x0siiuHso4wMSI9NZxwP+tkCVhTpqmrRcs4
# GSH/4IlUXqEZdUQDL38DfA22C1TV8BzyMhGLTUERWWYki1sr99yv0pdFyk5r3nLB
# SURwr58rB2zo
# =dOfq
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 20 Jan 2023 06:41:42 GMT
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com "
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com >" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org >" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-include-2023-01-20' of https://repo.or.cz/qemu/armbru :
include/hw/ppc include/hw/pci-host: Drop extra typedefs
include/hw/ppc: Don't include hw/pci-host/pnv_phb.h from pnv.h
include/hw/ppc: Supply a few missing includes
include/hw/ppc: Split pnv_chip.h off pnv.h
include/hw/block: Include hw/block/block.h where needed
hw/sparc64/niagara: Use blk_name() instead of open-coding it
include/block: Untangle inclusion loops
coroutine: Use Coroutine typedef name instead of structure tag
coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h
coroutine: Clean up superfluous inclusion of qemu/lockable.h
coroutine: Move coroutine_fn to qemu/osdep.h, trim includes
coroutine: Clean up superfluous inclusion of qemu/coroutine.h
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-20 13:17:55 +00:00
Markus Armbruster
ec843b97f2
ui: Split hmp_mouse_set() and move the HMP part to ui/
...
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20230109190321.1056914-17-armbru@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
2023-01-19 13:30:01 +01:00
Markus Armbruster
f916a1751e
ui: Factor out hmp_change_vnc(), and move to ui/ui-hmp-cmds.c
...
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20230109190321.1056914-14-armbru@redhat.com >
2023-01-19 13:30:01 +01:00
Markus Armbruster
5011d262f0
ui: Move HMP commands from monitor to new ui/ui-hmp-cmds.c
...
This moves these commands from MAINTAINERS section "Human
Monitor (HMP)" to "Graphics".
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20230109190321.1056914-12-armbru@redhat.com >
2023-01-19 13:30:01 +01:00
Markus Armbruster
3125af295e
ui: Factor out qmp_add_client() parts and move to ui/ui-qmp-cmds.c
...
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20230109190321.1056914-11-armbru@redhat.com >
2023-01-19 13:30:01 +01:00
Markus Armbruster
af7f8eb591
coroutine: Move coroutine_fn to qemu/osdep.h, trim includes
...
block/block-hmp-cmds.h and qemu/co-shared-resource.h use coroutine_fn
without including qemu/coroutine.h. They compile only if it's already
included from elsewhere.
I could fix that, but pulling in qemu/coroutine.h and everything it
includes just for a macro that expands into nothing feels silly.
Instead, move the macro to qemu/osdep.h.
Inclusions of qemu/coroutine.h just for coroutine_fn become
superfluous. Drop them.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-Id: <20221221131435.3851212-3-armbru@redhat.com >
2023-01-19 10:18:28 +01:00
Markus Armbruster
d0e6729809
pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c
...
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20221201121133.3813857-10-armbru@redhat.com >
2022-12-19 16:21:56 +01:00
Markus Armbruster
9492718b7c
qapi misc: Elide redundant has_FOO in generated C
...
The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with. Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step. This is the step for qapi/misc.json.
Said commit explains the transformation in more detail. The invariant
violations mentioned there do not occur here.
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
Message-Id: <20221104160712.3005652-18-armbru@redhat.com >
2022-12-14 20:04:47 +01:00
Alberto Faria and Kevin Wolf
6894ee2bee
monitor: add missing coroutine_fn annotation
...
hmp_block_resize and hmp_screendump are defined as a ".coroutine = true" command,
so they must be coroutine_fn.
Signed-off-by: Alberto Faria <afaria@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20221013123711.620631-4-pbonzini@redhat.com >
Reviewed-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
2022-10-27 20:14:11 +02:00