Skip to content
Snippets Groups Projects
  1. Jul 26, 2022
    • Hanna Reitz's avatar
      iotests/131: Add parallels regression test · 0c2cb382
      Hanna Reitz authored
      
      Test an allocating write to a parallels image that has a backing node.
      Before HEAD^, doing so used to give me a failed assertion (when the
      backing node contains only `42` bytes; the results varies with the value
      chosen, for `0` bytes, for example, all I get is EIO).
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Reviewed-by: default avatarDenis V. Lunev <den@openvz.org>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      Message-Id: <20220714132801.72464-3-hreitz@redhat.com>
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      0c2cb382
    • Hanna Reitz's avatar
      block/parallels: Fix buffer-based write call · eba088f9
      Hanna Reitz authored
      
      Commit a4072543 has changed the I/O here
      from working on a local one-element I/O vector to just using the buffer
      directly (using the bdrv_co_pread()/bdrv_co_pwrite() helper functions
      introduced shortly before).
      
      However, it only changed the bdrv_co_preadv() call to bdrv_co_pread() -
      the subsequent bdrv_co_pwritev() call stayed this way, and so still
      expects a QEMUIOVector pointer instead of a plain buffer.  We must
      change that to be a bdrv_co_pwrite() call.
      
      Fixes: a4072543 ("block/parallels: use buffer-based io")
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Reviewed-by: default avatarDenis V. Lunev <den@openvz.org>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      Message-Id: <20220714132801.72464-2-hreitz@redhat.com>
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      eba088f9
    • Richard Henderson's avatar
      Merge tag 'pull-target-arm-20220726' of... · f6cce6bc
      Richard Henderson authored
      Merge tag 'pull-target-arm-20220726' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
      
      target-arm queue:
       * Update Coverity component definitions
       * target/arm: Add MO_128 entry to pred_esz_masks[]
       * configure: Fix portability issues
       * hw/display/bcm2835_fb: Fix framebuffer allocation address
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmLgBfkZHHBldGVyLm1h
      # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3vFdD/wLVC2gJ4Uxt2Ri5vutF6fl
      # RKTNiIhcE/XQNUogQiVIERYJJ9CUOALtg3q/SPCItq0nFgNG4h+sB7Ms+VcYVmNd
      # iphbYBF4nFXYsAGlYIiAPU4I5SVnL4ORLMovRmlqMGYO/xlWe4LMIIOI+Iky4z9G
      # pgho7n0yuKNPwikFdX1nKH2lYvoh9pn/p8buwre4qg6z/p4XssV295NAWeGvynab
      # Sj9cmBvQC9ijKADvWXrfaGbHWQCAOwjRI7su/Ky0QGHjEprBpyCC8QtKEPP0flTh
      # ffWCPX/pATwkbOH6m7rVFhIpI0r+6UQaDX/5SWruMNRto6WocNbX3JYT4XzdNln9
      # nkVTgqn5PTzfd801RmfhJ/iGV2zf3ZE/Entj3n1RrpxI1gb56Q2tFghJNVgnL4Mq
      # eBeODhPUJRqOd2dIcFKQbRhQs4Uaonu4V6QM+F7SekdV7VbU5VbJzB/9IvCkpNJo
      # TqHDLp3makEabonal2gucmhxon7+C+4NXv+YMzTQbG2g/lVa4kmXehEA5BDcFScE
      # XYKBEXkWsabV2IRVaZybu+0qkD+2PNtWQP3iAqOX8RPCGKieu4fbDTbzaPJAPNTb
      # OBgDnzO3tukwI1upHQDIuO06poGfwMjJGKR4IZgCphTzNO7AtzUBFR96wmoaJGfq
      # t7VO2lnKf5tGPifFTi/egg==
      # =SWMq
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 26 Jul 2022 08:19:21 AM PDT
      # gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
      # gpg:                issuer "peter.maydell@linaro.org"
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full]
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [full]
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full]
      
      * tag 'pull-target-arm-20220726' of https://git.linaro.org/people/pmaydell/qemu-arm
      
      :
        hw/display/bcm2835_fb: Fix framebuffer allocation address
        configure: Avoid '==' bashism
        configure: Drop dead code attempting to use -msmall-data on alpha hosts
        configure: Don't use bash-specific string-replacement syntax
        configure: Add braces to clarify intent of $emu[[:space:]]
        configure: Add missing POSIX-required space
        target/arm: Add MO_128 entry to pred_esz_masks[]
        scripts/coverity-scan/COMPONENTS.md: Update slirp component info
        scripts/coverity-scan/COMPONENTS.md: Add loongarch component
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      f6cce6bc
    • Alan Jian's avatar
      hw/display/bcm2835_fb: Fix framebuffer allocation address · 5865d99f
      Alan Jian authored
      This patch fixes the dedicated framebuffer mailbox interface by
      removing an unneeded offset.  This means that we pick the framebuffer
      address in the same way that we do if the guest code uses the buffer
      allocate mechanism of the bcm2835_property interface (case
      0x00040001: /* Allocate buffer */ in bcm2835_property.c).
      
      The documentation of this mailbox interface doesn't say anything
      about using parts of the request buffer address to affect the
      chosen framebuffer address:
      https://github.com/raspberrypi/firmware/wiki/Mailbox-framebuffer-interface
      
      Some baremetal applications like the Screen01/Screen02 examples from
      Baking Pi tutorial[1] didn't work before this patch.
      
      [1] https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/screen01.html
      
      
      
      Signed-off-by: default avatarAlan Jian <alanjian85@outlook.com>
      Message-id: 20220725145838.8412-1-alanjian85@outlook.com
      [PMM: tweaked commit message]
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      5865d99f
    • Peter Maydell's avatar
      configure: Avoid '==' bashism · c5cfdaba
      Peter Maydell authored
      
      The '==' operator to test is a bashism; the standard way to copmare
      strings is '='. This causes dash to complain:
      
      ../../configure: 681: test: linux: unexpected operator
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-6-peter.maydell@linaro.org
      c5cfdaba
    • Peter Maydell's avatar
      configure: Drop dead code attempting to use -msmall-data on alpha hosts · aca5001d
      Peter Maydell authored
      
      In commit 823eb013 we moved the setting of ARCH from configure
      to meson.build, but we accidentally left behind one attempt to use
      $ARCH in configure, which was trying to add -msmall-data to the
      compiler flags on Alpha hosts.  Since ARCH is now never set, the test
      always fails and we never add the flag.
      
      There isn't actually any need to use this compiler flag on Alpha:
      the original intent was that it would allow us to simplify our TCG
      codegen on that platform, but we never actually made the TCG changes
      that would rely on -msmall-data.
      
      Drop the effectively-dead code from configure, as we don't need it.
      
      This was spotted by shellcheck:
      
      In ./configure line 2254:
      case "$ARCH" in
            ^---^ SC2153: Possible misspelling: ARCH may not be assigned, but arch is.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-5-peter.maydell@linaro.org
      aca5001d
    • Peter Maydell's avatar
      configure: Don't use bash-specific string-replacement syntax · 65842b03
      Peter Maydell authored
      
      The variable string-replacement syntax ${var/old/new} is a bashism
      (though it is also supported by some other shells), and for instance
      does not work with the NetBSD /bin/sh, which complains:
       ../src/configure: 687: Syntax error: Bad substitution
      
      Replace it with a more portable sed-based approach, similar to
      what we already do in quote_sh().
      
      Note that shellcheck also diagnoses this:
      
      In ./configure line 687:
          e=${e/'\'/'\\'}
            ^-----------^ SC2039: In POSIX sh, string replacement is undefined.
                 ^-- SC1003: Want to escape a single quote? echo 'This is how it'\''s done'.
                      ^-- SC1003: Want to escape a single quote? echo 'This is how it'\''s done'.
      
      In ./configure line 688:
          e=${e/\"/'\"'}
            ^----------^ SC2039: In POSIX sh, string replacement is undefined.
      
      Fixes: 8154f5e6 ("meson: Prefix each element of firmware path")
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-4-peter.maydell@linaro.org
      65842b03
    • Peter Maydell's avatar
      configure: Add braces to clarify intent of $emu[[:space:]] · d466d416
      Peter Maydell authored
      
      In shell script syntax, $var[something] is not special for variable
      expansion: $var is expanded.  However, as it can look as if it were
      intended to be an array element access (the correct syntax for which
      is ${var[something]}), shellcheck recommends using explicit braces
      around ${var} to clarify the intended expansion.
      
      This fixes the warning:
      
      In ./configure line 2346:
              if "$target_ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
                                                                    ^-- SC1087: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: 20220720152631.450903-3-peter.maydell@linaro.org
      d466d416
    • Peter Maydell's avatar
      configure: Add missing POSIX-required space · 35a7a6fc
      Peter Maydell authored
      
      In commit 7d7dbf9d we added a line to the configure script
      which is not valid POSIX shell syntax, because it is missing a space
      after a '!' character. shellcheck diagnoses this:
      
      if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
          ^-- SC1035: You are missing a required space after the !.
      
      and the OpenBSD shell will not correctly handle this without the space.
      
      Fixes: 7d7dbf9d ("configure: replace --enable/disable-git-update with --with-git-submodules")
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Tested-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-id: 20220720152631.450903-2-peter.maydell@linaro.org
      35a7a6fc
    • Peter Maydell's avatar
      target/arm: Add MO_128 entry to pred_esz_masks[] · fca75f60
      Peter Maydell authored
      
      In commit 7390e0e9, we added support for SME loads and stores.
      Unlike SVE loads and stores, these include handling of 128-bit
      elements.  The SME load/store functions call down into the existing
      sve_cont_ldst_elements() function, which uses the element size MO_*
      value as an index into the pred_esz_masks[] array.  Because this code
      path now has to handle MO_128, we need to add an extra element to the
      array.
      
      This bug was spotted by Coverity because it meant we were reading off
      the end of the array.
      
      Resolves: Coverity CID 1490539, 1490541, 1490543, 1490544, 1490545,
       1490546, 1490548, 1490549, 1490550, 1490551, 1490555, 1490557,
       1490558, 1490560, 1490561, 1490563
      Fixes: 7390e0e9 ("target/arm: Implement SME LD1, ST1")
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20220718100144.3248052-1-peter.maydell@linaro.org
      fca75f60
    • Peter Maydell's avatar
      scripts/coverity-scan/COMPONENTS.md: Update slirp component info · 02b7035d
      Peter Maydell authored
      
      Update the regex for the slirp component now that it lives
      solely inside /slirp/, and note that it should be ignored in
      Coverity analysis (because it's a separate upstream project
      now, and they run Coverity on it themselves).
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20220718142310.16013-3-peter.maydell@linaro.org
      02b7035d
    • Peter Maydell's avatar
      scripts/coverity-scan/COMPONENTS.md: Add loongarch component · 32226db0
      Peter Maydell authored
      
      Add the component regex for the new loongarch target.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20220718142310.16013-2-peter.maydell@linaro.org
      32226db0
    • Peter Maydell's avatar
      Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging · d1c912b8
      Peter Maydell authored
      linux-user pull request 20220726
      
      # gpg: Signature made Tue 26 Jul 2022 10:44:29 BST
      # gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
      # gpg:                issuer "laurent@vivier.eu"
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu
      
      :
        linux-user: Use target abi_int type for pipefd[1] in pipe()
        linux-user: Unconditionally use pipe2() syscall
        linux-user/hppa: Fix segfaults on page zero
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d1c912b8
    • Peter Maydell's avatar
      Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging · 0d0275c3
      Peter Maydell authored
      # gpg: Signature made Tue 26 Jul 2022 09:47:24 BST
      # gpg:                using RSA key EF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
      
      * tag 'net-pull-request' of https://github.com/jasowang/qemu
      
      :
        vdpa: Fix memory listener deletions of iova tree
        vhost: Get vring base from vq, not svq
        e1000e: Fix possible interrupt loss when using MSI
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      0d0275c3
    • Eugenio Pérez's avatar
      vdpa: Fix memory listener deletions of iova tree · 75a8ce64
      Eugenio Pérez authored
      
      vhost_vdpa_listener_region_del is always deleting the first iova entry
      of the tree, since it's using the needle iova instead of the result's
      one.
      
      This was detected using a vga virtual device in the VM using vdpa SVQ.
      It makes some extra memory adding and deleting, so the wrong one was
      mapped / unmapped. This was undetected before since all the memory was
      mappend and unmapped totally without that device, but other conditions
      could trigger it too:
      
      * mem_region was with .iova = 0, .translated_addr = (correct GPA).
      * iova_tree_find_iova returned right result, but does not update
        mem_region.
      * iova_tree_remove always removed region with .iova = 0. Right iova were
        sent to the device.
      * Next map will fill the first region with .iova = 0, causing a mapping
        with the same iova and device complains, if the next action is a map.
      * Next unmap will cause to try to unmap again iova = 0, causing the
        device to complain that no region was mapped at iova = 0.
      
      Fixes: 34e3c94e ("vdpa: Add custom IOTLB translations to SVQ")
      Reported-by: default avatarLei Yang <leiyang@redhat.com>
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      75a8ce64
    • Eugenio Pérez's avatar
      vhost: Get vring base from vq, not svq · 2fdac348
      Eugenio Pérez authored
      
      The SVQ vring used idx usually match with the guest visible one, as long
      as all the guest buffers (GPA) maps to exactly one buffer within qemu's
      VA. However, as we can see in virtqueue_map_desc, a single guest buffer
      could map to many buffers in SVQ vring.
      
      Also, its also a mistake to rewind them at the source of migration.
      Since VirtQueue is able to migrate the inflight descriptors, its
      responsability of the destination to perform the rewind just in case it
      cannot report the inflight descriptors to the device.
      
      This makes easier to migrate between backends or to recover them in
      vhost devices that support set in flight descriptors.
      
      Fixes: 6d0b2226 ("vdpa: Adapt vhost_vdpa_get_vring_base to SVQ")
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      2fdac348
    • Ake Koomsin's avatar
      e1000e: Fix possible interrupt loss when using MSI · dd0ef128
      Ake Koomsin authored
      
      Commit "e1000e: Prevent MSI/MSI-X storms" introduced msi_causes_pending
      to prevent interrupt storms problem. It was tested with MSI-X.
      
      In case of MSI, the guest can rely solely on interrupts to clear ICR.
      Upon clearing all pending interrupts, msi_causes_pending gets cleared.
      However, when e1000e_itr_should_postpone() in e1000e_send_msi() returns
      true, MSI never gets fired by e1000e_intrmgr_on_throttling_timer()
      because msi_causes_pending is still set. This results in interrupt loss.
      
      To prevent this, we need to clear msi_causes_pending when MSI is going
      to get fired by the throttling timer. The guest can then receive
      interrupts eventually.
      
      Signed-off-by: default avatarAke Koomsin <ake@igel.co.jp>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      dd0ef128
  2. Jul 25, 2022
  3. Jul 22, 2022
  4. Jul 21, 2022
    • Peter Maydell's avatar
      Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging · 5288bee4
      Peter Maydell authored
      * Boolean statistics for KVM
      * Fix build on Haiku
      
      # gpg: Signature made Tue 19 Jul 2022 10:32:34 BST
      # gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
      # gpg:                issuer "pbonzini@redhat.com"
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * tag 'for-upstream' of https://gitlab.com/bonzini/qemu
      
      :
        util: Fix broken build on Haiku
        kvm: add support for boolean statistics
        monitor: add support for boolean statistics
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      5288bee4
  5. Jul 20, 2022
Loading