1. 05 2月, 2019 1 次提交
  2. 12 12月, 2018 1 次提交
  3. 05 10月, 2018 1 次提交
  4. 05 7月, 2018 1 次提交
  5. 13 6月, 2018 1 次提交
  6. 19 5月, 2018 1 次提交
  7. 03 3月, 2018 7 次提交
    • M
      qapi: Don't create useless directory qapi-generated · 418b1d0a
      Markus Armbruster 提交于
      We used to generate first test and later QGA QAPI code into
      qapi-generated/.  Commit b93b63f5 moved the test code to tests/.
      Commit 54c2e502 moved the QGA code to qga/qapi-generated/.  The
      directory has been unused since.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-30-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      418b1d0a
    • M
      qapi: Move qapi-schema.json to qapi/, rename generated files · eb815e24
      Markus Armbruster 提交于
      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: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-28-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eb815e24
    • M
      qapi: Empty out qapi-schema.json · 112ed241
      Markus Armbruster 提交于
      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: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-25-armbru@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      112ed241
    • M
      qapi: Generate separate .h, .c for each module · 252dc310
      Markus Armbruster 提交于
      Our qapi-schema.json is composed of modules connected by include
      directives, but the generated code is monolithic all the same: one
      qapi-types.h with all the types, one qapi-visit.h with all the
      visitors, and so forth.  These monolithic headers get included all
      over the place.  In my "build everything" tree, adding a QAPI type
      recompiles about 4800 out of 5100 objects.
      
      We wouldn't write such monolithic headers by hand.  It stands to
      reason that we shouldn't generate them, either.
      
      Split up generated qapi-types.h to mirror the schema's modular
      structure: one header per module.  Name the main module's header
      qapi-types.h, and sub-module D/B.json's header D/qapi-types-B.h.
      
      Mirror the schema's includes in the headers, so that qapi-types.h gets
      you everything exactly as before.  If you need less, you can include
      one or more of the sub-module headers.  To be exploited shortly.
      
      Split up qapi-types.c, qapi-visit.h, qapi-visit.c, qmp-commands.h,
      qmp-commands.c, qapi-event.h, qapi-event.c the same way.
      qmp-introspect.h, qmp-introspect.c and qapi.texi remain monolithic.
      
      The split of qmp-commands.c duplicates static helper function
      qmp_marshal_output_str() in qapi-commands-char.c and
      qapi-commands-misc.c.  This happens when commands returning the same
      type occur in multiple modules.  Not worth avoiding.
      
      Since I'm going to rename qapi-event.[ch] to qapi-events.[ch], and
      qmp-commands.[ch] to qapi-commands.[ch], name the shards that way
      already, to reduce churn.  This requires temporary hacks in
      commands.py and events.py.  Similarly, c_name() must temporarily
      be taught to munge '/' in common.py.  They'll go away with the rename.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-23-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      [eblake: declare a dummy variable in each .c file, to shut up OSX
      toolchain warnings about empty .o files, including hacking c_name()]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      252dc310
    • M
      qapi/types qapi/visit: Generate built-in stuff into separate files · cdb6610a
      Markus Armbruster 提交于
      Linking code from multiple separate QAPI schemata into the same
      program is possible, but involves some weirdness around built-in
      types:
      
      * We generate code for built-in types into .c only with option
        --builtins.  The user is responsible for generating code for exactly
        one QAPI schema per program with --builtins.
      
      * We generate code for built-in types into .h regardless of
        --builtins, but guarded by #ifndef QAPI_VISIT_BUILTIN.  Because all
        copies of this code are exactly the same, including any combination
        of these headers works.
      
      Replace this contraption by something more conventional: generate code
      for built-in types into their very own files: qapi-builtin-types.c,
      qapi-builtin-visit.c, qapi-builtin-types.h, qapi-builtin-visit.h, but
      only with --builtins.  Obey --output-dir, but ignore --prefix for
      them.
      
      Make qapi-types.h include qapi-builtin-types.h.  With multiple
      schemata you now have multiple qapi-types.[ch], but only one
      qapi-builtin-types.[ch].  Same for qapi-visit.[ch] and
      qapi-builtin-visit.[ch].
      
      Bonus: if all you need is built-in stuff, you can include a much
      smaller header.  To be exploited shortly.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-21-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: fix octal constant for python 3]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      cdb6610a
    • M
      qapi: Rename generated qmp-marshal.c to qmp-commands.c · 834a3f34
      Markus Armbruster 提交于
      All generated .c are named like their .h, except for qmp-marshal.c and
      qmp-commands.h.  To add to the confusion, tests-qmp-commands.c falsely
      matches generated test-qmp-commands.h.
      
      Get rid of this unnecessary complication.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-19-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      834a3f34
    • M
      qapi-gen: New common driver for code and doc generators · fb0bc835
      Markus Armbruster 提交于
      Whenever qapi-schema.json changes, we run six programs eleven times to
      update eleven files.  Similar for qga/qapi-schema.json.  This is
      silly.  Replace the six programs by a single program that spits out
      all eleven files.
      
      The programs become modules in new Python package qapi, along with the
      helper library.  This requires moving them to scripts/qapi/.  While
      moving them, consistently drop executable mode bits.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20180211093607.27351-9-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      [eblake: move change to one-line 'blurb' earlier in series, mention mode
      bit change as intentional, update qapi-code-gen.txt to match actual
      generated events.c file]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      fb0bc835
  8. 19 1月, 2018 1 次提交
  9. 18 12月, 2017 1 次提交
  10. 23 10月, 2017 1 次提交
  11. 16 10月, 2017 2 次提交
    • D
      ui: add keycodemapdb repository as a GIT submodule · 92712822
      Daniel P. Berrange 提交于
      The https://gitlab.com/keycodemap/keycodemapdb/ repo contains a
      data file mapping between all the different scancode/keycode/keysym
      sets that are known, and a tool to auto-generate lookup tables for
      different combinations.
      
      It is used by GTK-VNC, SPICE-GTK and libvirt for mapping keys.
      Using it in QEMU will let us replace many hand written lookup
      tables with auto-generated tables from a master data source,
      reducing bugs. Adding new QKeyCodes will now only require the
      master table to be updated, all ~20 other tables will be
      automatically updated to follow.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170929101201.21039-4-berrange@redhat.com
      
      [ kraxel: fix build ]
      [ kraxel: switch repo to qemu.git mirror ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      92712822
    • D
      build: automatically handle GIT submodule checkout for dtc · aef45d51
      Daniel P. Berrange 提交于
      Currently if DTC is required by configure and not available in the host
      OS install, we exit with an error message telling the user to checkout a
      git submodule or install the library.
      
      This introduces automatic handling of the git submodule checkout process
      and enables it for dtc. This only runs if building from GIT, so users of
      release tarballs still need the system library install. The current state
      of the git checkout is stashed in .git-submodule-status, and a helper
      program is used to determine if this state matches the desired submodule
      state. A dependency against 'Makefile' ensures that the submodule state
      is refreshed at the start of the build process
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170929101201.21039-2-berrange@redhat.com
      
      [ kraxel: use /bin/sh not bash for scripts/git-submodule.sh ]
      [ kraxel: fix Makefile dependencies ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      
      [fixup] Makefile dep
      aef45d51
  12. 29 9月, 2017 1 次提交
  13. 22 9月, 2017 1 次提交
  14. 20 7月, 2017 1 次提交
  15. 15 6月, 2017 2 次提交
    • F
      vhost-user-scsi: Introduce vhost-user-scsi host device · f12c1ebd
      Felipe Franciosi 提交于
      This commit introduces a vhost-user device for SCSI. This is based
      on the existing vhost-scsi implementation, but done over vhost-user
      instead. It also uses a chardev to connect to the backend. Unlike
      vhost-scsi (today), VMs using vhost-user-scsi can be live migrated.
      
      To use it, start Qemu with a command line equivalent to:
      
      qemu-system-x86_64 \
             -chardev socket,id=vus0,path=/tmp/vus.sock \
             -device vhost-user-scsi-pci,chardev=vus0,bus=pci.0,addr=...
      
      A separate commit presents a sample application linked with libiscsi to
      provide a backend for vhost-user-scsi.
      Signed-off-by: NFelipe Franciosi <felipe@nutanix.com>
      Message-Id: <1488479153-21203-4-git-send-email-felipe@nutanix.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f12c1ebd
    • P
      docs: create interop/ subdirectory · d59157ea
      Paolo Bonzini 提交于
      This is for the future interoperability & management guide.  It includes
      the QAPI docs, including the automatically generated ones, other socket
      protocols (vhost-user, VNC), and the qcow2 file format.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d59157ea
  16. 16 3月, 2017 1 次提交
    • M
      qapi: Clean up build of generated documentation · bd7f9747
      Markus Armbruster 提交于
      Rename intermediate qemu-qapi.texi to qemu-qmp-qapi.texi to match its
      user qemu-qmp-ref.texi, just like qemu-ga-qapi.texi matches
      qemu-ga-ref.texi.
      
      Build the intermediate .texi next to the sources and the final output
      in docs/ instead of dumping them into the build root.
      
      Fix version.texi dependencies so that only the targets that actually
      need it depend on it.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1489582656-31133-8-git-send-email-armbru@redhat.com>
      bd7f9747
  17. 20 2月, 2017 1 次提交
  18. 01 2月, 2017 1 次提交
  19. 16 1月, 2017 3 次提交
  20. 22 12月, 2016 1 次提交
  21. 08 10月, 2016 1 次提交
  22. 07 10月, 2016 1 次提交
  23. 20 9月, 2016 1 次提交
  24. 13 9月, 2016 1 次提交
  25. 14 7月, 2016 1 次提交
  26. 21 6月, 2016 1 次提交
  27. 01 6月, 2016 1 次提交
  28. 06 11月, 2015 1 次提交
  29. 24 9月, 2015 1 次提交
  30. 21 9月, 2015 1 次提交
    • M
      qapi: New QMP command query-qmp-schema for QMP introspection · 39a18158
      Markus Armbruster 提交于
      qapi/introspect.json defines the introspection schema.  It's designed
      for QMP introspection, but should do for similar uses, such as QGA.
      
      The introspection schema does not reflect all the rules and
      restrictions that apply to QAPI schemata.  A valid QAPI schema has an
      introspection value conforming to the introspection schema, but the
      converse is not true.
      
      Introspection lowers away a number of schema details, and makes
      implicit things explicit:
      
      * The built-in types are declared with their JSON type.
      
        All integer types are mapped to 'int', because how many bits we use
        internally is an implementation detail.  It could be pressed into
        external interface service as very approximate range information,
        but that's a bad idea.  If we need range information, we better do
        it properly.
      
      * Implicit type definitions are made explicit, and given
        auto-generated names:
      
        - Array types, named by appending "List" to the name of their
          element type, like in generated C.
      
        - The enumeration types implicitly defined by simple union types,
          named by appending "Kind" to the name of their simple union type,
          like in generated C.
      
        - Types that don't occur in generated C.  Their names start with ':'
          so they don't clash with the user's names.
      
      * All type references are by name.
      
      * The struct and union types are generalized into an object type.
      
      * Base types are flattened.
      
      * Commands take a single argument and return a single result.
      
        Dictionary argument or list result is an implicit type definition.
      
        The empty object type is used when a command takes no arguments or
        produces no results.
      
        The argument is always of object type, but the introspection schema
        doesn't reflect that.
      
        The 'gen': false directive is omitted as implementation detail.
      
        The 'success-response' directive is omitted as well for now, even
        though it's not an implementation detail, because it's not used by
        QMP.
      
      * Events carry a single data value.
      
        Implicit type definition and empty object type use, just like for
        commands.
      
        The value is of object type, but the introspection schema doesn't
        reflect that.
      
      * Types not used by commands or events are omitted.
      
        Indirect use counts as use.
      
      * Optional members have a default, which can only be null right now
      
        Instead of a mandatory "optional" flag, we have an optional default.
        No default means mandatory, default null means optional without
        default value.  Non-null is available for optional with default
        (possible future extension).
      
      * Clients should *not* look up types by name, because type names are
        not ABI.  Look up the command or event you're interested in, then
        follow the references.
      
        TODO Should we hide the type names to eliminate the temptation?
      
      New generator scripts/qapi-introspect.py computes an introspection
      value for its input, and generates a C variable holding it.
      
      It can generate awfully long lines.  Marked TODO.
      
      A new test-qmp-input-visitor test case feeds its result for both
      tests/qapi-schema/qapi-schema-test.json and qapi-schema.json to a
      QmpInputVisitor to verify it actually conforms to the schema.
      
      New QMP command query-qmp-schema takes its return value from that
      variable.  Its reply is some 85KiBytes for me right now.
      
      If this turns out to be too much, we have a couple of options:
      
      * We can use shorter names in the JSON.  Not the QMP style.
      
      * Optionally return the sub-schema for commands and events given as
        arguments.
      
        Right now qmp_query_schema() sends the string literal computed by
        qmp-introspect.py.  To compute sub-schema at run time, we'd have to
        duplicate parts of qapi-introspect.py in C.  Unattractive.
      
      * Let clients cache the output of query-qmp-schema.
      
        It changes only on QEMU upgrades, i.e. rarely.  Provide a command
        query-qmp-schema-hash.  Clients can have a cache indexed by hash,
        and re-query the schema only when they don't have it cached.  Even
        simpler: put the hash in the QMP greeting.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      39a18158