1. 29 May, 2017 1 commit
  2. 23 May, 2017 1 commit
  3. 26 Apr, 2017 1 commit
  4. 30 Oct, 2016 1 commit
  5. 19 Sep, 2016 1 commit
  6. 05 Sep, 2016 1 commit
    • Pavel Butsykin's avatar
      drive-backup: added support for data compression · 13b9414b
      Pavel Butsykin authored
      The idea is simple - backup is "written-once" data. It is written block
      by block and it is large enough. It would be nice to save storage
      space and compress it.
      The patch adds a flag to the qmp/hmp drive-backup command which enables
      block compression. Compression should be implemented in the format driver
      to enable this feature.
      There are some limitations of the format driver to allow compressed writes.
      We can write data only once. Though for backup this is perfectly fine.
      These limitations are maintained by the driver and the error will be
      reported if we are doing something wrong.
      Signed-off-by: 's avatarPavel Butsykin <pbutsykin@virtuozzo.com>
      Reviewed-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: 's avatarDenis V. Lunev <den@openvz.org>
      CC: Jeff Cody <jcody@redhat.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: John Snow <jsnow@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
  7. 18 Jul, 2016 1 commit
  8. 26 May, 2016 1 commit
    • Daniel P. Berrange's avatar
      migration: define 'tls-creds' and 'tls-hostname' migration parameters · 69ef1f36
      Daniel P. Berrange authored
      Define two new migration parameters to be used with TLS encryption.
      The 'tls-creds' parameter provides the ID of an instance of the
      'tls-creds' object type, or rather a subclass such as 'tls-creds-x509'.
      Providing these credentials will enable use of TLS on the migration
      data stream.
      If using x509 certificates, together with a migration URI that does
      not include a hostname, the 'tls-hostname' parameter provides the
      hostname to use when verifying the server's x509 certificate. This
      allows TLS to be used in combination with fd: and exec: protocols
      where a TCP connection is established by a 3rd party outside of
      NB, this requires changing the migrate_set_parameter method in the
      HMP to accept a 's' (string) value instead of 'i' (integer). This
      is backwards compatible, because the parsing of strings allows the
      quotes to be optional, thus any integer is also a valid string.
      Reviewed-by: 's avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1461751518-12128-26-git-send-email-berrange@redhat.com>
      Signed-off-by: 's avatarAmit Shah <amit.shah@redhat.com>
  9. 14 Mar, 2016 1 commit
    • Kevin Wolf's avatar
      hmp: 'drive_add -n' for creating a node without BB · abb21ac3
      Kevin Wolf authored
      This patch adds an option to the drive_add HMP command to create only a
      BlockDriverState without a BlockBackend on top.
      The motivation for this is that libvirt needs to specify options to a
      migration target (specifically, detect-zeroes). drive-mirror doesn't
      allow specifying options, and the proper way to do this is to create the
      target BDS separately with blockdev-add (where you can specify options)
      and then use blockdev-mirror to that BDS.
      However, libvirt can't use blockdev-add as long as it is still
      experimental, and we're expecting that it will still take some time, so
      we need to resort to drive_add.
      The problem with drive_add is that so far it always created a BB, and
      BDSes with a BB can't be used as a mirroring target as long as we don't
      support multiple BBs per BDS - and while we're working towards that
      goal, it's another thing that will still take some time.
      So to achieve the goal, the simplest solution to provide the
      functionality now without adding one-off options to the mirror QMP
      commands is to extend drive_add to create nodes without BBs.
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
  10. 11 Mar, 2016 1 commit
  11. 22 Feb, 2016 1 commit
  12. 12 Nov, 2015 1 commit
  13. 11 Nov, 2015 1 commit
  14. 10 Nov, 2015 1 commit
  15. 22 Sep, 2015 1 commit
    • Daniel P. Berrange's avatar
      monitor: allow device_del to accept QOM paths · 6287d827
      Daniel P. Berrange authored
      Currently device_del requires that the client provide the
      device short ID. device_add allows devices to be created
      without giving an ID, at which point there is no way to
      delete them with device_del. The QOM object path, however,
      provides an alternative way to identify the devices.
      Allowing device_del to accept an object path ensures all
      devices are deletable regardless of whether they have an
       (qemu) device_add usb-mouse
       (qemu) qom-list /machine/peripheral-anon
       device[0] (child<usb-mouse>)
       type (string)
       (qemu) device_del /machine/peripheral-anon/device[0]
      Devices are required to be marked as hotpluggable
      otherwise an error is raised
       (qemu) device_del /machine/unattached/device[4]
       Device 'PIIX3' does not support hotplugging
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1441974836-17476-1-git-send-email-berrange@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      [Commit message touched up, accidental white-space change dropped]
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
  16. 16 Sep, 2015 2 commits
  17. 04 Sep, 2015 1 commit
  18. 03 Sep, 2015 3 commits
  19. 12 Jun, 2015 1 commit
    • 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>.
      Signed-off-by: 's avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: 's avatarJiri Pirko <jiri@resnulli.us>
      Message-id: 1433985681-56138-5-git-send-email-sfeldma@gmail.com
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
  20. 02 Jun, 2015 5 commits
  21. 07 May, 2015 1 commit
  22. 27 Apr, 2015 1 commit
    • 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: 's avatarGerd Hoffmann <kraxel@redhat.com>
  23. 19 Mar, 2015 2 commits
    • 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: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarMichael Tokarev <mjt@tls.msk.ru>
    • 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: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarMichael Tokarev <mjt@tls.msk.ru>
  24. 17 Mar, 2015 3 commits
  25. 16 Mar, 2015 1 commit
  26. 01 Mar, 2015 1 commit
  27. 18 Feb, 2015 1 commit
    • 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 '_'.
      * 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: 's avatarMarkus Armbruster <armbru@redhat.com>
  28. 24 Oct, 2014 1 commit
    • 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: 's avatarMarkus Armbruster <armbru@redhat.com>
      Acked-by: 's avatarLuiz Capitulino <lcapitulino@redhat.com>
      Acked-by: 's avatarAndreas Färber <afaerber@suse.de>
      Message-id: 1411144812-22958-1-git-send-email-armbru@redhat.com
      Signed-off-by: 's avatarPeter Maydell <peter.maydell@linaro.org>
  29. 26 Sep, 2014 1 commit
  30. 25 Aug, 2014 1 commit
    • 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: 's avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: 's avatarAlexander Graf <agraf@suse.de>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>