1. 01 2月, 2017 1 次提交
  2. 31 1月, 2017 1 次提交
  3. 28 1月, 2017 1 次提交
    • M
      tests: fix linking test-char on win32 · 7a008751
      Marc-André Lureau 提交于
      test.char.exe fails to link:
      qemu-char.o: In function `win_chr_free':
      /home/elmarco/src/qemu/qemu-char.c:2149: undefined reference to `qemu_del_polling_cb'
      /home/elmarco/src/qemu/qemu-char.c:2151: undefined reference to `qemu_del_polling_cb'
      qemu-char.o: In function `win_stdio_thread':
      /home/elmarco/src/qemu/qemu-char.c:2568: undefined reference to `qemu_del_wait_object'
      qemu-char.o: In function `qemu_chr_open_stdio':
      /home/elmarco/src/qemu/qemu-char.c:2661: undefined reference to `qemu_add_wait_object'
      /home/elmarco/src/qemu/qemu-char.c:2646: undefined reference to
      `qemu_add_wait_object'
      ...
      
      It needs main-loop.o symbols, among others. Linking with
      $(test-block-obj-y) brings what's necessary. We could try to eventually
      strip to the minimum if needed.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7a008751
  4. 17 1月, 2017 1 次提交
  5. 16 1月, 2017 1 次提交
    • M
      qapi: add qapi2texi script · 3313b612
      Marc-André Lureau 提交于
      As the name suggests, the qapi2texi script converts JSON QAPI
      description into a texi file suitable for different target
      formats (info/man/txt/pdf/html...).
      
      It parses the following kind of blocks:
      
      Free-form:
      
        ##
        # = Section
        # == Subsection
        #
        # Some text foo with *emphasis*
        # 1. with a list
        # 2. like that
        #
        # And some code:
        # | $ echo foo
        # | -> do this
        # | <- get that
        #
        ##
      
      Symbol description:
      
        ##
        # @symbol:
        #
        # Symbol body ditto ergo sum. Foo bar
        # baz ding.
        #
        # @param1: the frob to frobnicate
        # @param2: #optional how hard to frobnicate
        #
        # Returns: the frobnicated frob.
        #          If frob isn't frobnicatable, GenericError.
        #
        # Since: version
        # Notes: notes, comments can have
        #        - itemized list
        #        - like this
        #
        # Example:
        #
        # -> { "execute": "quit" }
        # <- { "return": {} }
        #
        ##
      
      That's roughly following the following EBNF grammar:
      
      api_comment = "##\n" comment "##\n"
      comment = freeform_comment | symbol_comment
      freeform_comment = { "# " text "\n" | "#\n" }
      symbol_comment = "# @" name ":\n" { member | tag_section | freeform_comment }
      member = "# @" name ':' [ text ] "\n" freeform_comment
      tag_section = "# " ( "Returns:", "Since:", "Note:", "Notes:", "Example:", "Examples:" ) [ text ]  "\n" freeform_comment
      text = free text with markup
      
      Note that the grammar is ambiguous: a line "# @foo:\n" can be parsed
      both as freeform_comment and as symbol_comment.  The actual parser
      recognizes symbol_comment.
      
      See docs/qapi-code-gen.txt for more details.
      
      Deficiencies and limitations:
      - the generated QMP documentation includes internal types
      - union type support is lacking
      - type information is lacking in generated documentation
      - doc comment error message positions are imprecise, they point
        to the beginning of the comment.
      - a few minor issues, all marked TODO/FIXME in the code
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20170113144135.5150-16-marcandre.lureau@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [test-qapi.py tweaked to avoid trailing empty lines in .out]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      3313b612
  6. 11 1月, 2017 1 次提交
  7. 22 12月, 2016 1 次提交
  8. 16 12月, 2016 1 次提交
  9. 15 11月, 2016 1 次提交
  10. 28 10月, 2016 2 次提交
  11. 26 10月, 2016 1 次提交
    • E
      tests: add atomic_add-bench · 070e3edc
      Emilio G. Cota 提交于
      With this microbenchmark we can measure the overhead of emulating atomic
      instructions with a configurable degree of contention.
      
      The benchmark spawns $n threads, each performing $o atomic ops (additions)
      in a loop. Each atomic operation is performed on a different cache line
      (assuming lines are 64b long) that is randomly selected from a range [0, $r).
      
      [ Note: each $foo corresponds to a -foo flag ]
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      Message-Id: <1467054136-10430-20-git-send-email-cota@braap.org>
      070e3edc
  12. 25 10月, 2016 2 次提交
  13. 24 10月, 2016 2 次提交
  14. 18 10月, 2016 2 次提交
  15. 06 10月, 2016 3 次提交
    • 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
    • L
      aa9026fd
    • L
      libqos: add PPC64 PCI support · cf716b31
      Laurent Vivier 提交于
      Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
      [dwg: Fixed build problem on 32-bit hosts]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      cf716b31
  16. 05 10月, 2016 1 次提交
  17. 28 9月, 2016 1 次提交
  18. 23 9月, 2016 5 次提交
  19. 16 9月, 2016 1 次提交
  20. 14 9月, 2016 1 次提交
  21. 13 9月, 2016 1 次提交
  22. 07 9月, 2016 2 次提交
  23. 06 9月, 2016 1 次提交
    • E
      vhost-user-test: Use libqos instead of pxe-virtio.rom · cdafe929
      Eduardo Habkost 提交于
      vhost-user-test relies on iPXE just to initialize the virtio-net
      device, and doesn't do any actual packet tx/rx testing.
      
      In addition to that, the test relies on TCG, which is
      imcompatible with vhost. The test only worked by accident: a bug
      the memory backend initialization made memory regions not have
      the DIRTY_MEMORY_CODE bit set in dirty_log_mask.
      
      This changes vhost-user-test to initialize the virtio-net device
      using libqos, and not use TCG nor pxe-virtio.rom.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      cdafe929
  24. 08 8月, 2016 1 次提交
  25. 29 7月, 2016 2 次提交
  26. 22 7月, 2016 1 次提交
    • D
      tests: introduce a framework for testing migration performance · 409437e1
      Daniel P. Berrange 提交于
      This introduces a moderately general purpose framework for
      testing performance of migration.
      
      The initial guest workload is provided by the included 'stress'
      program, which is configured to spawn one thread per guest CPU
      and run a maximally memory intensive workload. It will loop
      over GB of memory, xor'ing each byte with data from a 4k array
      of random bytes. This ensures heavy read and write load across
      all of guest memory to stress the migration performance. While
      running the 'stress' program will record how long it takes to
      xor each GB of memory and print this data for later reporting.
      
      The test engine will spawn a pair of QEMU processes, either on
      the same host, or with the target on a remote host via ssh,
      using the host kernel and a custom initrd built with 'stress'
      as the /init binary. Kernel command line args are set to ensure
      a fast kernel boot time (< 1 second) between launching QEMU and
      the stress program starting execution.
      
      None the less, the test engine will initially wait N seconds for
      the guest workload to stablize, before starting the migration
      operation. When migration is running, the engine will use pause,
      post-copy, autoconverge, xbzrle compression and multithread
      compression features, as well as downtime & bandwidth tuning
      to encourage completion. If migration completes, the test engine
      will wait N seconds again for the guest workooad to stablize on
      the target host. If migration does not complete after a preset
      number of iterations, it will be aborted.
      
      While the QEMU process is running on the source host, the test
      engine will sample the host CPU usage of QEMU as a whole, and
      each vCPU thread. While migration is running, it will record
      all the stats reported by 'query-migration'. Finally, it will
      capture the output of the stress program running in the guest.
      
      All the data produced from a single test execution is recorded
      in a structured JSON file. A separate program is then able to
      create interactive charts using the "plotly" python + javascript
      libraries, showing the characteristics of the migration.
      
      The data output provides visualization of the effect on guest
      vCPU workloads from the migration process, the corresponding
      vCPU utilization on the host, and the overall CPU hit from
      QEMU on the host. This is correlated from statistics from the
      migration process, such as downtime, vCPU throttling and iteration
      number.
      
      While the tests can be run individually with arbitrary parameters,
      there is also a facility for producing batch reports for a number
      of pre-defined scenarios / comparisons, in order to be able to
      get standardized results across different hardware configurations
      (eg TCP vs RDMA, or comparing different VCPU counts / memory
      sizes, etc).
      
      To use this, first you must build the initrd image
      
       $ make tests/migration/initrd-stress.img
      
      To run a a one-shot test with all default parameters
      
       $ ./tests/migration/guestperf.py > result.json
      
      This has many command line args for varying its behaviour.
      For example, to increase the RAM size and CPU count and
      bind it to specific host NUMA nodes
      
       $ ./tests/migration/guestperf.py \
             --mem 4 --cpus 2 \
             --src-mem-bind 0 --src-cpu-bind 0,1 \
             --dst-mem-bind 1 --dst-cpu-bind 2,3 \
             > result.json
      
      Using mem + cpu binding is strongly recommended on NUMA
      machines, otherwise the guest performance results will
      vary wildly between runs of the test due to lucky/unlucky
      NUMA placement, making sensible data analysis impossible.
      
      To make it run across separate hosts:
      
       $ ./tests/migration/guestperf.py \
             --dst-host somehostname > result.json
      
      To request that post-copy is enabled, with switchover
      after 5 iterations
      
       $ ./tests/migration/guestperf.py \
             --post-copy --post-copy-iters 5 > result.json
      
      Once a result.json file is created, a graph of the data
      can be generated, showing guest workload performance per
      thread and the migration iteration points:
      
       $ ./tests/migration/guestperf-plot.py --output result.html \
              --migration-iters --split-guest-cpu result.json
      
      To further include host vCPU utilization and overall QEMU
      utilization
      
       $ ./tests/migration/guestperf-plot.py --output result.html \
              --migration-iters --split-guest-cpu \
      	--qemu-cpu --vcpu-cpu result.json
      
      NB, the 'guestperf-plot.py' command requires that you have
      the plotly python library installed. eg you must do
      
       $ pip install --user  plotly
      
      Viewing the result.html file requires that you have the
      plotly.min.js file in the same directory as the HTML
      output. This js file is installed as part of the plotly
      python library, so can be found in
      
        $HOME/.local/lib/python2.7/site-packages/plotly/offline/plotly.min.js
      
      The guestperf-plot.py program can accept multiple json files
      to plot, enabling results from different configurations to
      be compared.
      
      Finally, to run the entire standardized set of comparisons
      
        $ ./tests/migration/guestperf-batch.py \
             --dst-host somehost \
             --mem 4 --cpus 2 \
             --src-mem-bind 0 --src-cpu-bind 0,1 \
             --dst-mem-bind 1 --dst-cpu-bind 2,3
             --output tcp-somehost-4gb-2cpu
      
      will store JSON files from all scenarios in the directory
      named tcp-somehost-4gb-2cpu
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1469020993-29426-7-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      409437e1
  27. 19 7月, 2016 2 次提交
    • E
      qapi: Implement boxed types for commands/events · c818408e
      Eric Blake 提交于
      Turn on the ability to pass command and event arguments in
      a single boxed parameter, which must name a non-empty type
      (although the type can be a struct with all optional members).
      For structs, it makes it possible to pass a single qapi type
      instead of a breakout of all struct members (useful if the
      arguments are already in a struct or if the number of members
      is large); for other complex types, it is now possible to use
      a union or alternate as the data for a command or event.
      
      The empty type may be technically feasible if needed down the
      road, but it's easier to forbid it now and relax things to allow
      it later, than it is to allow it now and have to special case
      how the generated 'q_empty' type is handled (see commit 7ce106a9
      for reasons why nothing is generated for the empty type).  An
      alternate type is never considered empty, but now that a boxed
      type can be either an object or an alternate, we have to provide
      a trivial QAPISchemaAlternateType.is_empty().  The new call to
      arg_type.is_empty() during QAPISchemaCommand.check() requires
      that we first check the type in question; but there is no chance
      of introducing a cycle since objects do not refer back to commands.
      
      We still have a split in syntax checking between ad-hoc parsing
      up front (merely validates that 'boxed' has a sane value) and
      during .check() methods (if 'boxed' is set, then 'data' must name
      a non-empty user-defined type).
      
      Generated code is unchanged, as long as no client uses the
      new feature.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1468468228-27827-10-git-send-email-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Test files renamed to *-boxed-*]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      c818408e
    • E
      qapi: Require all branches of flat union enum to be covered · d0b18239
      Eric Blake 提交于
      We were previously enforcing that all flat union branches were
      found in the corresponding enum, but not that all enum values
      were covered by branches.  The resulting generated code would
      abort() if the user passes the uncovered enum value.
      
      We don't automatically treat non-present branches in a flat
      union as empty types, for symmetry with simple unions (there,
      the enum type is generated from the list of all branches, so
      there is no way to omit a branch but still have it be part of
      the union).
      
      A later patch will add shorthand so that branches that are empty
      in flat unions can be declared as 'branch':{} instead of
      'branch':'Empty', to avoid the need for an otherwise useless
      explicit empty type.  [Such shorthand for simple unions is a bit
      harder to justify, since we would still have to generate a
      wrapper type that parses 'data':{}, rather than truly being an
      empty branch with no additional siblings to the 'type' member.]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1468468228-27827-3-git-send-email-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      d0b18239