1. 12 3月, 2019 1 次提交
  2. 08 3月, 2019 5 次提交
    • K
      qcow2 spec: Describe string header extensions · e88153ea
      Kevin Wolf 提交于
      Be more specific about the string representation in header extensions.
      Suggested-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      e88153ea
    • K
      qcow2: Extend spec for external data files · 65a3d073
      Kevin Wolf 提交于
      This adds external data file to the qcow2 spec as a new incompatible
      feature.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      65a3d073
    • A
      qcow2: Default to 4KB for the qcow2 cache entry size · af39bd0d
      Alberto Garcia 提交于
      QEMU 2.12 (commit 1221fe6f) introduced
      a new setting called l2-cache-entry-size that allows making entries on
      the qcow2 L2 cache smaller than the cluster size.
      
      I have been performing several tests with different cluster and entry
      sizes and all of them show that reducing the entry size (aka L2 slice)
      consistently improves I/O performance, notably during random I/O (all
      tests done with sequential I/O show similar results). This is to be
      expected because loading and evicting an L2 slice is more expensive
      the larger the slice is.
      
      Here are some numbers on fully populated 40GB qcow2 images. The
      rightmost column represents the maximum L2 cache size in both cases.
      
         Cluster size = 64 KB
         |-------------+--------------+--------------+--------------|
         |             | 1MB L2 cache | 3MB L2 cache | 5MB L2 cache |
         |-------------+--------------+--------------+--------------|
         |  4KB slices |    6545 IOPS |   12045 IOPS |   55680 IOPS |
         | 16KB slices |    5177 IOPS |    9798 IOPS |   56278 IOPS |
         | 64KB slices |    2718 IOPS |    5326 IOPS |   57355 IOPS |
         |-------------+--------------+--------------+--------------|
      
         Cluster size = 256 KB
         |--------------+----------------+--------------+-----------------|
         |              | 512KB L2 cache | 1MB L2 cache | 1280KB L2 cache |
         |--------------+----------------+--------------+-----------------|
         |   4KB slices |      8539 IOPS |   21071 IOPS |      55417 IOPS |
         |  64KB slices |      3598 IOPS |    9772 IOPS |      57687 IOPS |
         | 256KB slices |      1415 IOPS |    4120 IOPS |      58001 IOPS |
         |--------------+----------------+--------------+-----------------|
      
      As can be seen in the numbers, the only exception to the rule is when
      the cache is large enough to hold all L2 tables. This is also to be
      expected because in this case no cache entry is ever evicted so
      reducing its size doesn't bring any benefit.
      
      This patch sets the default L2 cache entry size to 4KB except when the
      cache is large enough for the whole disk.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      af39bd0d
    • P
      kconfig: add documentation · 576c3f2f
      Paolo Bonzini 提交于
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      576c3f2f
    • P
      build: convert pci.mak to Kconfig · 7c28b925
      Paolo Bonzini 提交于
      Instead of including the same list of devices for each target,
      set CONFIG_PCI to true, and make the devices default to present
      whenever PCI is available.  However, s390x does not want all the
      PCI devices, so there is a separate symbol to enable them.
      
      Done mostly with the following script:
      
        while read i; do
           i=${i%=y}; i=${i#CONFIG_}
           sed -i -e'/^config '$i'$/!b' -en \
                  -e'a\' -e'    default y if PCI_DEVICES\' -e'    depends on PCI' \
                `grep -lw $i hw/*/Kconfig`
        done < default-configs/pci.mak
      
      followed by replacing a few "depends on" clauses with "select"
      whenever the symbol is not really related to PCI.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NYang Zhong <yang.zhong@intel.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <20190123065618.3520-31-yang.zhong@intel.com>
      Acked-by: NRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7c28b925
  3. 07 3月, 2019 9 次提交
  4. 06 3月, 2019 1 次提交
  5. 04 3月, 2019 1 次提交
  6. 23 2月, 2019 2 次提交
  7. 18 2月, 2019 3 次提交
  8. 11 2月, 2019 1 次提交
    • M
      docs/devel/testing: Add -a option to usermod command on docker setup · 29c33cc1
      Murilo Opsfelder Araujo 提交于
      The option -G of usermod command will remove user from other groups
      not listed, i.e.: $USER will belong only to group 'docker' after
      following the documentation as is.
      
      From usermod(8) manual page:
      
          If the user is currently a member of a group which is not listed,
          the user will be removed from the group. This behaviour can be
          changed via the -a option, which appends the user to the current
          supplementary group list.
      
      This patch improves the situation by adding the -a option to the
      usermod command, which will just append user to the supplementary
      group list.
      
      Cc: qemu-trivial@nongnu.org
      Signed-off-by: NMurilo Opsfelder Araujo <muriloo@linux.ibm.com>
      Message-Id: <20190207184346.6840-1-muriloo@linux.ibm.com>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      29c33cc1
  9. 05 2月, 2019 1 次提交
  10. 04 2月, 2019 1 次提交
  11. 25 1月, 2019 1 次提交
  12. 24 1月, 2019 3 次提交
    • D
      trace: add ability to do simple printf logging via systemtap · 62dd1048
      Daniel P. Berrangé 提交于
      The dtrace systemtap trace backend for QEMU is very powerful but it is
      also somewhat unfriendly to users who aren't familiar with systemtap,
      or who don't need its power right now.
      
        stap -e "....some strange script...."
      
      The 'log' backend for QEMU by comparison is very crude but incredibly
      easy to use:
      
       $ qemu -d trace:qio* ...some args...
       23266@1547735759.137292:qio_channel_socket_new Socket new ioc=0x563a8a39d400
       23266@1547735759.137305:qio_task_new Task new task=0x563a891d0570 source=0x563a8a39d400 func=0x563a86f1e6c0 opaque=0x563a89078000
       23266@1547735759.137326:qio_task_thread_start Task thread start task=0x563a891d0570 worker=0x563a86f1ce50 opaque=0x563a891d9d90
       23273@1547735759.137491:qio_task_thread_run Task thread run task=0x563a891d0570
       23273@1547735759.137503:qio_channel_socket_connect_sync Socket connect sync ioc=0x563a8a39d400 addr=0x563a891d9d90
       23273@1547735759.138108:qio_channel_socket_connect_fail Socket connect fail ioc=0x563a8a39d400
      
      This commit introduces a way to do simple printf style logging of probe
      points using systemtap. In particular it creates another set of tapsets,
      one per emulator:
      
        /usr/share/systemtap/tapset/qemu-*-log.stp
      
      These pre-define probe functions which simply call printf() on their
      arguments. The printf() format string is taken from the normal
      trace-events files, with a little munging to the format specifiers
      to cope with systemtap's more restrictive syntax.
      
      With this you can now do
      
       $ stap -e 'probe qemu.system.x86_64.log.qio*{}'
       22806@1547735341399856820 qio_channel_socket_new Socket new ioc=0x56135d1d7c00
       22806@1547735341399862570 qio_task_new Task new task=0x56135cd66eb0 source=0x56135d1d7c00 func=0x56135af746c0 opaque=0x56135bf06400
       22806@1547735341399865943 qio_task_thread_start Task thread start task=0x56135cd66eb0 worker=0x56135af72e50 opaque=0x56135c071d70
       22806@1547735341399976816 qio_task_thread_run Task thread run task=0x56135cd66eb0
      
      We go one step further though and introduce a 'qemu-trace-stap' tool to
      make this even easier
      
       $ qemu-trace-stap run qemu-system-x86_64 'qio*'
       22806@1547735341399856820 qio_channel_socket_new Socket new ioc=0x56135d1d7c00
       22806@1547735341399862570 qio_task_new Task new task=0x56135cd66eb0 source=0x56135d1d7c00 func=0x56135af746c0 opaque=0x56135bf06400
       22806@1547735341399865943 qio_task_thread_start Task thread start task=0x56135cd66eb0 worker=0x56135af72e50 opaque=0x56135c071d70
       22806@1547735341399976816 qio_task_thread_run Task thread run task=0x56135cd66eb0
      
      This tool is clever in that it will automatically change the
      SYSTEMTAP_TAPSET env variable to point to the directory containing the
      right set of probes for the QEMU binary path you give it. This is useful
      if you have QEMU installed in /usr but are trying to test and trace a
      binary in /home/berrange/usr/qemu-git. In that case you'd do
      
       $ qemu-trace-stap run /home/berrange/usr/qemu-git/bin/qemu-system-x86_64 'qio*'
      
      And it'll make sure /home/berrange/usr/qemu-git/share/systemtap/tapset
      is used for the trace session
      
      The 'qemu-trace-stap' script takes a verbose arg so you can understand
      what it is running
      
       $ qemu-trace-stap run /home/berrange/usr/qemu-git/bin/qemu-system-x86_64 'qio*'
       Using tapset dir '/home/berrange/usr/qemu-git/share/systemtap/tapset' for binary '/home/berrange/usr/qemu-git/bin/qemu-system-x86_64'
       Compiling script 'probe qemu.system.x86_64.log.qio* {}'
       Running script, <Ctrl>-c to quit
       ...trace output...
      
      It can enable multiple probes at once
      
       $ qemu-trace-stap run qemu-system-x86_64 'qio*' 'qcrypto*' 'buffer*'
      
      By default it monitors all existing running processes and all future
      launched proceses. This can be restricted to a specific PID using the
      --pid arg
      
       $ qemu-trace-stap run --pid 2532 qemu-system-x86_64 'qio*'
      
      Finally if you can't remember what probes are valid it can tell you
      
       $ qemu-trace-stap list qemu-system-x86_64
       ahci_check_irq
       ahci_cmd_done
       ahci_dma_prepare_buf
       ahci_dma_prepare_buf_fail
       ahci_dma_rw_buf
       ahci_irq_lower
       ...snip...
      
      Or list just those matching a prefix pattern
      
       $ qemu-trace-stap list -v qemu-system-x86_64 'qio*'
       Using tapset dir '/home/berrange/usr/qemu-git/share/systemtap/tapset' for binary '/home/berrange/usr/qemu-git/bin/qemu-system-x86_64'
       Listing probes with name 'qemu.system.x86_64.log.qio*'
       qio_channel_command_abort
       qio_channel_command_new_pid
       qio_channel_command_new_spawn
       qio_channel_command_wait
       qio_channel_file_new_fd
       ...snip...
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Message-id: 20190123120016.4538-5-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      62dd1048
    • M
      qapi: Eliminate indirection through qmp_event_get_func_emit() · a9529100
      Markus Armbruster 提交于
      The qapi_event_send_FOO() functions emit events like this:
      
          QMPEventFuncEmit emit;
      
          emit = qmp_event_get_func_emit();
          if (!emit) {
              return;
          }
      
          qmp = qmp_event_build_dict("FOO");
          [put event arguments into @qmp...]
      
          emit(QAPI_EVENT_FOO, qmp);
      
      The value of qmp_event_get_func_emit() depends only on the program:
      
      * In qemu-system-FOO, it's always monitor_qapi_event_queue.
      
      * In tests/test-qmp-event, it's always event_test_emit.
      
      * In all other programs, it's always null.
      
      This is exactly the kind of dependence the linker is supposed to
      resolve; we don't actually need an indirection.
      
      Note that things would fall apart if we linked more than one QAPI
      schema into a single program: each set of qapi_event_send_FOO() uses
      its own event enumeration, yet they share a single emit function.
      Which takes the event enumeration as an argument.  Which one if
      there's more than one?
      
      More seriously: how does this work even now?  qemu-system-FOO wants
      QAPIEvent, and passes a function taking that to
      qmp_event_set_func_emit().  test-qmp-event wants test_QAPIEvent, and
      passes a function taking that to qmp_event_set_func_emit().
      
      It works by type trickery, of course:
      
          typedef void (*QMPEventFuncEmit)(unsigned event, QDict *dict);
      
          void qmp_event_set_func_emit(QMPEventFuncEmit emit);
      
          QMPEventFuncEmit qmp_event_get_func_emit(void);
      
      We use unsigned instead of the enumeration type.  Relies on both
      enumerations boiling down to unsigned, which happens to be true for
      the compilers we use.
      
      Clean this up as follows:
      
      * Generate qapi_event_send_FOO() that call PREFIX_qapi_event_emit()
        instead of the value of qmp_event_set_func_emit().
      
      * Generate a prototype for PREFIX_qapi_event_emit() into
        qapi-events.h.
      
      * PREFIX_ is empty for qapi/qapi-schema.json, and test_ for
        tests/qapi-schema/qapi-schema-test.json.  It's qga_ for
        qga/qapi-schema.json, and doc-good- for
        tests/qapi-schema/doc-good.json, but those don't define any events.
      
      * Rename monitor_qapi_event_queue() to qapi_event_emit() instead of
        passing it to qmp_event_set_func_emit().  This takes care of
        qemu-system-FOO.
      
      * Rename event_test_emit() to test_qapi_event_emit() instead of
        passing it to qmp_event_set_func_emit().  This takes care of
        tests/test-qmp-event.
      
      * Add a qapi_event_emit() that does nothing to stubs/monitor.c.  This
        takes care of all other programs that link code emitting QMP events.
      
      * Drop qmp_event_set_func_emit(), qmp_event_get_func_emit().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20181218182234.28876-3-armbru@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      [Commit message typos fixed]
      a9529100
    • M
      qapi: Belatedly update docs for commit 9c2f56e9 · 900cbbde
      Markus Armbruster 提交于
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20181218182234.28876-2-armbru@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      900cbbde
  13. 21 1月, 2019 1 次提交
  14. 19 1月, 2019 2 次提交
  15. 18 1月, 2019 3 次提交
  16. 15 1月, 2019 1 次提交
  17. 05 1月, 2019 1 次提交
    • E
      nbd: Document timeline of various features · ba2d3b3a
      Eric Blake 提交于
      It can be useful to figure out which NBD protocol features are
      exposed by a server, as well as what features a client will
      take advantage of if available, for a given qemu release.  It's
      not always precise to base features on version numbers (thanks
      to downstream backports), but any documentation is better than
      making users search through git logs themselves.
      
      This patch originally stemmed from a request to document that
      pristine 3.0 has a known bug where NBD_OPT_LIST_META_CONTEXT
      with 0 queries forgot to advertise an available
      "qemu:dirty-bitmap" context, but documenting bugs like this (or
      the fact that 3.0 also botched NBD_CMD_CACHE) gets to be too
      much details, especially since buggy releases will be less
      likely connection targets over time.  Instead, I chose to just
      remind users to check stable release branches.
      Suggested-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20181215135324.152629-3-eblake@redhat.com>
      Reviewed-by: NRichard W.M. Jones <rjones@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      ba2d3b3a
  18. 22 12月, 2018 1 次提交
  19. 18 12月, 2018 1 次提交
  20. 14 12月, 2018 1 次提交