fce2b91f | 08-Mar-2020 |
Maxim Levitsky <mlevitsk@redhat.com> |
monitor/hmp: move hmp_snapshot_* to block-hmp-cmds.c
hmp_snapshot_blkdev is from GPLv2 version of the hmp-cmds.c thus have to change the licence to GPLv2
Signed-off-by: Maxim Levitsky <mlevitsk@red
monitor/hmp: move hmp_snapshot_* to block-hmp-cmds.c
hmp_snapshot_blkdev is from GPLv2 version of the hmp-cmds.c thus have to change the licence to GPLv2
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200308092440.23564-8-mlevitsk@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
6b7fbf61 | 08-Mar-2020 |
Maxim Levitsky <mlevitsk@redhat.com> |
monitor/hmp: move hmp_block_job* to block-hmp-cmds.c
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200308092440.23564-7
monitor/hmp: move hmp_block_job* to block-hmp-cmds.c
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200308092440.23564-7-mlevitsk@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
0932e3f2 | 08-Mar-2020 |
Maxim Levitsky <mlevitsk@redhat.com> |
monitor/hmp: move hmp_drive_mirror and hmp_drive_backup to block-hmp-cmds.c
Moved code was added after 2012-01-13, thus under GPLv2+
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by:
monitor/hmp: move hmp_drive_mirror and hmp_drive_backup to block-hmp-cmds.c
Moved code was added after 2012-01-13, thus under GPLv2+
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200308092440.23564-6-mlevitsk@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Fixed commit message
show more ...
|
a2dde2f2 | 08-Mar-2020 |
Maxim Levitsky <mlevitsk@redhat.com> |
monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c
These days device-hotplug.c only contains the hmp_drive_add In the next patch, rest of hmp_drive* functions will be moved there
monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c
These days device-hotplug.c only contains the hmp_drive_add In the next patch, rest of hmp_drive* functions will be moved there.
Also add block-hmp-cmds.h to contain prototypes of these functions
License for block-hmp-cmds.h since it contains the code moved from sysemu.h which lacks license and thus according to LICENSE is under GPLv2+
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200308092440.23564-4-mlevitsk@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
916c9250 | 02-Mar-2020 |
Chen Qun <kuhn.chenqun@huawei.com> |
monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups()
Clang static code analyzer show warning: monitor/hmp-cmds.c:2867:17: warning: Value stored to 'set' is never read
monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups()
Clang static code analyzer show warning: monitor/hmp-cmds.c:2867:17: warning: Value stored to 'set' is never read set = true; ^ ~~~~
Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200302130715.29440-14-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
2af282ec | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
qemu-storage-daemon: Add --monitor option
This adds and parses the --monitor option, so that a QMP monitor can be used in the storage daemon. The monitor offers commands defined in the QAPI schema a
qemu-storage-daemon: Add --monitor option
This adds and parses the --monitor option, so that a QMP monitor can be used in the storage daemon. The monitor offers commands defined in the QAPI schema at storage-daemon/qapi/qapi-schema.json.
The --monitor options currently allows to create multiple monitors with the same ID. This part of the interface is considered unstable. We will reject such configurations as soon as we have a design for the monitor subsystem to perform these checks. (In the system emulator, we depend on QemuOpts rejecting duplicate IDs.)
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-21-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
a2f411c4 | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
monitor: Add allow_hmp parameter to monitor_init()
Add a new parameter allow_hmp to monitor_init() so that the storage daemon can disable HMP.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-I
monitor: Add allow_hmp parameter to monitor_init()
Add a new parameter allow_hmp to monitor_init() so that the storage daemon can disable HMP.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-20-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
8e9119a8 | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
hmp: Fail gracefully if chardev is already in use
Trying to attach a HMP monitor to a chardev that is already in use results in a crash because monitor_init_hmp() passes &error_abort to qemu_chr_fe_
hmp: Fail gracefully if chardev is already in use
Trying to attach a HMP monitor to a chardev that is already in use results in a crash because monitor_init_hmp() passes &error_abort to qemu_chr_fe_init():
$ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo --mon foo QEMU 4.2.50 monitor - type 'help' for more information (qemu) Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220: qemu-system-x86_64: --mon foo: Device 'foo' is in use Abgebrochen (Speicherabzug geschrieben)
Fix this by allowing monitor_init_hmp() to return an error and passing any error in qemu_chr_fe_init() to its caller instead of aborting.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-19-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
f27a9bb3 | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
qmp: Fail gracefully if chardev is already in use
Trying to attach a QMP monitor to a chardev that is already in use results in a crash because monitor_init_qmp() passes &error_abort to qemu_chr_fe_
qmp: Fail gracefully if chardev is already in use
Trying to attach a QMP monitor to a chardev that is already in use results in a crash because monitor_init_qmp() passes &error_abort to qemu_chr_fe_init():
$ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo,mode=control --mon foo,mode=control Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220: qemu-system-x86_64: --mon foo,mode=control: Device 'foo' is in use Abgebrochen (Speicherabzug geschrieben)
Fix this by allowing monitor_init_qmp() to return an error and passing any error in qemu_chr_fe_init() to its caller instead of aborting.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-18-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
f2098725 | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
monitor: Create QAPIfied monitor_init()
This adds a new QAPI-based monitor_init() function. The existing monitor_init_opts() is rewritten to simply put its QemuOpts parameter into a visitor and pass
monitor: Create QAPIfied monitor_init()
This adds a new QAPI-based monitor_init() function. The existing monitor_init_opts() is rewritten to simply put its QemuOpts parameter into a visitor and pass the resulting QAPI object to monitor_init().
This will cause some change in those error messages for the monitor options in the system emulator that are now generated by the visitor rather than explicitly checked in monitor_init_opts().
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-17-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
c62d24e9 | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
blockdev-nbd: Boxed argument type for nbd-server-add
Move the arguments of nbd-server-add to a new struct BlockExportNbd and convert the command to 'boxed': true. This makes it easier to share code
blockdev-nbd: Boxed argument type for nbd-server-add
Move the arguments of nbd-server-add to a new struct BlockExportNbd and convert the command to 'boxed': true. This makes it easier to share code with the storage daemon.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-11-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
5f07c4d6 | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
qapi: Flatten object-add
Mapping object-add to the command line as is doesn't result in nice syntax because of the nesting introduced with 'props'. This becomes nicer and more consistent with device
qapi: Flatten object-add
Mapping object-add to the command line as is doesn't result in nice syntax because of the nesting introduced with 'props'. This becomes nicer and more consistent with device_add and netdev_add when we accept properties for the object on the top level instead.
'props' is still accepted after this patch, but marked as deprecated.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-8-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
5a16818b | 24-Feb-2020 |
Kevin Wolf <kwolf@redhat.com> |
block: Move sysemu QMP commands to QAPI block module
QMP commands that are related to the system emulator and don't make sense in the context of tools such as qemu-storage-daemon should live in qapi
block: Move sysemu QMP commands to QAPI block module
QMP commands that are related to the system emulator and don't make sense in the context of tools such as qemu-storage-daemon should live in qapi/block.json rather than qapi/block-core.json. Move them there.
The associated data types are actually also used in code shared with the tools, so they stay in block-core.json.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-6-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
6a9ad154 | 23-Jan-2020 |
Juan Quintela <quintela@redhat.com> |
multifd: Add multifd-zstd-level parameter
This parameter specifies the zstd compression level. The next patch will put it to use.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Pet
multifd: Add multifd-zstd-level parameter
This parameter specifies the zstd compression level. The next patch will put it to use.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
9004db48 | 23-Jan-2020 |
Juan Quintela <quintela@redhat.com> |
multifd: Add multifd-zlib-level parameter
This parameter specifies the zlib compression level. The next patch will put it to use.
Signed-off-by: Juan Quintela <quintela@redhat.com> Acked-by: Markus
multifd: Add multifd-zlib-level parameter
This parameter specifies the zlib compression level. The next patch will put it to use.
Signed-off-by: Juan Quintela <quintela@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
show more ...
|
96eef042 | 16-Jan-2019 |
Juan Quintela <quintela@redhat.com> |
multifd: Add multifd-compression parameter
This will store the compression method to use. We start with none.
Signed-off-by: Juan Quintela <quintela@redhat.com> Acked-by: Markus Armbruster <armbru
multifd: Add multifd-compression parameter
This will store the compression method to use. We start with none.
Signed-off-by: Juan Quintela <quintela@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
Rename multifd-method to multifd-compression
show more ...
|
facda544 | 20-Jan-2020 |
Peter Krempa <pkrempa@redhat.com> |
qapi: Allow getting flat output from 'query-named-block-nodes'
When a management application manages node names there's no reason to recurse into backing images in the output of query-named-block-no
qapi: Allow getting flat output from 'query-named-block-nodes'
When a management application manages node names there's no reason to recurse into backing images in the output of query-named-block-nodes.
Add a parameter to the command which will return just the top level structs.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Message-Id: <4470f8c779abc404dcf65e375db195cd91a80651.1579509782.git.pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [mreitz: Fixed coding style] Signed-off-by: Max Reitz <mreitz@redhat.com>
show more ...
|
7d3f5053 | 29-Jan-2020 |
Kevin Wolf <kwolf@redhat.com> |
monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c
monitor/misc.c contains code that works only in the system emulator, so it can't be linked to tools like a storage daemon. In order to make s
monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c
monitor/misc.c contains code that works only in the system emulator, so it can't be linked to tools like a storage daemon. In order to make schema introspection available for tools, move the function to monitor/qmp-cmds-control.c, which can be linked into the storage daemon.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200129102239.31435-5-kwolf@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
56762816 | 29-Jan-2020 |
Kevin Wolf <kwolf@redhat.com> |
monitor: Collect "control" command handlers in qmp-cmds.control.c
Move all of the QMP commands handlers to implement the 'control' module (qapi/control.json) that can be shared between the system em
monitor: Collect "control" command handlers in qmp-cmds.control.c
Move all of the QMP commands handlers to implement the 'control' module (qapi/control.json) that can be shared between the system emulator and tools such as a storage daemon to a new file monitor/qmp-cmds-control.c.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200129102239.31435-4-kwolf@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
fa4dcf57 | 29-Jan-2020 |
Kevin Wolf <kwolf@redhat.com> |
qapi: Split control.json off misc.json
misc.json contains definitions that are related to the system emulator, so it can't be used for other tools like the storage daemon. This patch moves basic fun
qapi: Split control.json off misc.json
misc.json contains definitions that are related to the system emulator, so it can't be used for other tools like the storage daemon. This patch moves basic functionality that is shared between all tools (and mostly related to the monitor itself) into a new control.json, which could be used in tools as well.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200129102239.31435-3-kwolf@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
c3e95551 | 29-Jan-2020 |
Kevin Wolf <kwolf@redhat.com> |
monitor: Move monitor option parsing to monitor/monitor.c
Both the system emulators and tools with QMP support (specifically, the planned storage daemon) will need to parse monitor options, so move
monitor: Move monitor option parsing to monitor/monitor.c
Both the system emulators and tools with QMP support (specifically, the planned storage daemon) will need to parse monitor options, so move that code to monitor/monitor.c, which can be linked into binaries that aren't a system emulator.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200129102239.31435-2-kwolf@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
5b7686f3 | 06-Feb-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-02-06' into staging
nbd patches for 2020-02-06
- Allow setting NBD description from QMP for parity with qemu-nbd - Remove deprecated '
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-02-06' into staging
nbd patches for 2020-02-06
- Allow setting NBD description from QMP for parity with qemu-nbd - Remove deprecated 'qemu-nbd --partition'
# gpg: Signature made Thu 06 Feb 2020 12:50:46 GMT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-nbd-2020-02-06: qemu-nbd: Removed deprecated --partition option docs: Fix typo in qemu-nbd -P replacement nbd: Allow description when creating NBD blockdev
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
a661614d | 15-Jan-2020 |
Chen Qun <kuhn.chenqun@huawei.com> |
monitor: fix memory leak in monitor_fdset_dup_fd_find_remove
When remove dup_fd in monitor_fdset_dup_fd_find_remove function, we need to free mon_fdset_fd_dup. ASAN shows memory leak stack:
Direct
monitor: fix memory leak in monitor_fdset_dup_fd_find_remove
When remove dup_fd in monitor_fdset_dup_fd_find_remove function, we need to free mon_fdset_fd_dup. ASAN shows memory leak stack:
Direct leak of 96 byte(s) in 3 object(s) allocated from: #0 0xfffd37b033b3 in __interceptor_calloc (/lib64/libasan.so.4+0xd33b3) #1 0xfffd375c71cb in g_malloc0 (/lib64/libglib-2.0.so.0+0x571cb) #2 0xaaae25bf1c17 in monitor_fdset_dup_fd_add /qemu/monitor/misc.c:1724 #3 0xaaae265cfd8f in qemu_open /qemu/util/osdep.c:315 #4 0xaaae264e2b2b in qmp_chardev_open_file_source /qemu/chardev/char-fd.c:122 #5 0xaaae264e47cf in qmp_chardev_open_file /qemu/chardev/char-file.c:81 #6 0xaaae264e118b in qemu_char_open /qemu/chardev/char.c:237 #7 0xaaae264e118b in qemu_chardev_new /qemu/chardev/char.c:964 #8 0xaaae264e1543 in qemu_chr_new_from_opts /qemu/chardev/char.c:680 #9 0xaaae25e12e0f in chardev_init_func /qemu/vl.c:2083 #10 0xaaae26603823 in qemu_opts_foreach /qemu/util/qemu-option.c:1170 #11 0xaaae258c9787 in main /qemu/vl.c:4089 #12 0xfffd35b80b9f in __libc_start_main (/lib64/libc.so.6+0x20b9f) #13 0xaaae258d7b63 (/qemu/build/aarch64-softmmu/qemu-system-aarch64+0x8b7b63)
Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200115072016.167252-1-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
deb6ccb0 | 13-Nov-2019 |
Eric Blake <eblake@redhat.com> |
nbd: Allow description when creating NBD blockdev
Allow blockdevs to match the feature already present in qemu-nbd -D. Enhance iotest 223 to cover it.
Signed-off-by: Eric Blake <eblake@redhat.com>
nbd: Allow description when creating NBD blockdev
Allow blockdevs to match the feature already present in qemu-nbd -D. Enhance iotest 223 to cover it.
Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20191114024635.11363-5-eblake@redhat.com>
show more ...
|
91590159 | 10-Jan-2020 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qdev: move helper function to monitor/misc
Move the one-user function to the place it is being used.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Dau
qdev: move helper function to monitor/misc
Move the one-user function to the place it is being used.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200110153039.1379601-5-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|