qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 3b6959: doc: add "setup" to list of migration


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 3b6959: doc: add "setup" to list of migration states
Date: Fri, 23 May 2014 04:00:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 3b6959506831193f37cc830c8e111b437c0d1380
      
https://github.com/qemu/qemu/commit/3b6959506831193f37cc830c8e111b437c0d1380
  Author: Peter Feiner <address@hidden>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M qapi-schema.json
    M qmp-commands.hx

  Log Message:
  -----------
  doc: add "setup" to list of migration states

On a slow VM (e.g., nested), you see the "setup" state when you query the
migration status.

Signed-off-by: Peter Feiner <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 347888113020e874027cb200bb38aa0852e42839
      
https://github.com/qemu/qemu/commit/347888113020e874027cb200bb38aa0852e42839
  Author: Luiz Capitulino <address@hidden>
  Date:   2014-05-21 (Wed, 21 May 2014)

  Changed paths:
    M scripts/qapi.py

  Log Message:
  -----------
  scripts/qapi.py: Avoid syntax not supported by Python 2.4

The Python "except Foo as x" syntax was only introduced in
Python 2.6, but we aim to support Python 2.4 and later.
Use the old-style "except Foo, x" syntax instead, thus
fixing configure/compile on systems with older Python.

Reported-by: Peter Maydell <address@hidden>
Tested-by: Andreas Färber <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: fc13d937269c1cd01a4b7720c1dcce01722727a2
      
https://github.com/qemu/qemu/commit/fc13d937269c1cd01a4b7720c1dcce01722727a2
  Author: Michael Roth <address@hidden>
  Date:   2014-05-21 (Wed, 21 May 2014)

  Changed paths:
    M scripts/qapi-commands.py

  Log Message:
  -----------
  qapi: zero-initialize all QMP command parameters

In general QMP command parameter values are specified by consumers of the
QMP/HMP interface, but in the case of optional parameters these values may
be left uninitialized.

It is considered a bug for code to make use of optional parameters that have
not been flagged as being present by the marshalling code (via corresponding
has_<parameter> parameter), however our marshalling code will still pass
these uninitialized values on to the corresponding QMP function (to then
be ignored). Some compilers (clang in particular) consider this unsafe
however, and generate warnings as a result. As reported by Peter Maydell:

  This is something clang's -fsanitize=undefined spotted. The
  code generated by qapi-commands.py in qmp-marshal.c for
  qmp_marshal_* functions where there are some optional
  arguments looks like this:

      bool has_force = false;
      bool force;

      mi = qmp_input_visitor_new_strict(QOBJECT(args));
      v = qmp_input_get_visitor(mi);
      visit_type_str(v, &device, "device", errp);
      visit_start_optional(v, &has_force, "force", errp);
      if (has_force) {
    visit_type_bool(v, &force, "force", errp);
      }
      visit_end_optional(v, errp);
      qmp_input_visitor_cleanup(mi);

      if (error_is_set(errp)) {
    goto out;
      }
      qmp_eject(device, has_force, force, errp);

  In the case where has_force is false, we never initialize
  force, but then we use it by passing it to qmp_eject.
  I imagine we don't then actually use the value, but clang
  complains in particular for 'bool' variables because the value
  that ends up being loaded from memory for 'force' is not either
  0 or 1 (being uninitialized stack contents).

Fix this by initializing all QMP command parameters to {0} in the
marshalling code prior to passing them on to the QMP functions.

Signed-off-by: Michael Roth <address@hidden>
Reported-by: Peter Maydell <address@hidden>
Tested-by: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>


  Commit: 178ac111bca16c08a79b2609ebdc75197bea976a
      
https://github.com/qemu/qemu/commit/178ac111bca16c08a79b2609ebdc75197bea976a
  Author: Peter Maydell <address@hidden>
  Date:   2014-05-22 (Thu, 22 May 2014)

  Changed paths:
    M qapi-schema.json
    M qmp-commands.hx
    M scripts/qapi-commands.py
    M scripts/qapi.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging

* remotes/qmp-unstable/queue/qmp:
  qapi: zero-initialize all QMP command parameters
  scripts/qapi.py: Avoid syntax not supported by Python 2.4
  doc: add "setup" to list of migration states

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/6054d883d613...178ac111bca1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]