Skip to content
Snippets Groups Projects
  1. Apr 24, 2023
  2. Apr 20, 2023
    • Paolo Bonzini's avatar
      monitor: mark mixed functions that can suspend · a50c99bc
      Paolo Bonzini authored
      
      There should be no paths from a coroutine_fn to aio_poll, however in
      practice coroutine_mixed_fn will call aio_poll in the !qemu_in_coroutine()
      path.  By marking mixed functions, we can track accurately the call paths
      that execute entirely in coroutine context, and find more missing
      coroutine_fn markers.  This results in more accurate checks that
      coroutine code does not end up blocking.
      
      If the marking were extended transitively to all functions that call
      these ones, static analysis could be done much more efficiently.
      However, this is a start and makes it possible to use vrc's path-based
      searches to find potential bugs where coroutine_fns call blocking functions.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a50c99bc
  3. Mar 14, 2023
  4. Mar 13, 2023
  5. Mar 07, 2023
  6. Mar 01, 2023
  7. Feb 23, 2023
  8. Feb 17, 2023
  9. Feb 06, 2023
  10. Feb 01, 2023
    • Hanna Reitz's avatar
      qemu-img: Let info print block graph · c04d0ab0
      Hanna Reitz authored
      
      For every node in the backing chain, collect its BlockGraphInfo struct
      using bdrv_query_block_graph_info().  Print all nodes' information,
      indenting child nodes and labelling them with a path constructed from
      the child names leading to the node from the root (e.g. /file/file).
      
      Note that we open each image with BDRV_O_NO_BACKING, so its backing
      child is omitted from this graph, and thus presented in the previous
      manner: By simply concatenating all images' information, separated with
      blank lines.
      
      This affects two iotests:
      - 065: Here we try to get the format node's format specific information.
        The pre-patch code does so by taking all lines from "Format specific
        information:" until an empty line.  This format specific information
        is no longer followed by an empty line, though, but by child node
        information, so limit the range by "Child node '/file':".
      - 302: Calls qemu_img() for qemu-img info directly, which does not
        filter the output, so the child node information ends up in the
        output.
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20220620162704.80987-12-hreitz@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      c04d0ab0
    • Hanna Reitz's avatar
      block/qapi: Introduce BlockGraphInfo · 6cab3399
      Hanna Reitz authored
      
      Introduce a new QAPI type BlockGraphInfo and an associated
      bdrv_query_block_graph_info() function that recursively gathers
      BlockNodeInfo objects through a block graph.
      
      A follow-up patch is going to make "qemu-img info" use this to print
      information about all nodes that are (usually implicitly) opened for a
      given image file.
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20220620162704.80987-8-hreitz@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      6cab3399
    • Hanna Reitz's avatar
      qemu-img: Use BlockNodeInfo · b1f4cd15
      Hanna Reitz authored
      
      qemu-img info never uses ImageInfo's backing-image field, because it
      opens the backing chain one by one with BDRV_O_NO_BACKING, and prints
      all backing chain nodes' information consecutively.  Use BlockNodeInfo
      to make it clear that we only print information about a single node, and
      that we are not using the backing-image field.
      
      Notably, bdrv_image_info_dump() does not evaluate the backing-image
      field, so we can easily make it take a BlockNodeInfo pointer (and
      consequentially rename it to bdrv_node_info_dump()).  It makes more
      sense this way, because again, the interface now makes it syntactically
      clear that backing-image is ignored by this function.
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20220620162704.80987-6-hreitz@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      b1f4cd15
    • Hanna Reitz's avatar
      block: Split BlockNodeInfo off of ImageInfo · a2085f89
      Hanna Reitz authored
      
      ImageInfo sometimes contains flat information, and sometimes it does
      not.  Split off a BlockNodeInfo struct, which only contains information
      about a single node and has no link to the backing image.
      
      We do this so we can extend BlockNodeInfo to a BlockGraphInfo struct,
      which has links to all child nodes, not just the backing node.  It would
      be strange to base BlockGraphInfo on ImageInfo, because then this
      extended struct would have two links to the backing node (one in
      BlockGraphInfo as one of all the child links, and one in ImageInfo).
      
      Furthermore, it is quite common to ignore the backing-image field
      altogether: bdrv_query_image_info() does not set it, and
      bdrv_image_info_dump() does not evaluate it.  That signals that we
      should have different structs for describing a single node and one that
      has a link to the backing image.
      
      Still, bdrv_query_image_info() and bdrv_image_info_dump() are not
      changed too much in this patch.  Follow-up patches will handle them.
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20220620162704.80987-5-hreitz@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      a2085f89
    • Hanna Reitz's avatar
      block/vmdk: Change extent info type · 456e7517
      Hanna Reitz authored
      
      VMDK's implementation of .bdrv_get_specific_info() returns information
      about its extent files, ostensibly in the form of ImageInfo objects.
      However, it does not get this information through
      bdrv_query_image_info(), but fills only a select few fields with custom
      information that does not always match the fields' purposes.
      
      For example, @format, which is supposed to be a block driver name, is
      filled with the extent type, e.g. SPARSE or FLAT.
      
      In ImageInfo, @compressed shows whether the data that can be seen in the
      image is stored in compressed form or not.  For example, a compressed
      qcow2 image will store compressed data in its data file, but when
      accessing the qcow2 node, you will see normal data.  This is not how
      VMDK uses the @compressed field for its extent files: Instead, it
      signifies whether accessing the extent file will yield compressed data
      (which the VMDK driver then (de-)compresses).
      
      Create a new structure to represent the extent information.  This allows
      us to clarify the fields' meanings, and it clearly shows that these are
      not complete ImageInfo objects.  (That is, if a user wants an extent
      file's ImageInfo object, they will need to query it separately, and will
      not get it from ImageInfoSpecificVmdk.extents.)
      
      Note that this removes the last use of ['ImageInfo'] (i.e. an array of
      ImageInfo objects), so the QAPI generator will no longer generate
      ImageInfoList by default.  However, we use it in qemu-img.c, so we need
      to create a dummy object to force the generate to create that type,
      similarly to DummyForceArrays in machine.json (introduced in commit
      9f08c8ec ("qapi: Lazy creation of array
      types")).
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20220620162704.80987-4-hreitz@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      456e7517
    • Hanna Reitz's avatar
      block/file: Add file-specific image info · 7f36a50a
      Hanna Reitz authored
      
      Add some (optional) information that the file driver can provide for
      image files, namely the extent size hint.
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20220620162704.80987-3-hreitz@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      7f36a50a
  11. Jan 30, 2023
    • Daniel P. Berrangé's avatar
      qapi, audio: Make introspection reflect build configuration more closely · 7a92a857
      Daniel P. Berrangé authored
      
      Currently the -audiodev accepts any audiodev type regardless of what is
      built in to QEMU. An error only occurs later at runtime when a sound
      device tries to use the audio backend.
      
      With this change QEMU will immediately reject -audiodev args that are
      not compiled into the binary. The QMP schema will also be introspectable
      to identify what is compiled in.
      
      This also helps to avoid compiling code that is not required in the
      binary. Note: When building the audiodevs as modules, the patch only
      compiles out code for modules that we don't build at all.
      
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      [thuth: Rebase, take sndio and dbus devices into account]
      Message-Id: <20230123083957.20349-3-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      7a92a857
    • Daniel P. Berrangé's avatar
      qapi, audio: add query-audiodev command · 637d1809
      Daniel P. Berrangé authored
      
      Way back in QEMU 4.0, the -audiodev command line option was introduced
      for configuring audio backends. This CLI option does not use QemuOpts
      so it is not visible for introspection in 'query-command-line-options',
      instead using the QAPI Audiodev type.  Unfortunately there is also no
      QMP command that uses the Audiodev type, so it is not introspectable
      with 'query-qmp-schema' either.
      
      This introduces a 'query-audiodev' command that simply reflects back
      the list of configured -audiodev command line options. This alone is
      maybe not very useful by itself, but it makes Audiodev introspectable
      via 'query-qmp-schema', so that libvirt (and other upper layer tools)
      can discover the available audiodevs.
      
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      [thuth: Update for upcoming QEMU v8.0, and use QAPI_LIST_PREPEND]
      Message-Id: <20230123083957.20349-2-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      637d1809
  12. Jan 06, 2023
  13. Nov 11, 2022
    • Stefan Weil's avatar
      Fix several typos in documentation (found by codespell) · 2cb40d44
      Stefan Weil authored
      
      Those typos are in files which are used to generate the QEMU manual.
      
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Message-Id: <20221110190825.879620-1-sw@weilnetz.de>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarAni Sinha <ani@anisinha.ca>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      [thuth: update sentence in can.rst as suggested by Peter]
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      2cb40d44
    • Thomas Huth's avatar
      qga: Allow building of the guest agent without system emulators or tools · e0091133
      Thomas Huth authored
      
      If configuring with "--disable-system --disable-user --enable-guest-agent"
      the linking currently fails with:
      
      qga/qemu-ga.p/commands.c.o: In function `qmp_command_info':
      build/../../home/thuth/devel/qemu/qga/commands.c:70: undefined reference to `qmp_command_name'
      build/../../home/thuth/devel/qemu/qga/commands.c:71: undefined reference to `qmp_command_is_enabled'
      build/../../home/thuth/devel/qemu/qga/commands.c:72: undefined reference to `qmp_has_success_response'
      qga/qemu-ga.p/commands.c.o: In function `qmp_guest_info':
      build/../../home/thuth/devel/qemu/qga/commands.c:82: undefined reference to `qmp_for_each_command'
      qga/qemu-ga.p/commands.c.o: In function `qmp_guest_exec':
      build/../../home/thuth/devel/qemu/qga/commands.c:410: undefined reference to `qbase64_decode'
      qga/qemu-ga.p/channel-posix.c.o: In function `ga_channel_open':
      build/../../home/thuth/devel/qemu/qga/channel-posix.c:214: undefined reference to `unix_listen'
      build/../../home/thuth/devel/qemu/qga/channel-posix.c:228: undefined reference to `socket_parse'
      build/../../home/thuth/devel/qemu/qga/channel-posix.c:234: undefined reference to `socket_listen'
      qga/qemu-ga.p/commands-posix.c.o: In function `qmp_guest_file_write':
      build/../../home/thuth/devel/qemu/qga/commands-posix.c:527: undefined reference to `qbase64_decode'
      
      Let's make sure that we also compile and link the required files if
      the system emulators have not been enabled.
      
      Message-Id: <20221110083626.31899-1-thuth@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      e0091133
  14. Nov 10, 2022
  15. Nov 05, 2022
  16. Nov 02, 2022
  17. Oct 31, 2022
  18. Oct 28, 2022
Loading