Move target- and device specific code from monitor
v3 cover Move target- and device specific code from monitor
The monivation of this set is simple. Recently we have proposed patch to monitor.c with specific x86 APIC HMP commands. The patchset was denied with the main motivation "No more arch specific code in monitor.c" This patchset is the first step to move arch specific code from monitor.c targets.
So, monitor.c already contains a lot of generic code, as well as the target specifics code and eventually monitor.c volume will only grow. This trend leads to a variety of fouling code ifdeffery(and combinations thereof), poor readability, and entanglement of architecture of the project. If someone wants to improve processing logic commands at the monitor, it isn't necessarily must differentiate amongst the implementation of some ARM or x86_64 specific commands, because the project already has separation of target specific code on directories.
The presented solution is not the best, but it is quite simple (PATCH doesn't add more code!) and decides the above mentioned issue. Subsequently it will not prevent the introduction of more advanced mechanism that can more effectively resolve the issue.
There is a issue with the placement of code for multiple architectures (isn't for everyone), but this code is very small. This patch is a step towards solving the issue associated with maintaining the purity of the code and structure of the project, which solves not all, but doing a little better than it is.
Changes from v2:
- target_monitor_defs provides a target-specific array monitor_defs[] This call is added through stub to all archs as a weak symbol. It should be redefined on each specific architecture
- fix end of table info (information about the system state)
- ported to current HEAD (iothreads & skeys commands descriptions moved)
Changes from v1:
- ported to new head
Pavel Butsykin (4):
hmp-commands-info: move info_cmds content out of monitor.c
monitor: remove target-specific code from monitor.c hmp-commands.hx: fix end of table info
monitor: added generation of documentation for hmp-commands-info.hx
.gitignore | 1 + Makefile | 10 +- Makefile.target | 5 +- hmp-commands-info.hx | 749 +++++++++++++++++++++++ hmp-commands.hx | 120 ---- include/monitor/monitor-common.h | 45 ++ include/qemu/typedefs.h | 1 + monitor.c | 1249 +------------------------------------- qemu-doc.texi | 2 + qemu-monitor-info.texi | 157 +++++ stubs/Makefile.objs | 1 + stubs/target-monitor-defs.c | 9 + target-i386/Makefile.objs | 2 +- target-i386/monitor.c | 494 +++++++++++++++ target-ppc/Makefile.objs | 2 +- target-ppc/monitor.c | 255 ++++++++ target-sh4/Makefile.objs | 1 + target-sh4/monitor.c | 52 ++ target-sparc/Makefile.objs | 2 +- target-sparc/monitor.c | 158 +++++ target-xtensa/Makefile.objs | 1 + target-xtensa/monitor.c | 34 ++ 22 files changed, 1984 insertions(+), 1366 deletions(-) create mode 100644 hmp-commands-info.hx create mode 100644 include/monitor/monitor-common.h create mode 100644 qemu-monitor-info.texi create mode 100644 stubs/target-monitor-defs.c create mode 100644 target-i386/monitor.c create mode 100644 target-ppc/monitor.c create mode 100644 target-sh4/monitor.c create mode 100644 target-sparc/monitor.c create mode 100644 target-xtensa/monitor.c
Signature · 1 line
2.1.4
PATCH v3 1/4 hmp-commands-info: move info_cmds content out of monitor.c
From: Pavel Butsykin <[email protected]>
For moving target- and device-specific code from monitor.c, to beginning we move info_cmds content to hmp-commands-info.hx
--- Makefile.target | 5 +- hmp-commands-info.hx | 741 +++++++++++++++++++++++++++++++++++++++++++++++++++ monitor.c | 389 +-------------------------- 3 files changed, 747 insertions(+), 388 deletions(-) create mode 100644 hmp-commands-info.hx
Makefile.target +4 -1
@@ -151,7 +151,7 @@ else obj-y += hw/$(TARGET_BASE_ARCH)/ endif -GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h +GENERATED_HEADERS += hmp-commands.h hmp-commands-info.h qmp-commands-old.h endif # CONFIG_SOFTMMU
@@ -193,6 +193,9 @@ gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh hmp-commands.h: $(SRC_PATH)/hmp-commands.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") +hmp-commands-info.h: $(SRC_PATH)/hmp-commands-info.hx + $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") + qmp-commands-old.h: $(SRC_PATH)/qmp-commands.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
hmp-commands-info.hx new file +741 -0
741 lines not on this page · raw message
monitor.c +2 -387
395 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v3 2/4 monitor: remove target-specific code from monitor.c
In reply to Denis V. LunevFrom: Pavel Butsykin <[email protected]>
Move target-specific code out of /monitor.c to /target-*/monitor.c, this will avoid code cluttering and using random ifdeffery. The solution is quite simple, but solves the issue of the separation of target-specific code from monitor
The stub version API target_monitor_defs defined with weak symbol, so any definition of this API elsewhere(target-specific code) will override the API stub.
--- include/monitor/monitor-common.h | 45 ++ include/qemu/typedefs.h | 1 + monitor.c | 860 +-------------------------------------- qemu-monitor-info.texi | 151 +++++++ stubs/Makefile.objs | 1 + stubs/target-monitor-defs.c | 9 + target-i386/Makefile.objs | 2 +- target-i386/monitor.c | 494 ++++++++++++++++++++++ target-ppc/Makefile.objs | 2 +- target-ppc/monitor.c | 255 ++++++++++++ target-sh4/Makefile.objs | 1 + target-sh4/monitor.c | 52 +++ target-sparc/Makefile.objs | 2 +- target-sparc/monitor.c | 158 +++++++ target-xtensa/Makefile.objs | 1 + target-xtensa/monitor.c | 34 ++ 16 files changed, 1213 insertions(+), 855 deletions(-) create mode 100644 include/monitor/monitor-common.h create mode 100644 qemu-monitor-info.texi create mode 100644 stubs/target-monitor-defs.c create mode 100644 target-i386/monitor.c create mode 100644 target-ppc/monitor.c create mode 100644 target-sh4/monitor.c create mode 100644 target-sparc/monitor.c create mode 100644 target-xtensa/monitor.c
include/monitor/monitor-common.h new file +45 -0
@@ -0,0 +1,45 @@ +/* +* QEMU monitor +* +* Copyright (c) 2003-2004 Fabrice Bellard +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ +#ifndef MONITOR_COMMON_H +#define MONITOR_COMMON_H + +#define MD_TLONG 0 +#define MD_I32 1 + +typedef struct MonitorDef { +const char *name; +int offset; +target_long (*get_value)(const struct MonitorDef *md,int val); +int type; +}MonitorDef ; + +const MonitorDef *target_monitor_defs (void ); + +CPUArchState *mon_get_cpu_env (void ); + +void hmp_info_mem (Monitor *mon,const QDict *qdict); +void hmp_info_tlb (Monitor *mon,const QDict *qdict); +void hmp_mce (Monitor *mon,const QDict *qdict); + +#endif /* MONITOR_COMMON */
include/qemu/typedefs.h +1 -0
@@ -80,5 +80,6 @@ typedef struct SSIBus SSIBus;typedef struct uWireSlave uWireSlave ;typedef struct VirtIODevice VirtIODevice ;typedef struct Visitor Visitor ; +typedef struct MonitorDef MonitorDef ;#endif /* QEMU_TYPEDEFS_H */
monitor.c +8 -852
898 lines not on this page · raw message
qemu-monitor-info.texi new file +151 -0
151 lines not on this page · raw message
stubs/Makefile.objs +1 -0
@@ -38,3 +38,4 @@ stub-obj-$(CONFIG_WIN32) += fd-register.o stub-obj-y += cpus.o stub-obj-y += kvm.o stub-obj-y += qmp_pc_dimm_device_list.o +stub-obj-y += target-monitor-defs.o
stubs/target-monitor-defs.c new file +9 -0
@@ -0,0 +1,9 @@ +#include "stddef.h" +#include "qemu/typedefs.h" + +const MonitorDef *target_monitor_defs (void ) __attribute__((weak)); + +const MonitorDef *target_monitor_defs (void ) +{ +return NULL ; +}
target-i386/Makefile.objs +1 -1
@@ -2,6 +2,6 @@ obj-y += translate.o helper.o cpu.o obj-y += excp_helper.o fpu_helper.o cc_helper.o int_helper.o svm_helper.o obj-y += smm_helper.o misc_helper.o mem_helper.o seg_helper.o obj-y += gdbstub.o -obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o +obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o monitor.o obj-$(CONFIG_KVM) += kvm.o obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
target-i386/monitor.c new file +494 -0
494 lines not on this page · raw message
target-ppc/Makefile.objs +1 -1
@@ -1,7 +1,7 @@ obj-y += cpu-models.o obj-y += translate.o ifeq ($(CONFIG_SOFTMMU),y) -obj-y += machine.o mmu_helper.o mmu-hash32.o +obj-y += machine.o mmu_helper.o mmu-hash32.o monitor.o obj-$(TARGET_PPC64) += mmu-hash64.o arch_dump.o endif obj-$(CONFIG_KVM) += kvm.o kvm_ppc.o
target-ppc/monitor.c new file +255 -0
255 lines not on this page · raw message
target-sh4/Makefile.objs +1 -0
@@ -1,2 +1,3 @@ obj-y += translate.o op_helper.o helper.o cpu.o +obj-$(CONFIG_SOFTMMU) += monitor.o obj-y += gdbstub.o
target-sh4/monitor.c new file +52 -0
52 lines not on this page · raw message
target-sparc/Makefile.objs +1 -1
@@ -1,4 +1,4 @@ -obj-$(CONFIG_SOFTMMU) += machine.o +obj-$(CONFIG_SOFTMMU) += machine.o monitor.o obj-y += translate.o helper.o cpu.o obj-y += fop_helper.o cc_helper.o win_helper.o mmu_helper.o ldst_helper.o obj-$(TARGET_SPARC) += int32_helper.o
target-sparc/monitor.c new file +158 -0
158 lines not on this page · raw message
target-xtensa/Makefile.objs +1 -0
@@ -2,5 +2,6 @@ obj-y += xtensa-semi.o obj-y += core-dc232b.o obj-y += core-dc233c.o obj-y += core-fsf.o +obj-$(CONFIG_SOFTMMU) += monitor.o obj-y += translate.o op_helper.o helper.o cpu.o obj-y += gdbstub.o
target-xtensa/monitor.c new file +34 -0
@@ -0,0 +1,34 @@ +/* +* QEMU monitor +* +* Copyright (c) 2003-2004 Fabrice Bellard +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ +#include "cpu.h" +#include "monitor/monitor.h" +#include "monitor/monitor-common.h" +#include "hmp.h" + +void hmp_info_tlb (Monitor *mon,const QDict *qdict) +{ +CPUArchState *env1 =mon_get_cpu_env (); + +dump_mmu ((FILE *)mon, (fprintf_function )monitor_printf, env1); +}
Signature · 1 line
2.1.4
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
Quoted 1 line · Denis V. Lunev
qemu-monitor-info.texi | 151 +++++++
This should be added in patch 4, not now.
stubs/target-monitor-defs.c line 9
Quoted 6 lines
stubs/target-monitor-defs.c new file +6
-0+const MonitorDef *target_monitor_defs (void ) __attribute__((weak)); + +const MonitorDef *target_monitor_defs (void ) +{ +return NULL ; +}
Weak symbols do not work on all platforms. Luckily, making libqemustub a static library gets exactly the same result without the need for weak
symbols: the definition from the QEMU object files will hide the stub.
You just need to remove __attribute__((weak)), and it should just work.
Otherwise, the patches look good to me. Luiz, do you have time to post a pull request for v4, or do you want to pass HMP maintainership as well to someone else?
Paolo
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
Quoted 18 lines · Paolo Bonzini
Quoted 1 line · Denis V. Lunev
qemu-monitor-info.texi | 151 +++++++This should be added in patch 4, not now.
stubs/target-monitor-defs.c line 9
Quoted 6 lines
stubs/target-monitor-defs.c new file +6
-0+const MonitorDef *target_monitor_defs (void ) __attribute__((weak)); + +const MonitorDef *target_monitor_defs (void ) +{ +return NULL ; +}Weak symbols do not work on all platforms. Luckily, making libqemustub a static library gets exactly the same result without the need for weak
symbols: the definition from the QEMU object files will hide the stub.
Quoted 5 lines
You just need to remove __attribute__((weak)), and it should just work.
Otherwise, the patches look good to me. Luiz, do you have time to post a pull request for v4, or do you want to pass HMP maintainership as well to someone else?
Didn't look at the patch, but Patchew is catching this for cross build:
running command: /tmp/qemu-build/configure --prefix=/var/tmp/qemu-build-install --cross-prefix=x86_64-w64-mingw32- --target-list=x86_64-softmmu,aarch64-softmmu ... running command: make -j2 ...
Failed:
[snip]
CC aarch64-softmmu/target-arm/kvm-stub.o CC aarch64-softmmu/target-arm/translate.o CC aarch64-softmmu/target-arm/op_helper.o CC aarch64-softmmu/target-arm/helper.o CC aarch64-softmmu/target-arm/cpu.o CC aarch64-softmmu/target-arm/neon_helper.o CC aarch64-softmmu/target-arm/iwmmxt_helper.o CC aarch64-softmmu/target-arm/gdbstub.o CC aarch64-softmmu/target-arm/psci.o CC aarch64-softmmu/target-arm/cpu64.o CC aarch64-softmmu/target-arm/translate-a64.o CC aarch64-softmmu/target-arm/helper-a64.o CC aarch64-softmmu/target-arm/gdbstub64.o CC aarch64-softmmu/target-arm/crypto_helper.o GEN trace/generated-helpers.c CC aarch64-softmmu/gdbstub-xml.o CC aarch64-softmmu/trace/generated-helpers.o LINK aarch64-softmmu/qemu-system-aarch64w.exe
monitor.o: In function `get_monitor_def':/tmp/qemu-build/monitor.c:2091: undefined reference to `target_monitor_defs'
collect2: error: ld returned 1 exit status
Makefile:184: recipe for target 'qemu-system-aarch64w.exe' failed make[1]: *** [qemu-system-aarch64w.exe] Error 1
Makefile:179: recipe for target 'subdir-aarch64-softmmu' failed
make: *** [subdir-aarch64-softmmu] Error 2
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
Quoted 45 lines · Fam Zheng
Quoted 15 lines · Paolo Bonzini
Quoted 1 line · Denis V. Lunev
qemu-monitor-info.texi | 151 +++++++This should be added in patch 4, not now.
stubs/target-monitor-defs.c line 9
Quoted 6 lines
stubs/target-monitor-defs.c new file +6
-0+const MonitorDef *target_monitor_defs (void ) __attribute__((weak)); + +const MonitorDef *target_monitor_defs (void ) +{ +return NULL ; +}Weak symbols do not work on all platforms. Luckily, making libqemustub a static library gets exactly the same result without the need for weak
symbols: the definition from the QEMU object files will hide the stub.Quoted 5 lines
You just need to remove __attribute__((weak)), and it should just work.
Otherwise, the patches look good to me. Luiz, do you have time to post a pull request for v4, or do you want to pass HMP maintainership as well to someone else?
Didn't look at the patch, but Patchew is catching this for cross build:
running command:
/tmp/qemu-build/configure--prefix=/var/tmp/qemu-build-install --cross-prefix=x86_64-w64-mingw32- --target-list=x86_64-softmmu,aarch64-softmmu ... running command: make -j2 ...
Failed:
[snip]CC aarch64-softmmu/target-arm/kvm-stub.o CC aarch64-softmmu/target-arm/translate.o CC aarch64-softmmu/target-arm/op_helper.o CC aarch64-softmmu/target-arm/helper.o CC aarch64-softmmu/target-arm/cpu.o CC aarch64-softmmu/target-arm/neon_helper.o CC aarch64-softmmu/target-arm/iwmmxt_helper.o CC aarch64-softmmu/target-arm/gdbstub.o CC aarch64-softmmu/target-arm/psci.o CC aarch64-softmmu/target-arm/cpu64.o CC aarch64-softmmu/target-arm/translate-a64.o CC aarch64-softmmu/target-arm/helper-a64.o CC aarch64-softmmu/target-arm/gdbstub64.o CC aarch64-softmmu/target-arm/crypto_helper.o GEN trace/generated-helpers.c CC aarch64-softmmu/gdbstub-xml.o CC aarch64-softmmu/trace/generated-helpers.o LINK aarch64-softmmu/qemu-system-aarch64w.exe
Quoted 7 lines
monitor.o: In function `get_monitor_def':
/tmp/qemu-build/monitor.c:2091: undefined reference to `target_monitor_defs'
collect2: error: ld returned 1 exit status
Makefile:184: recipe for target 'qemu-system-aarch64w.exe' failed make[1]: *** [qemu-system-aarch64w.exe] Error 1
Makefile:179: recipe for target 'subdir-aarch64-softmmu' failed
make: *** [subdir-aarch64-softmmu] Error 2
As it turned out, this reaction occurs when using a weak symbol.
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
In reply to Paolo BonziniQuoted 18 lines · On Tue, 8 Sep 2015 11:54:46 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 1 line · Denis V. Lunev
qemu-monitor-info.texi | 151 +++++++This should be added in patch 4, not now.
stubs/target-monitor-defs.c line 9
Quoted 6 lines
stubs/target-monitor-defs.c new file +6
-0+const MonitorDef *target_monitor_defs (void ) __attribute__((weak)); + +const MonitorDef *target_monitor_defs (void ) +{ +return NULL ; +}Weak symbols do not work on all platforms. Luckily, making libqemustub a static library gets exactly the same result without the need for weak
symbols: the definition from the QEMU object files will hide the stub.
Quoted 5 lines
You just need to remove __attribute__((weak)), and it should just work.
Otherwise, the patches look good to me. Luiz, do you have time to post a pull request for v4, or do you want to pass HMP maintainership as well to someone else?
It would be great to pass it to someone else.
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
Quoted 14 lines
Quoted 14 lines
This should be added in patch 4, not now.
stubs/target-monitor-defs.c line 9
Quoted 6 lines
stubs/target-monitor-defs.c new file +6
-0+const MonitorDef *target_monitor_defs (void ) __attribute__((weak)); + +const MonitorDef *target_monitor_defs (void ) +{ +return NULL ; +}Weak symbols do not work on all platforms. Luckily, making libqemustub a static library gets exactly the same result without the need for weak
symbols: the definition from the QEMU object files will hide the stub.
Quoted 7 lines
Quoted 5 lines
You just need to remove __attribute__((weak)), and it should just work.
Otherwise, the patches look good to me. Luiz, do you have time to post a pull request for v4, or do you want to pass HMP maintainership as well to someone else?
It would be great to pass it to someone else.
I can take the next version of these patches then. However, please make that someone else also be someone other than me. :-)
Paolo
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
Quoted 16 lines · On Tue, 8 Sep 2015 09:04:56 -0400 (EDT) Paolo Bonzini <[email protected]>…
Quoted 16 lines
Quoted 16 lines
This should be added in patch 4, not now.
stubs/target-monitor-defs.c line 9
Quoted 6 lines
stubs/target-monitor-defs.c new file +6
-0+const MonitorDef *target_monitor_defs (void ) __attribute__((weak)); + +const MonitorDef *target_monitor_defs (void ) +{ +return NULL ; +}Weak symbols do not work on all platforms. Luckily, making libqemustub a static library gets exactly the same result without the need for weak
symbols: the definition from the QEMU object files will hide the stub.You just need to remove __attribute__((weak)), and it should just work.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Otherwise, the patches look good to me. Luiz, do you have time to post a pull request for v4, or do you want to pass HMP maintainership as well to someone else?
It would be great to pass it to someone else.
I can take the next version of these patches then.
Thanks a lot! These are the patches I have pending for review:
- [PATCH qemu 0/2] monitor/ppc: Print correct SPRs
- [PATCH] trace-events: Add hmp completion
- [PATCH v3 0/4] Move target- and device specific code from monitor
Quoted 2 lines
However, please make that
someone else also be someone other than me. :-)
Well, we've always been short on maintainers...
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
Quoted 4 lines
Thanks a lot! These are the patches I have pending for review:
- [PATCH qemu 0/2] monitor/ppc: Print correct SPRs
CCing PPC maintainer (who's also on leave, but can suggest someone).
Quoted 1 line
- [PATCH] trace-events: Add hmp completion
CCing trace maintainer.
Quoted 1 line
- [PATCH v3 0/4] Move target- and device specific code from monitor
I'll take care of v4 for this one.
Quoted 4 lines
Quoted 2 lines
However, please make that
someone else also be someone other than me. :-)Well, we've always been short on maintainers...
The above should make it clear(er) that I am not going to be the HMP maintainer. :-)
Paolo
Re: [Qemu-devel] [PATCH 2/4] monitor: remove target-specific code from monitor.c
Quoted 10 lines · Paolo Bonzini
Quoted 4 lines
Thanks a lot! These are the patches I have pending for review:
- [PATCH qemu 0/2] monitor/ppc: Print correct SPRs
CCing PPC maintainer (who's also on leave, but can suggest someone).
Quoted 1 line
- [PATCH] trace-events: Add hmp completion
CCing trace maintainer.
I can take this through the tracing tree if there are no resources to have a monitor tree at the moment.
PATCH v3 3/4 hmp-commands.hx: fix end of table info
In reply to Denis V. LunevFrom: Pavel Butsykin <[email protected]>
The table info(information about the system state) closes earlier and some of its elements are outside(trace-events, rocker, etc). This can be confusing and lead to additional bugs.
--- hmp-commands.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
hmp-commands.hx +4 -1
@@ -1811,7 +1811,6 @@ show the memory devices Display the value of a storage key (s390 only) @item info iothreads show iothreads -@end table ETEXI STEXI
@@ -1846,3 +1845,7 @@ ETEXI STEXI @end table ETEXI + +STEXI +@end table +ETEXI
Signature · 1 line
2.1.4
PATCH v3 4/4 monitor: added generation of documentation for hmp-commands-info.hx
In reply to Denis V. LunevFrom: Pavel Butsykin <[email protected]>
It will be easier if you need to add info-commands to edit only hmp-commands-info.hx, before this had to edit monitor.c and hmp-commands.hx
--- .gitignore | 1 + Makefile | 10 ++-- hmp-commands-info.hx | 8 ++++ hmp-commands.hx | 123 ------------------------------------------------- qemu-doc.texi | 2 + qemu-monitor-info.texi | 6 +++ 6 files changed, 24 insertions(+), 126 deletions(-)
.gitignore +1 -0
@@ -49,6 +49,7 @@ /qemu-ga /qemu-bridge-helper /qemu-monitor.texi +/qemu-monitor-info.texi /qmp-commands.txt /vscclient /fsdev/virtfs-proxy-helper
Makefile +7 -3
@@ -344,7 +344,7 @@ qemu-%.tar.bz2: $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)" distclean: clean - rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi + rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi rm -f config-all-devices.mak config-all-disas.mak config.status rm -f po/*.mo tests/qemu-iotests/common.env rm -f roms/seabios/config.mak roms/vgabios/config.mak
@@ -511,13 +511,16 @@ qemu-options.texi: $(SRC_PATH)/qemu-options.hx qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") +qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx + $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") + qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@") qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") -qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi +qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi $(call quiet-command, \ perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \
@@ -560,7 +563,8 @@ pdf: qemu-doc.pdf qemu-tech.pdf qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ qemu-img.texi qemu-nbd.texi qemu-options.texi \ - qemu-monitor.texi qemu-img-cmds.texi qemu-ga.texi + qemu-monitor.texi qemu-img-cmds.texi qemu-ga.texi \ + qemu-monitor-info.texi ifdef CONFIG_WIN32
hmp-commands-info.hx +8 -0
@@ -7,6 +7,10 @@ HXCOMM HXCOMM can be used for comments, discarded from both texi and C STEXI @table @option +@item info @var{subcommand} +@findex info +Show various information about the system state. +@table @option ETEXI {
@@ -739,3 +743,7 @@ ETEXI STEXI @end table ETEXI + +STEXI +@end table +ETEXI
hmp-commands.hx +0 -123
128 lines not on this page · raw message
qemu-doc.texi +2 -0
@@ -391,6 +391,8 @@ The following commands are available: @include qemu-monitor.texi +@include qemu-monitor-info.texi + @subsection Integer expressions The monitor understands integers expressions for every integer
qemu-monitor-info.texi +6 -0
@@ -135,6 +135,9 @@ Show memory backends @item info memory-devices @findex memory-devices Show memory devices. +@item info iothreads +@findex iothreads +Show iothread's identifiers. @item info rocker @var{name} @findex rocker Show rocker switch.
@@ -147,5 +150,8 @@ Show rocker OF-DPA flow tables. @item info rocker-of-dpa-groups @var{name} [@var{type}] @findex rocker-of-dpa-groups Show rocker OF-DPA groups. +@item info skeys @var{address} +@findex skeys +Display the value of a storage key (s390 only) @end table @end table
Signature · 1 line
2.1.4