1. 20 Mar, 2018 1 commit
  2. 19 Mar, 2018 2 commits
  3. 06 Mar, 2018 2 commits
    • Alexey Kardashevskiy's avatar
      qmp: Add qom-list-properties to list QOM object properties · 961c47bb
      Alexey Kardashevskiy authored
      There is already 'device-list-properties' which does most of the job,
      however it does not handle everything returned by qom-list-types such
      as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE.
      It does not handle abstract classes either.
      
      This adds a new qom-list-properties command which prints properties
      of a specific class and its instance. It is pretty much a simplified copy
      of the device-list-properties handler.
      
      Since it creates an object instance, device properties should appear
      in the output as they are copied to QOM properties at the instance_init
      hook.
      
      This adds a object_class_property_iter_init() helper to allow class
      properties enumeration uses it in the new QMP command to allow properties
      listing for abstract classes.
      Signed-off-by: 's avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20180301130939.15875-3-aik@ozlabs.ru>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      961c47bb
    • Alexey Kardashevskiy's avatar
      qmp: Merge ObjectPropertyInfo and DevicePropertyInfo · 35f63767
      Alexey Kardashevskiy authored
      ObjectPropertyInfo is more generic and only missing @description.
      This adds a description to ObjectPropertyInfo and removes
      DevicePropertyInfo so the resulting ObjectPropertyInfo can be used
      elsewhere.
      Signed-off-by: 's avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20180301130939.15875-2-aik@ozlabs.ru>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      35f63767
  4. 02 Mar, 2018 2 commits
  5. 09 Feb, 2018 4 commits
  6. 20 Dec, 2017 1 commit
    • Daniel Henrique Barboza's avatar
      qmp: remove qmp_cpu · 49ccefde
      Daniel Henrique Barboza authored
      'qmp_cpu' was implemented in commit 755f1968 ("qapi: Convert the cpu
      command") as a functional no-op, a QMP call that does nothing and
      return success. The idea, apparently, was to provide a counterpart
      for the HMP 'hmp_cpu' command, introduced in the same commit.
      
      After 6 years of its creation, qmp_cpu remains a functional no-op
      that does nothing, having no value for any caller/user. A proposal
      was sent to implement qmp_cpu like hmp_cpu works, but it was denied
      [1]. The reason is that QMP must be as stateless as possible and a
      function that changes its state (the current CPU monitor in the case
      of qmp_cpu) goes against it. Any QMP command that needs a specific
      monitor CPU setup must provide it in its arguments, instead of relying
      in the current QMP monitor state.
      
      After discussions that happened in [2] it was decided that a command
      that does nothing since its birth, no one uses for anything and will
      not be implemented, should be deprecated and erased. Given that we will
      *not* provide any replacement for qmp_cpu and we believe that there
      is no user relying on it, there is no point in adding a deprecation
      delay for it.
      
      So, this patch nukes qmp_cpu from QEMU code, removing both its blank
      implementation in qmp.c and its doc in qapi-schema.json.
      
      [1] https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg02283.html
      [2] https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg03696.htmlSigned-off-by: 's avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Daniel P. Berrange <berrange@redhat.com>
      Message-Id: <20171220102304.8288-1-danielhb@linux.vnet.ibm.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      49ccefde
  7. 14 Sep, 2017 1 commit
  8. 17 Jul, 2017 2 commits
  9. 14 Jul, 2017 2 commits
  10. 11 Jul, 2017 1 commit
  11. 02 Jun, 2017 1 commit
  12. 23 May, 2017 1 commit
    • Eric Blake's avatar
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake authored
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      cf83f140
  13. 11 May, 2017 2 commits
    • Kevin Wolf's avatar
      block: New BdrvChildRole.activate() for blk_resume_after_migration() · 4417ab7a
      Kevin Wolf authored
      Instead of manually calling blk_resume_after_migration() in migration
      code after doing bdrv_invalidate_cache_all(), integrate the BlockBackend
      activation with cache invalidation into a single function. This is
      achieved with a new callback in BdrvChildRole that is called by
      bdrv_invalidate_cache_all().
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      4417ab7a
    • Kevin Wolf's avatar
      migration: Unify block node activation error handling · ace21a58
      Kevin Wolf authored
      Migration code activates all block driver nodes on the destination when
      the migration completes. It does so by calling
      bdrv_invalidate_cache_all() and blk_resume_after_migration(). There is
      one code path for precopy and one for postcopy migration, resulting in
      four function calls, which used to have three different failure modes.
      
      This patch unifies the behaviour so that failure to activate all block
      nodes is non-fatal, but the error message is logged and the VM isn't
      automatically started. 'cont' will retry activating the block nodes.
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      ace21a58
  14. 21 Apr, 2017 1 commit
  15. 07 Apr, 2017 1 commit
    • Kevin Wolf's avatar
      block: Ignore guest dev permissions during incoming migration · d35ff5e6
      Kevin Wolf authored
      Usually guest devices don't like other writers to the same image, so
      they use blk_set_perm() to prevent this from happening. In the migration
      phase before the VM is actually running, though, they don't have a
      problem with writes to the image. On the other hand, storage migration
      needs to be able to write to the image in this phase, so the restrictive
      blk_set_perm() call of qdev devices breaks it.
      
      This patch flags all BlockBackends with a qdev device as
      blk->disable_perm during incoming migration, which means that the
      requested permissions are stored in the BlockBackend, but not actually
      applied to its root node yet.
      
      Once migration has finished and the VM should be resumed, the
      permissions are applied. If they cannot be applied (e.g. because the NBD
      server used for block migration hasn't been shut down), resuming the VM
      fails.
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
      Tested-by: 's avatarKashyap Chamarthy <kchamart@redhat.com>
      d35ff5e6
  16. 05 Mar, 2017 1 commit
  17. 31 Jan, 2017 1 commit
  18. 27 Jan, 2017 2 commits
  19. 28 Oct, 2016 1 commit
  20. 25 Oct, 2016 2 commits
  21. 06 Oct, 2016 1 commit
  22. 23 Sep, 2016 3 commits
    • Kevin Wolf's avatar
      block: Accept device model name for blockdev-change-medium · 70e2cb3b
      Kevin Wolf authored
      In order to remove the need for BlockBackend names in the external API,
      we want to allow qdev device names in all device related commands.
      
      This converts blockdev-change-medium to accept a qdev device name.
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
      70e2cb3b
    • Fam Zheng's avatar
      vl: Switch qemu_uuid to QemuUUID · 9c5ce8db
      Fam Zheng authored
      Update all qemu_uuid users as well, especially get rid of the duplicated
      low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API.
      
      Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to
      QemuUUID is done here too to keep everything in sync and avoid code
      churn.
      Signed-off-by: 's avatarFam Zheng <famz@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-10-git-send-email-famz@redhat.com>
      9c5ce8db
    • Fam Zheng's avatar
      util: Add UUID API · cea25275
      Fam Zheng authored
      A number of different places across the code base use CONFIG_UUID. Some
      of them are soft dependency, some are not built if libuuid is not
      available, some come with dummy fallback, some throws runtime error.
      
      It is hard to maintain, and hard to reason for users.
      
      Since UUID is a simple standard with only a small number of operations,
      it is cleaner to have a central support in libqemuutil. This patch adds
      qemu_uuid_* functions that all uuid users in the code base can
      rely on. Except for qemu_uuid_generate which is new code, all other
      functions are just copy from existing fallbacks from other files.
      
      Note that qemu_uuid_parse is moved without updating the function
      signature to use QemuUUID, to keep this patch simple.
      Signed-off-by: 's avatarFam Zheng <famz@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
      cea25275
  23. 19 Sep, 2016 1 commit
  24. 06 Sep, 2016 3 commits
  25. 06 Jul, 2016 1 commit
    • Eric Blake's avatar
      qmp-input-visitor: Favor new visit_free() function · b70ce101
      Eric Blake authored
      Now that we have a polymorphic visit_free(), we no longer need
      qmp_input_visitor_cleanup(); which in turn means we no longer
      need to return a subtype from qmp_input_visitor_new() nor a
      public upcast function.
      
      Generated code changes to qmp-marshal.c look like:
      
      |@@ -52,11 +52,10 @@ void qmp_marshal_add_fd(QDict *args, QOb
      | {
      |     Error *err = NULL;
      |     AddfdInfo *retval;
      |-    QmpInputVisitor *qiv = qmp_input_visitor_new(QOBJECT(args), true);
      |     Visitor *v;
      |     q_obj_add_fd_arg arg = {0};
      |
      |-    v = qmp_input_get_visitor(qiv);
      |+    v = qmp_input_visitor_new(QOBJECT(args), true);
      |     visit_start_struct(v, NULL, NULL, 0, &err);
      |     if (err) {
      |         goto out;
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Message-Id: <1465490926-28625-8-git-send-email-eblake@redhat.com>
      Reviewed-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      b70ce101