Skip to content
Snippets Groups Projects
  1. Jun 12, 2015
    • Scott Feldman's avatar
      qmp/hmp: add rocker device support · fafa4d50
      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: default avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      Message-id: 1433985681-56138-5-git-send-email-sfeldma@gmail.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      fafa4d50
  2. Jun 02, 2015
  3. May 07, 2015
  4. Apr 27, 2015
    • Markus Armbruster's avatar
      monitor: Make client_migrate_info synchronous · 3b5704b2
      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: default avatarGerd Hoffmann <kraxel@redhat.com>
      3b5704b2
  5. Mar 19, 2015
    • Markus Armbruster's avatar
      hmp: Fix texinfo documentation · b76d799e
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      b76d799e
    • Markus Armbruster's avatar
      hmp: Fix definition of command quit · 46db7b86
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      46db7b86
  6. Mar 17, 2015
  7. Mar 16, 2015
  8. Mar 01, 2015
  9. Feb 18, 2015
    • Markus Armbruster's avatar
      hmp: Name HMP command handler functions hmp_COMMAND() · 3e5a50d6
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      3e5a50d6
  10. Oct 24, 2014
    • Markus Armbruster's avatar
      hmp: Remove "info pcmcia" · 7797a739
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Acked-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      Acked-by: default avatarAndreas Färber <afaerber@suse.de>
      Message-id: 1411144812-22958-1-git-send-email-armbru@redhat.com
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      7797a739
  11. Sep 26, 2014
  12. Aug 25, 2014
    • Alexey Kardashevskiy's avatar
      cpus: Define callback for QEMU "nmi" command · 9cb805fd
      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: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: default avatarAlexander Graf <agraf@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9cb805fd
  13. Jun 19, 2014
  14. Jun 11, 2014
  15. May 15, 2014
  16. Apr 25, 2014
  17. Jan 24, 2014
  18. Jan 06, 2014
Loading