1. 18 7月, 2017 2 次提交
  2. 11 7月, 2017 1 次提交
  3. 20 6月, 2017 1 次提交
  4. 04 6月, 2017 1 次提交
  5. 09 5月, 2017 2 次提交
  6. 07 5月, 2017 1 次提交
  7. 27 4月, 2017 8 次提交
  8. 24 4月, 2017 1 次提交
  9. 31 3月, 2017 1 次提交
    • M
      qga: don't fail if mount doesn't have slave devices · 8251a72f
      Michael Roth 提交于
      In some cases the slave devices of a virtual block device are tracked
      by the parent in the corresponding sysfs node. For instance, if we
      have a loop-back mount of the form:
      
        /dev/loop3p1 on /home/mdroth/mnt type ext4 (rw,relatime,data=ordered)
      
      this will be reflected in sysfs as:
      
        /sys/devices/virtual/block/loop3/
        ...
        /sys/devices/virtual/block/loop3/slaves
        /sys/devices/virtual/block/loop3/loop3p1
      
      The current code however assumes the mounted virtual block device,
      loop3p1 in this case, contains the slaves directory, and reports an
      error otherwise. This breaks 'make check' in certain environments.
      
      Fix this by simply skipping attempts to generate disk topology
      information in these cases. Since this information is documented
      in QAPI as optionally-reported, this should be ok from an API
      perspective.
      
      In the future, this can possibly be improved upon by collecting
      topology information from the parent in these cases.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Tested-by: NPeter Maydell <peter.maydell@linaro.org>
      8251a72f
  10. 19 3月, 2017 1 次提交
    • P
      qemu-ga: obey LISTEN_PID when using systemd socket activation · 53fabd4b
      Paolo Bonzini 提交于
      qemu-ga's socket activation support was not obeying the LISTEN_PID
      environment variable, which avoids that a process uses a socket-activation
      file descriptor meant for its parent.
      
      Mess can for example ensue if a process forks a children before consuming
      the socket-activation file descriptor and therefore setting O_CLOEXEC
      on it.
      
      Luckily, qemu-nbd also got socket activation code, and its copy does
      support LISTEN_PID.  Some extra fixups are needed to ensure that the
      code can be used for both, but that's what this patch does.  The
      main change is to replace get_listen_fds's "consume" argument with
      the FIRST_SOCKET_ACTIVATION_FD macro from the qemu-nbd code.
      
      Cc: "Richard W.M. Jones" <rjones@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      53fabd4b
  11. 16 3月, 2017 3 次提交
    • M
      qapi: The #optional tag is redundant, drop · 1d8bda12
      Markus Armbruster 提交于
      We traditionally mark optional members #optional in the doc comment.
      Before commit 3313b612, this was entirely manual.
      
      Commit 3313b612 added some automation because its qapi2texi.py relied
      on #optional to determine whether a member is optional.  This is no
      longer the case since the previous commit: the only thing qapi2texi.py
      still does with #optional is stripping it out.  We still reject bogus
      qapi-schema.json and six places for qga/qapi-schema.json.
      
      Thus, you can't actually rely on #optional to see whether something is
      optional.  Yet we still make people add it manually.  That's just
      busy-work.
      
      Drop the code to check, fix up and strip out #optional, along with all
      instances of #optional.  To keep it out, add code to reject it, to be
      dropped again once the dust settles.
      
      No change to generated documentation.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1489582656-31133-18-git-send-email-armbru@redhat.com>
      1d8bda12
    • M
      qapi: Have each QAPI schema declare its returns white-list · 1554a8fa
      Markus Armbruster 提交于
      qapi.py has a hardcoded white-list of command names that may violate
      the rules on permitted return types.  Add a new pragma directive
      'returns-whitelist', and use it to replace the hard-coded white-list.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1489582656-31133-6-git-send-email-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      1554a8fa
    • M
      qapi: Make doc comments optional where we don't need them · bc52d03f
      Markus Armbruster 提交于
      Since we added the documentation generator in commit 3313b612, doc
      comments are mandatory.  That's a very good idea for a schema that
      needs to be documented, but has proven to be annoying for testing.
      
      Make doc comments optional again, but add a new directive
      
          { 'pragma': { 'doc-required': true } }
      
      to let a QAPI schema require them.
      
      Add test cases for the new pragma directive.  While there, plug a
      minor hole in includ directive test coverage.
      
      Require documentation in the schemas we actually want documented:
      qapi-schema.json and qga/qapi-schema.json.
      
      We could probably make qapi2texi.py cope with incomplete
      documentation, but for now, simply make it refuse to run unless the
      schema has 'doc-required': true.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1489582656-31133-3-git-send-email-armbru@redhat.com>
      [qapi-code-gen.txt wording tweaked]
      Reviewed-by: NEric Blake <eblake@redhat.com>
      bc52d03f
  12. 06 3月, 2017 2 次提交
  13. 05 3月, 2017 2 次提交
    • M
      qapi: Support multiple command registries per program · 1527badb
      Markus Armbruster 提交于
      The command registry encapsulates a single command list.  Give the
      functions using it a parameter instead.  Define suitable command lists
      in monitor, guest agent and test-qmp-commands.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1488544368-30622-6-git-send-email-armbru@redhat.com>
      [Debugging turds buried]
      Reviewed-by: NEric Blake <eblake@redhat.com>
      1527badb
    • M
      qmp: Dumb down how we run QMP command registration · 05875687
      Markus Armbruster 提交于
      The way we get QMP commands registered is high tech:
      
      * qapi-commands.py generates qmp_init_marshal() that does the actual work
      
      * it also generates the magic to register it as a MODULE_INIT_QAPI
        function, so it runs when someone calls
        module_call_init(MODULE_INIT_QAPI)
      
      * main() calls module_call_init()
      
      QEMU needs to register a few non-qapified commands.  Same high tech
      works: monitor.c has its own qmp_init_marshal() along with the magic
      to make it run in module_call_init(MODULE_INIT_QAPI).
      
      QEMU also needs to unregister commands that are not wanted in this
      build's configuration (commit 5032a16d).  Simple enough:
      qmp_unregister_commands_hack().  The difficulty is to make it run
      after the generated qmp_init_marshal().  We can't simply run it in
      monitor.c's qmp_init_marshal(), because the order in which the
      registered functions run is indeterminate.  So qmp_init_marshal()
      registers qmp_unregister_commands_hack() separately.  Since
      registering *appends* to the list of registered functions, this will
      make it run after all the functions that have been registered already.
      
      I suspect it takes a long and expensive computer science education to
      not find this silly.
      
      Dumb it down as follows:
      
      * Drop MODULE_INIT_QAPI entirely
      
      * Give the generated qmp_init_marshal() external linkage.
      
      * Call it instead of module_call_init(MODULE_INIT_QAPI)
      
      * Except in QEMU proper, call new monitor_init_qmp_commands() that in
        turn calls the generated qmp_init_marshal(), registers the
        additional commands and unregisters the unwanted ones.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1488544368-30622-5-git-send-email-armbru@redhat.com>
      05875687
  14. 25 1月, 2017 1 次提交
  15. 16 1月, 2017 1 次提交
  16. 06 12月, 2016 4 次提交
  17. 01 11月, 2016 4 次提交
  18. 06 10月, 2016 1 次提交
    • P
      rules.mak: quiet-command: Split command name and args to print · 0bdb12c7
      Peter Maydell 提交于
      The quiet-command make rule currently takes two arguments:
      the command and arguments to run, and a string to print if
      the V flag is not set (ie we are not being verbose).
      By convention, the string printed is of the form
      "  NAME   some args". Unfortunately to get nicely lined up
      output all the strings have to agree about what column the
      arguments should start in, which means that if we add a
      new quiet-command usage which wants a slightly longer CMD
      name then we either put up with misalignment or change
      every quiet-command string.
      
      Split the quiet-mode string into two, the "NAME" and
      the "same args" part, and use printf(1) to format the
      string automatically. This means we only need to change
      one place if we want to support a longer maximum name.
      
      In particular, we can now print 7-character names lined
      up properly (they are needed for the OSX "SETTOOL" invocation).
      
      Change all the uses of quiet-command to the new syntax.
      (Any which are missed or inadvertently reintroduced
      via later merges will result in slightly misformatted
      quiet output rather than disaster.)
      
      A few places in the pc-bios/ makefiles are updated to use
      "BUILD", "SIGN" and "STRIP" rather than "Building",
      "Signing" and "Stripping" for consistency and to keep them
      below 7 characters. Module .mo links now print "LD" rather
      than the nonstandard "LD -r".
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1475598441-27908-1-git-send-email-peter.maydell@linaro.org
      0bdb12c7
  19. 04 10月, 2016 1 次提交
    • A
      qga/command: use QEMU atomic primitives · a31393e7
      Alex Bennée 提交于
      The guest client's use of the glib's g_atomic primitives causes newer
      GCC's to barf when built on Travis. As QEMU has its own primitives with
      well understood semantics we might as well use them.
      
      The use of atomics was a little inconsistent so I've also ensure the
      values are correctly set with atomic primitives at the same time.
      
      I also made the usage of bool consistent while I was at it.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <20160930213106.20186-12-alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a31393e7
  20. 08 9月, 2016 2 次提交