1. 27 Mar, 2018 1 commit
  2. 20 Mar, 2018 2 commits
  3. 12 Mar, 2018 1 commit
  4. 02 Mar, 2018 3 commits
    • Markus Armbruster's avatar
      qapi: Move qapi-schema.json to qapi/, rename generated files · eb815e24
      Markus Armbruster authored
      Move qapi-schema.json to qapi/, so it's next to its modules, and all
      files get generated to qapi/, not just the ones generated for modules.
      
      Consistently name the generated files qapi-MODULE.EXT:
      qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become
      qapi-events.[ch], and qmp-introspect.[ch] become qapi-introspect.[ch].
      This gets rid of the temporary hacks in scripts/qapi/commands.py,
      scripts/qapi/events.py, and scripts/qapi/common.py.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-28-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: 's avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      eb815e24
    • Markus Armbruster's avatar
      qapi: Empty out qapi-schema.json · 112ed241
      Markus Armbruster authored
      The previous commit improved compile time by including less of the
      generated QAPI headers.  This is impossible for stuff defined directly
      in qapi-schema.json, because that ends up in headers that that pull in
      everything.
      
      Move everything but include directives from qapi-schema.json to new
      sub-module qapi/misc.json, then include just the "misc" shard where
      possible.
      
      It's possible everywhere, except:
      
      * monitor.c needs qmp-command.h to get qmp_init_marshal()
      
      * monitor.c, ui/vnc.c and the generated qapi-event-FOO.c need
        qapi-event.h to get enum QAPIEvent
      
      Perhaps we'll get rid of those some other day.
      
      Adding a type to qapi/migration.json now recompiles some 120 instead
      of 2300 out of 5100 objects.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-25-armbru@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      112ed241
    • Markus Armbruster's avatar
      Include less of the generated modular QAPI headers · 9af23989
      Markus Armbruster authored
      In my "build everything" tree, a change to the types in
      qapi-schema.json triggers a recompile of about 4800 out of 5100
      objects.
      
      The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h,
      qapi-types.h.  Each of these headers still includes all its shards.
      Reduce compile time by including just the shards we actually need.
      
      To illustrate the benefits: adding a type to qapi/migration.json now
      recompiles some 2300 instead of 4800 objects.  The next commit will
      improve it further.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-24-armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      9af23989
  5. 26 Feb, 2018 1 commit
  6. 09 Feb, 2018 2 commits
  7. 26 Jan, 2018 3 commits
  8. 23 Jan, 2018 1 commit
  9. 15 Jan, 2018 2 commits
  10. 22 Dec, 2017 1 commit
  11. 30 Oct, 2017 1 commit
  12. 29 Oct, 2017 1 commit
  13. 23 Oct, 2017 1 commit
  14. 13 Oct, 2017 1 commit
  15. 05 Oct, 2017 1 commit
  16. 22 Sep, 2017 2 commits
  17. 14 Sep, 2017 1 commit
  18. 04 Sep, 2017 6 commits
  19. 24 Jul, 2017 4 commits
    • Markus Armbruster's avatar
      migration: Use JSON null instead of "" to reset parameter to default · 01fa5598
      Markus Armbruster authored
      migrate-set-parameters sets migration parameters according to is
      arguments like this:
      
      * Present means "set the parameter to this value"
      
      * Absent means "leave the parameter unchanged"
      
      * Except for parameters tls_creds and tls_hostname, "" means "reset
        the parameter to its default value
      
      The first two are perfectly normal: presence of the parameter makes
      the command do something.
      
      The third one overloads the parameter with a second meaning.  The
      overloading is *implicit*, i.e. it's not visible in the types.  Works
      here, because "" is neither a valid TLS credentials ID, nor a valid
      host name.
      
      Pressing argument values the schema accepts, but are semantically
      invalid, into service to mean "reset to default" is not general, as
      suitable invalid values need not exist.  I also find it ugly.
      
      To clean this up, we could add a separate flag argument to ask for
      "reset to default", or add a distinct value to @tls_creds and
      @tls_hostname.  This commit implements the latter: add JSON null to
      the values of @tls_creds and @tls_hostname, deprecate "".
      
      Because we're so close to the 2.10 freeze, implement it in the
      stupidest way possible: have qmp_migrate_set_parameters() rewrite null
      to "" before anything else can see the null.  The proper way to do it
      would be rewriting "" to null, but that requires fixing up code to
      work with null.  Add TODO comments for that.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      01fa5598
    • Markus Armbruster's avatar
      migration: Unshare MigrationParameters struct for now · 1bda8b3c
      Markus Armbruster authored
      Commit de63ab61 "migrate: Share common MigrationParameters struct"
      reused MigrationParameters for the arguments of
      migrate-set-parameters, with the following rationale:
      
          It is rather verbose, and slightly error-prone, to repeat
          the same set of parameters for input (migrate-set-parameters)
          as for output (query-migrate-parameters), where the only
          difference is whether the members are optional.  We can just
          document that the optional members will always be present
          on output, and then share a common struct between both
          commands.  The next patch can then reduce the amount of
          code needed on input.
      
      I need to unshare them to correct a design flaw in a stupid, but
      minimally invasive way, in the next commit.  We can restore the
      sharing when we redo that patch in a less stupid way.  Add a suitable
      TODO comment.
      
      Note that I revert only the sharing part of commit de63ab61, not the
      part that made the members of query-migrate-parameters' result
      optional.  The schema (and thus introspection) remains inaccurate for
      query-migrate-parameters.  If we decide not to restore the sharing, we
      should revert that part, too.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      1bda8b3c
    • Markus Armbruster's avatar
      migration: Clean up around tls_creds, tls_hostname · 8cc99dcd
      Markus Armbruster authored
      Optional MigrationParameters members tls_creds and tls_hostname can't
      actually be absent outside qmp_migrate_set_parameters() since commit
      4af245dc (v2.9.0).
      
      Note that commit 4af245dc reverted the part of commit de63ab61 (v2.8.0)
      that made tls_creds and tls_hostname absent instead of "" in the value
      of query-migrate-parameters, even though commit de63ab61 called that a
      mistake.  What a mess.
      
      Drop the redundant tests for presence, and update documentation.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      8cc99dcd
    • Markus Armbruster's avatar
      hmp: Clean up and simplify hmp_migrate_set_parameter() · 7e91e820
      Markus Armbruster authored
      The bulk of hmp_migrate_set_parameter()'s code sets one member of
      MigrationParameters according to the command's arguments.  It uses a
      string visitor for integer and boolean members, but not for string and
      size members.  It calls visit_type_bool() right away, but delays
      visit_type_int() some.  The delaying requires a flag variable and a
      bit of trickery: we set all integer members instead of just the one we
      want, and rely on the has_FOOs to mask the unwanted ones.
      
      Clean this up as follows.  Don't delay calling visit_type_int().  Use
      the string visitor for strings, too.  This involves extra allocations
      and cleanup, but doing them is simpler and cleaner than avoiding them.
      
      Sadly, using the string visitor for sizes isn't possible, because it
      defaults to Bytes rather than Mebibytes.  Add a comment explaining
      that.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: 's avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      7e91e820
  20. 18 Jul, 2017 2 commits
  21. 17 Jul, 2017 1 commit
    • Dr. David Alan Gilbert's avatar
      hmp: Update info vnc · 0a9667ec
      Dr. David Alan Gilbert authored
      The QMP query-vnc interfaces have gained a lot more information that
      the HMP interfaces hasn't got yet. Update it.
      
      Note the output format has changed, but this is HMP so that's OK.
      
      In particular, this now includes client information for reverse
      connections:
      
      -vnc :0
      (qemu) info vnc
      default:
        Server: 0.0.0.0:5900 (ipv4)
          Auth: none (Sub: none)
      
        (Now connect a client)
      
      (qemu) info vnc
      default:
        Server: 0.0.0.0:5900 (ipv4)
          Auth: none (Sub: none)
        Client: 127.0.0.1:51828 (ipv4)
          x509_dname: none
          sasl_username: none
      
      -vnc localhost:7000,reverse
      (qemu) info vnc
      default:
        Client: ::1:7000 (ipv6)
          x509_dname: none
          sasl_username: none
        Auth: none (Sub: none)
      
      -vnc :1,password,id=pass -vnc localhost:7000,reverse
      (qemu) info vnc
      default:
        Client: ::1:7000 (ipv6)
          x509_dname: none
          sasl_username: none
        Auth: none (Sub: none)
      rev:
        Server: 0.0.0.0:5901 (ipv4)
          Auth: vnc (Sub: none)
        Client: 127.0.0.1:53616 (ipv4)
          x509_dname: none
          sasl_username: none
      
      This was originally RH bz 1461682
      Signed-off-by: 's avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-id: 20170711154414.21111-1-dgilbert@redhat.com
      Signed-off-by: 's avatarGerd Hoffmann <kraxel@redhat.com>
      0a9667ec
  22. 14 Jul, 2017 1 commit
  23. 11 Jul, 2017 1 commit