- Jun 12, 2015
-
-
Scott Feldman authored
Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port configurations. Some examples: (qemu) info rocker sw1 name: sw1 id: 0x0000013512005452 ports: 4 (qemu) info rocker-ports sw1 ena/ speed/ auto port link duplex neg? sw1.1 up 10G FD No sw1.2 up 10G FD No sw1.3 !ena 10G FD No sw1.4 !ena 10G FD No (qemu) info rocker-of-dpa-flows sw1 prio tbl hits key(mask) --> actions 2 60 pport 1 vlan 1 LLDP src 00:02:00:00:02:00 dst 01:80:c2:00:00:0e 2 60 pport 1 vlan 1 ARP src 00:02:00:00:02:00 dst 00:02:00:00:03:00 2 60 pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:00:02 proto 58 3 50 vlan 2 dst 33:33:ff:00:00:02 --> write group 0x32000001 goto tbl 60 2 60 pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:03:00 proto 58 3 50 1 vlan 2 dst 33:33:ff:00:03:00 --> write group 0x32000001 goto tbl 60 2 60 pport 2 vlan 2 ARP src 00:02:00:00:03:00 dst 00:02:00:00:02:00 3 50 2 vlan 2 dst 00:02:00:00:02:00 --> write group 0x02000001 goto tbl 60 2 60 1 pport 2 vlan 2 IP src 00:02:00:00:03:00 dst 00:02:00:00:02:00 proto 1 3 50 2 vlan 1 dst 00:02:00:00:03:00 --> write group 0x01000002 goto tbl 60 2 60 1 pport 1 vlan 1 IP src 00:02:00:00:02:00 dst 00:02:00:00:03:00 proto 1 2 60 pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:00:01 proto 58 3 50 vlan 1 dst 33:33:ff:00:00:01 --> write group 0x31000000 goto tbl 60 2 60 pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:02:00 proto 58 3 50 1 vlan 1 dst 33:33:ff:00:02:00 --> write group 0x31000000 goto tbl 60 1 60 173 pport 2 vlan 2 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x02000000 1 60 6 pport 2 vlan 2 IPv6 src <any> dst <any> --> write group 0x02000000 1 60 174 pport 1 vlan 1 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x01000000 1 60 174 pport 2 vlan 2 IP src <any> dst <any> --> write group 0x02000000 1 60 6 pport 1 vlan 1 IPv6 src <any> dst <any> --> write group 0x01000000 1 60 181 pport 2 vlan 2 ARP src <any> dst <any> --> write group 0x02000000 1 10 715 pport 2 --> apply new vlan 2 goto tbl 20 1 60 177 pport 1 vlan 1 ARP src <any> dst <any> --> write group 0x01000000 1 60 174 pport 1 vlan 1 IP src <any> dst <any> --> write group 0x01000000 1 10 717 pport 1 --> apply new vlan 1 goto tbl 20 1 0 1432 pport 0(0xffff) --> goto tbl 10 (qemu) info rocker-of-dpa-groups sw1 id (decode) --> buckets 0x32000001 (type L2 multicast vlan 2 index 1) --> groups [0x02000001,0x02000000] 0x02000001 (type L2 interface vlan 2 pport 1) --> pop vlan out pport 1 0x01000002 (type L2 interface vlan 1 pport 2) --> pop vlan out pport 2 0x02000000 (type L2 interface vlan 2 pport 0) --> pop vlan out pport 0 0x01000000 (type L2 interface vlan 1 pport 0) --> pop vlan out pport 0 0x31000000 (type L2 multicast vlan 1 index 0) --> groups [0x01000002,0x01000000] [Added "query-" prefixes to rocker.json commands as suggested by Eric Blake <eblake@redhat.com>. --Stefan] Signed-off-by:
Scott Feldman <sfeldma@gmail.com> Signed-off-by:
Jiri Pirko <jiri@resnulli.us> Message-id: 1433985681-56138-5-git-send-email-sfeldma@gmail.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 02, 2015
-
-
Markus Armbruster authored
All QMP commands use the "new" handler interface (mhandler.cmd_new). Most HMP commands still use the traditional interface (mhandler.cmd), but a few use the "new" one. Complicates handle_user_command() for no gain, so I'm converting these to the traditional interface. pcie_aer_inject_error's implementation is split into the hmp_pcie_aer_inject_error() and pcie_aer_inject_error_print(). The former is a peculiar crossbreed between HMP and QMP handler. On success, it works like a QMP handler: store QDict through ret_data parameter, return 0. Printing the QDict is left to pcie_aer_inject_error_print(). On failure, it works more like an HMP handler: print error to monitor, return negative number. To convert to the traditional interface, turn pcie_aer_inject_error_print() into a command handler wrapping around hmp_pcie_aer_inject_error(). By convention, this command handler should be called hmp_pcie_aer_inject_error(), so rename the existing hmp_pcie_aer_inject_error() to do_pcie_aer_inject_error(). Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Markus Armbruster authored
All QMP commands use the "new" handler interface (mhandler.cmd_new). Most HMP commands still use the traditional interface (mhandler.cmd), but a few use the "new" one. Complicates handle_user_command() for no gain, so I'm converting these to the traditional interface. For device_add, that's easy: just wrap the obvious hmp_device_add() around do_device_add(). monitor_user_noop() is now unused, drop it. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Markus Armbruster authored
All QMP commands use the "new" handler interface (mhandler.cmd_new). Most HMP commands still use the traditional interface (mhandler.cmd), but a few use the "new" one. Complicates handle_user_command() for no gain, so I'm converting these to the traditional interface. For drive_del, that's easy: hmp_drive_del() sheds its unused last parameter, and its return value, which the caller ignored anyway. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Markus Armbruster authored
Protocol must be spice, vnc isn't implemented. Fix up documentation. Attempts to use vnc or any other unknown protocol yield the misleading error message "Invalid parameter 'protocol'". Improve it to "Parameter 'protocol' expects spice". Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by. Gerd Hoffmann <kraxel@redhat.com> Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- May 07, 2015
-
-
Liang Li authored
Add the hmp interface to tune and query the parameters used in live migration. Signed-off-by:
Liang Li <liang.z.li@intel.com> Signed-off-by:
Yang Zhang <yang.z.zhang@intel.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- Apr 27, 2015
-
-
Markus Armbruster authored
Live migration with spice works like this today: (1) client_migrate_info monitor cmd (2) spice server notifies client, client connects to target host. (3) qemu waits until spice client connect is finished. (4) send over vmstate (i.e. main part of live migration). (5) spice handover to target host. (3) is implemented by making client_migrate_info a async monitor command. This is the only async monitor command we have. The original reason to implement this dance was that qemu did not accept new tcp connections while the incoming migration was running, so (2) and (4) could not be done in parallel. That issue was fixed long ago though. Qemu version 1.3.0 (released Dec 2012) and newer happily accept tcp connects while the incoming migration runs. Time to drop step (3). This patch does exactly that, by making the monitor command synchronous and removing the code needed to handle the async monitor command in ui/spice-core.c Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- Mar 19, 2015
-
-
Markus Armbruster authored
Several issues: * Commands i and o lack @item. Their one-liner documentation gets squashed into the preceding command print. Add the obvious @item. * Commands i, o and cpu-add lack @findex. The function index doesn't have them. Add the obvious @findex. * Commit 727f005e put block_set_io_throttle was added in the middle of block_passwd. Move it. * Correct spelling of commands chardev-add and chardev-remove in @item and @findex. * Some commands have a blank line between @item/@findex and the text, most don't. Normalize to no blank line. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Markus Armbruster authored
The command handler is a union of two function types. If cmd->user_print is set, handle_user_command() calls cmd->mhandler.cmd_new(), else cmd->mhandler.cmd(). Command definitions must therefore either set both user_print() and mhandler.cmd_new(), or only mhandler.cmd(). quit's sets user_print and mhandler.cmd(). handle_user_command() calls hmp_quit() through mhandler.cmd_new() rather than mhandler.cmd(), i.e. through a function pointer with a different type. Broken in commit 7a7f325e, v1.0. Works in practice because hmp_quit() doesn't use its arguments, and handle_user_command() ignores its function value. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Mar 17, 2015
-
-
Andreas Färber authored
To complement qdev's bus-oriented info qtree, info qom-tree prints a hierarchical view of the QOM composition tree. By default, the machine composition tree is shown. This can be overriden by supplying a path argument, such as "info qom-tree /". Tested-by:
Alistair Francis <alistair.francis@xilinx.com> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
Andreas Färber authored
Re-implemented based on qmp_qom_set() to facilitate argument parsing. Warn about ambiguous path arguments. Reviewed-by:
Gonglei <arei.gonglei@huawei.com> Tested-by:
Alistair Francis <alistair.francis@xilinx.com> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
Andreas Färber authored
Implement it as a wrapper for QMP qom-list, but mimic the behavior of scripts/qmp/qom-list in making the path argument optional and listing the root if absent, to hint users what kind of path to pass. Reviewed-by:
Gonglei <arei.gonglei@huawei.com> Tested-by:
Alistair Francis <alistair.francis@xilinx.com> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Mar 16, 2015
-
-
Dr. David Alan Gilbert authored
Add migrate_incoming/migrate-incoming to start an incoming migration. Once a qemu has been started with -incoming defer the migration can be started by issuing: migrate_incoming uri Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- Mar 01, 2015
-
-
Markus Armbruster authored
Commit 79ca616f (v1.6.0) accidentally disabled legacy x86-only HMP commands pci_add, pci_del: it defined CONFIG_PCI_HOTPLUG only as make variable, not as preprocessor macro, killing the code conditional on defined(CONFIG_PCI_HOTPLUG_OLD). In all this time, nobody reported the loss. I only noticed it when I tried to test some error reporting change that forced me to touch this old crap again. Fun: git-log hw/pci/pci-hotplug-old.c shows our faith in the backward compatibility god has been strong enough to sacrifice at its altar about a dozen times, but not strong enough to even once verify the legacy feature's still there, let alone works. Remove the commands along with the code backing them. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Feb 18, 2015
-
-
Markus Armbruster authored
Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(), and sometimes COMMAND pointlessly differs in spelling. Normalize to hmp_COMMAND(), where COMMAND is exactly the command name with '-' replaced by '_'. Exceptions: * do_device_add() and client_migrate_info() *not* renamed to hmp_device_add(), hmp_client_migrate_info(), because they're also QMP handlers. They still need to be converted to QAPI. * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(), do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(), hmp_i(), hmp_o(), because those names are too cryptic for my taste. * do_info_help() renamed to hmp_info_help() instead of hmp_info(), because it only covers help. Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Oct 24, 2014
-
-
Markus Armbruster authored
This command lists PCMCIA sockets and cards. Only a few ARM boards have sockets (akita, borzoi, connex, mainstone, spitz, terrier, tosa, verdex, z2), the only card is the DSCM-1xxxx Hitachi Microdrive (qdev "microdrive"), and it is only inserted during machine init, if ever. So this command doesn't really tell anybody anything new so far. Moreover, pcmcia_socket_unregister() has a use-after-free bug, flagged by Coverity. Has never been used, because there has never been code to eject a PCMCIA card. Not worth fixing & converting to QMP. Remove it. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com> Acked-by:
Andreas Färber <afaerber@suse.de> Message-id: 1411144812-22958-1-git-send-email-armbru@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Sep 26, 2014
-
-
Zhu Guihua authored
Provides HMP equivalent of QMP query-memory-devices command. Signed-off-by:
Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-By:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- Aug 25, 2014
-
-
Alexey Kardashevskiy authored
This introduces an NMI (Non Maskable Interrupt) interface with a single nmi_monitor_handler() method. A machine or a device can implement it. This searches for an QOM object with this interface and if it is implemented, calls it. The callback implements an action required to cause debug crash dump on in-kernel debugger invocation. The callback returns Error**. This adds a nmi_monitor_handle() helper which walks through all objects to find the interface. The interface method is called for all found instances. This adds support for it in qmp_inject_nmi(). Since no architecture supports it at the moment, there is no change in behaviour. This changes inject-nmi command description for HMP and QMP. Signed-off-by:
Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by:
Alexander Graf <agraf@suse.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 19, 2014
-
-
Nikolay Nikolaev authored
The supplied chardev id will be inspected for supported options. Only a socket backend, with a set path (i.e. a Unix socket) and optionally the server parameter set, will be allowed. Other options (nowait, telnet) will make the chardev unusable and the netdev will not be initialised. Additional checks for validity: - requires `-numa node,memdev=..` - requires `-device virtio-net-*` The `vhostforce` option is used to force vhost-net when we deal with non-MSIX guests. Signed-off-by:
Antonios Motakis <a.motakis@virtualopensystems.com> Signed-off-by:
Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Jun 11, 2014
-
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Relies on readline unique completion strings patch to make the added vlan/hub completion values unique, instead of using something like a hash table. Signed-off-by:
Hani Benhabiles <hani@linux.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Also fix the parameters documentation. Signed-off-by:
Hani Benhabiles <hani@linux.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Export chr_is_ringbuf() function. Also remove left-over function prototypes while at it. Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- May 15, 2014
-
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Also update the command's documentation. Signed-off-by:
Hani Benhabiles <hani@linux.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Make it possible to query all net clients without specifying an ID when calling qemu_find_net_clients_except(). This also adds the add_completion_option() function which is to be used for other commands completions as well. Signed-off-by:
Hani Benhabiles <hani@linux.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- Apr 25, 2014
-
-
Qiao Nuohan authored
Dumping guest memory is available to specify the dump format now. This patch adds options '-z|-l|-s' to HMP command dump-guest-memory to specify dumping in kdump-compression format, with zlib/lzo/snappy compression. And without these options ELF format will be used. The discussion about this feature is here: http://lists.nongnu.org/archive/html/qemu-devel/2014-03/msg04235.html Signed-off-by:
Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Suggested-by:
Christian Borntraeger <borntraeger@de.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> (on s390x/kvm) Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Qiao Nuohan authored
Signed-off-by:
Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Also fix device_add completion including non-hotpluggable devices. Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Convert object_add and object_del commands to use the new callback. Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hani Benhabiles authored
Signed-off-by:
Hani Benhabiles <hani@linux.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- Jan 24, 2014
-
-
Jeff Cody authored
This updates the documentation for commiting snapshot images. Specifically, this highlights what happens when the base image is either smaller or larger than the snapshot image being committed. In the case of the base image being smaller, it is resized to the larger size of the snapshot image. In the case of the base image being larger, it is not resized automatically, but once the commit has completed it is safe for the user to truncate the base image. Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Jan 06, 2014
-
-
Paolo Bonzini authored
Add two commands that are the monitor counterparts of -object. The commands have the same Visitor-based implementation, but use different kinds of visitors so that the HMP command has a DWIM string-based syntax, while the QMP variant accepts a stricter JSON-based properties dictionary. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Paolo Bonzini authored
These two commands invoke the "unparent" method of Object. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-