Skip to content
Snippets Groups Projects
  1. Nov 14, 2023
  2. Nov 13, 2023
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-request-2023-11-13' of https://gitlab.com/thuth/qemu into staging · f78ea7dd
      Stefan Hajnoczi authored
      * Fix compilation with Clang 17 on s390x hosts
      * Two small s390x PCI fixes
      * Update MAINTAINERS file with more entries
      * Fix NetBSD VM test
      * Clean up some bad wordings
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmVSAoIRHHRodXRoQHJl
      # ZGhhdC5jb20ACgkQLtnXdP5wLbVXBg//VVZS5CXEfOFV91I1kqQnLCvgwmuAyqEg
      # PI2/HBxuhzeBx+F1t7uR0n15tUPi1zkFFBOpyBDBubvWcp4vGvFwLQoiBCUvNzBA
      # +b1vMySP+K0OO1X5yT3cFHXF9q0o0V5WADwemf5RglIPjlTOIiz9qhD4EYqd2QHC
      # EUd9Y45DP4Y0V5raHLjY990f/zr3PuSAB6MASFTUnKdgGkRqonLWdLDdIZNDrZuL
      # oGwx1ALXgBOMV3yNyQx9jZBT24git/ai1vd9AU/d3JRKDPsd+4vC39+PTI9NH4h6
      # oQglvo399f64cir1f1JJ3MN4ZtwXZpwUkjeTMcR9XZxk7GibU7P2arG5M3TERdmE
      # VLqylYsnbJojWOeCH+TViJapRhg1CzUveVlQofr7GHvf2N3oy3BrKaV715gauEyW
      # zpjbhSPpIQu9WFXt8+tSquqbvpAP/VlLrOV73D4LzJ7WdTa9CHmSek8D0zoRQDZR
      # 8OixrgoBKS+pmBDmTve5gFsIKhZIz9CrmaAKKYdskC8blENxCng8LOFp7sg2PK3M
      # U0lWYoDS7qZ85761Bl+QaBdFocdahQqkO/LUQuhoSt2OvA1EGAz2FdVSKkmPDdSS
      # P/homr4hOXIqJFSsZj0YNUTIXsXwLBvKjvcJPAWYgbXZhim0LtPQTQO3+ignwGyu
      # RXjaVkvkf/s=
      # =+2rp
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 13 Nov 2023 06:03:30 EST
      # gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
      # gpg:                issuer "thuth@redhat.com"
      # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
      # gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
      # gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
      # gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
      # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5
      
      * tag 'pull-request-2023-11-13' of https://gitlab.com/thuth/qemu
      
      :
        hw/audio/es1370: Clean up comment
        tests/tsan: Rename the file with the entries that should be ignored
        test-resv-mem: Fix CID 1523911
        tests/vm/netbsd: Use Python v3.11
        MAINTAINERS: Add a general architecture section for x86
        MAINTAINERS: Extend the Stellaris section
        MAINTAINERS: Add hw/display/sii9022.c to the Versatile Express section
        MAINTAINERS: Add hw/input/ads7846.c to the PXA2XX section
        MAINTAINERS: Add include/hw/input/pl050.h to the PrimeCell/CMSDK section
        s390x/pci: only limit DMA aperture if vfio DMA limit reported
        s390x/pci: bypass vfio DMA counting when using cdev
        host/include/generic/host/atomic128: Fix compilation problem with Clang 17
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      f78ea7dd
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-qapi-2023-11-13' of https://repo.or.cz/qemu/armbru into staging · 05fa2277
      Stefan Hajnoczi authored
      QAPI patches patches for 2023-11-13
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmVR7j4SHGFybWJydUBy
      # ZWRoYXQuY29tAAoJEDhwtADrkYZTmT0P/imN9c6xnkx8Kff0iEaT88N8YUHEu5gt
      # ECiQtfpbU8y8itIrWpuXWk7HUC1Jp397vKgUhmmr5Im32vx1waUGz/zxdBiitw0a
      # 2McXfD6Lbz3LN+q002Vq0QjP3tMeoc8DoP/CagmdXniGrxyJSs/oIsUAdqZnymug
      # ZREYRUlbrgJ8XA06n9qIaCGpiihBLl2XBbx4SV9JWle/9vKpII9EBrWNXTcCkde3
      # W6gHEKgGAKa1NGYMJtOncanpnzVP0qoLmb3jmiR9tpj3YBB/5LP9l4O11DTC+PQ5
      # nn+OmtmjuKE2a2C79Y8VCbRPR6MPSDDbuWwu7Q+A7vXi/1gnkMeXH+A6jE0d3y+p
      # PWKqBK65U+yS0IwiUGpMpcGo2WtZiBLzp3ragt+gzi3gV5GvEvPv0uvcEd66in95
      # +M2RoVhkbi+e03mF+vDldvbwBYPwlNdgAX/ly7SR76YZybSMK0Jkp7yfvxN35LJc
      # kgCo0CY9kAYYUgPUJMiPhaxSfRVk738Qex7QCvFwDiZE8l4XEwoT1PRO0fs8G5aI
      # /Yz7hhjkaLw+i+k/tCVCVe+hOgMxxVUz/gZzV4+yrfQNxz41v4WqCfE8a+m6RROo
      # TaceVJPKqsyoJ2zmS+CpEPFWkWXEQSQ14yu2wdF8wMyKEWDS4yhRG78rnYC2/ZhC
      # zullCL7QfFbf
      # =bGOD
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 13 Nov 2023 04:37:02 EST
      # gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
      # gpg:                issuer "armbru@redhat.com"
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * tag 'pull-qapi-2023-11-13' of https://repo.or.cz/qemu/armbru
      
      :
        tests/qapi-schema: Tidy up pylint warnings and advice
        sphinx/qapidoc: Tidy up pylint warning raise-missing-from
        qapi: Fix QAPISchemaEntity.__repr__()
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      05fa2277
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-shadow-2023-11-13' of https://repo.or.cz/qemu/armbru into staging · c86a59fd
      Stefan Hajnoczi authored
      -Wshadow=local patches for 2023-11-13
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmVR7ZISHGFybWJydUBy
      # ZWRoYXQuY29tAAoJEDhwtADrkYZT7YkP/RUaHzka7vJhcAJSFgCviZ7NYZFbDYkT
      # MT9Hi4XYYkOqS0BQ9xZPZDy47oB4pqZlNfMCUD3vmD8LLdVsUyRIbZxu59SdgTOa
      # dnNvXIsC16y7Hk6VRfWB4bifOa1rmbF2el5WevA1UpXMRnjkMbtahbXXlSudQpeQ
      # Y0e5mILKcbLD1Q6RuTounkfZ/C5pJZKycxVrN8YvFBQ2pILR/JtVwCU9rQ525Sgx
      # tgScQ+Z+S4Pw+hyD8kpnw+xqk/iXprgX7GmOhCiy4yLdndq1nZgXOXnZvuIvG3n2
      # cvM+dNTVH32qlLMqNdwAaOjAVStobdt85oiyMTnkBfi1+6B+5I6FzyH31/XhV86t
      # siCqZ1vsL8N8cuA9mhbKS2eaLrf4ubAyh07SycaKNWfxVMgIAN0rpqaUzKghGcT3
      # y9TfFI48zKgCS8AmMuUYy9G6xPlQy726ZHi4yb+t+j2dDx80eAQyXZRPQBiEomND
      # cIotxEAPdAdl+52lCwMpYPt+rnxGg4EW05de/CrjKag9Fizfz4cOuwCsSp32XuNe
      # TmE1Gi3pKaX/goLO2oTesZ6h8rbMoGZ3XG7YWoIkDpjb+XKuUXXxg+b1cv/0dntk
      # Qn6izIFdSscYXakxAkq6ci/3xS0ork3FXjDHihOKj9IWR8YrhqaDZ//XHnIL1Ld7
      # QcXs7wElHeJM
      # =66br
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 13 Nov 2023 04:34:10 EST
      # gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
      # gpg:                issuer "armbru@redhat.com"
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * tag 'pull-shadow-2023-11-13' of https://repo.or.cz/qemu/armbru
      
      :
        meson: Enable -Wshadow=local
        block/snapshot: Fix compiler warning with -Wshadow=local
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      c86a59fd
    • Stefan Hajnoczi's avatar
      Merge tag 'mem-2023-11-13' of https://github.com/davidhildenbrand/qemu into staging · 616425d4
      Stefan Hajnoczi authored
      Hi,
      
      "Host Memory Backends" and "Memory devices" queue ("mem"):
      - One virtio-mem fix leading to a QEMU crash in QEMU debug builds
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJFBAABCAAvFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAmVR4DsRHGRhdmlkQHJl
      # ZGhhdC5jb20ACgkQTd4Q9wD/g1qKMQ//fe/4mJOXQ8l5OZ3ScpC2K7yoB9dowJiQ
      # vobja0X0UhyMIOEH4V5RDtMrW3WcYzD2rVwehpLel3QbwcGa7TTB8NtkTx/t4L8P
      # tRQe3epGvz+0Kkx4kBFcNBYNR5Skl1rg9kcDhYxNmoOLngWjJcDqRBryfc3V9pEs
      # dl9sWXaQn82MGNQGuWFnTOUeOgg1LIdKMRcU2AzhAhrA/e4BqOof/JW+PVdQfzDq
      # 4Jhq74pDmKiuH9GmRZgbNlNFX+GxRk63jJrRw4HDAbSD5dBmVnLAjgFZ0sBcKxe0
      # HyiGrZOZNIMhMl/GwwQ7NilN03Hl6Hqlx03nz96/2DbiEKr6sOAErIclkUOVlr7k
      # YeJvFv+iijqyC4XF43OqoIOz8mtkxan8CuiZW/6/FV9mS/Rb3r8of/BnrK2a8/Kh
      # RJLX3tsmrxFdFDxVXWPw+UYrJy8g0xQP2Ils3OReO8QO9qqCytPqJFQsSHDlK3T3
      # 2K5FiDpMu7cjFezLyRF0LkPSWg1CV7D6Vc8mp+amc2K4Ltiyhp4xZ2TBKrEC8HHE
      # zs+EyEIfsna4SaKwVUVRimWF3+B4GojoAcAD0zju+uhD8Zw+z553zXpr5TSx0Une
      # cbMs1n5MTzE6pQo1MmL3hu1xaf6Xdx7hnJPlcnjlKXGFol8ghv6tBkHbOQA5B1/H
      # 7hVX43f3epM=
      # =7M1K
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 13 Nov 2023 03:37:15 EST
      # gpg:                using RSA key 1BD9CAAD735C4C3A460DFCCA4DDE10F700FF835A
      # gpg:                issuer "david@redhat.com"
      # gpg: Good signature from "David Hildenbrand <david@redhat.com>" [unknown]
      # gpg:                 aka "David Hildenbrand <davidhildenbrand@gmail.com>" [full]
      # gpg:                 aka "David Hildenbrand <hildenbr@in.tum.de>" [unknown]
      # gpg: WARNING: The key's User ID is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 1BD9 CAAD 735C 4C3A 460D  FCCA 4DDE 10F7 00FF 835A
      
      * tag 'mem-2023-11-13' of https://github.com/davidhildenbrand/qemu
      
      :
        virtio-mem: fix division by zero in virtio_mem_activate_memslots_to_plug()
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      616425d4
    • Stefan Hajnoczi's avatar
      MAINTAINERS: update virtio-fs mailing list address · c96c116e
      Stefan Hajnoczi authored
      
      The old virtio-fs mailing list address is no longer in use. Switch to
      the new mailing list address.
      
      Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: German Maglione <gmaglione@redhat.com>
      Cc: Hanna Czenczek <hreitz@redhat.com>
      Reviewed-by: default avatarGerman Maglione <gmaglione@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-ID: <20231111004920.148348-1-stefanha@redhat.com>
      c96c116e
    • Peter Maydell's avatar
      hw/audio/es1370: Clean up comment · 4409a6d8
      Peter Maydell authored
      
      Replace a sweary comment with one that's a bit more helpful to
      future readers of the code.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-ID: <20231110164318.2197569-1-peter.maydell@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      4409a6d8
    • Thomas Huth's avatar
      tests/tsan: Rename the file with the entries that should be ignored · f9a19bd8
      Thomas Huth authored
      
      Let's use a better file name here.
      
      Message-ID: <20231109174720.375873-1-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      f9a19bd8
    • Eric Auger's avatar
      test-resv-mem: Fix CID 1523911 · 2e990d81
      Eric Auger authored
      
      Coverity complains about passing "&expected" to "run_range_inverse_array",
      which dereferences null "expected". I guess the problem is that the
      compare_ranges() loop dereferences 'e' without testing it. However the
      loop condition is based on 'ranges' which is garanteed to have
      the same length as 'expected' given the g_assert_cmpint() just
      before the loop. So the code looks safe to me.
      
      Nevertheless adding a test on expected before the loop to get rid of the
      warning.
      
      Fixes: CID 1523901
      Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
      Reported-by: Coverity (CID 1523901)
      Message-ID: <20231110083654.277345-1-eric.auger@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      2e990d81
    • Philippe Mathieu-Daudé's avatar
      tests/vm/netbsd: Use Python v3.11 · 00ac955b
      Philippe Mathieu-Daudé authored
      
      We requiere the 'ninja-build', which depends on 'python311':
      
        $ pkgin show-deps ninja-build
        direct dependencies for ninja-build-1.11.1nb1
                python311>=3.11.0
      
      So we end up installing both Python v3.10 and v3.11:
      
        [31/76] installing python311-3.11.5...
        [54/76] installing python310-3.10.13...
        [74/76] installing py310-expat-3.10.13nb1...
      
      Then the build system picks Python v3.11, and doesn't find
      py-expat because we only installed the 3.10 version:
      
        python determined to be '/usr/pkg/bin/python3.11'
        python version: Python 3.11.5
      
        *** Ouch! ***
      
        Python's pyexpat module is not found.
        It's normally part of the Python standard library, maybe your distribution packages it separately?
        Either install pyexpat, or alleviate the need for it in the first place by installing pip and setuptools for '/usr/pkg/bin/python3.11'.
      
        (Hint: NetBSD's pkgsrc debundles this to e.g. 'py310-expat'.)
      
        ERROR: python venv creation failed
      
      Fix by installing py-expat for v3.11. Remove the v3.10
      packages since we aren't using them anymore.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20231109150900.91186-1-philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      00ac955b
    • Thomas Huth's avatar
      MAINTAINERS: Add a general architecture section for x86 · d229996b
      Thomas Huth authored
      
      It's a little bit weird that the files in target/i386/ which
      are not in a subfolder there do not have any associated
      maintainer (and thus nobody might be CC:-ed on changes to
      these files). We should have a general x86 section for these
      files, similar to what we already have for s390x and mips.
      Since Paolo is already listed as maintainer for both, the
      x86 KVM and TCG CPUs, I'd like to suggest him as maintainer
      for the general files, too.
      
      Message-ID: <20230929134551.395438-1-thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      d229996b
    • Thomas Huth's avatar
      MAINTAINERS: Extend the Stellaris section · 7c7e1f60
      Thomas Huth authored
      
      This header include/hw/timer/stellaris-gptm.h obviously belongs to the
      Stellaris machines, so let's add it to the corresponding section.
      
      And hw/display/ssd0303.c and hw/display/ssd0323.c are only used
      by hw/arm/stellaris.c, so add them to the corresponding section
      in the MAINTAINERS file, too.
      
      Message-ID: <20231020060936.524988-5-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      7c7e1f60
    • Thomas Huth's avatar
      MAINTAINERS: Add hw/display/sii9022.c to the Versatile Express section · 42c31682
      Thomas Huth authored
      
      This graphics adapter is only used by the Versatile Express machine,
      so add it to the corresponding section in MAINTAINERS.
      
      Message-ID: <20231020060936.524988-4-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      42c31682
    • Thomas Huth's avatar
      MAINTAINERS: Add hw/input/ads7846.c to the PXA2XX section · 261c1281
      Thomas Huth authored
      
      The code from hw/input/ads7846.c is only used by hw/arm/spitz.c,
      so add this file to the same section where hw/arm/spitz.c is
      listed.
      
      Message-ID: <20231020060936.524988-3-thuth@redhat.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      261c1281
    • Thomas Huth's avatar
      MAINTAINERS: Add include/hw/input/pl050.h to the PrimeCell/CMSDK section · 4940da20
      Thomas Huth authored
      
      The corresponding pl050.c file is already listed here, so we should
      mention the header here, too.
      
      Message-ID: <20231020060936.524988-2-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      4940da20
    • Matthew Rosato's avatar
      s390x/pci: only limit DMA aperture if vfio DMA limit reported · 8011b508
      Matthew Rosato authored
      
      If the host kernel lacks vfio DMA limit reporting, do not attempt
      to shrink the guest DMA aperture.
      
      Fixes: df202e3f ("s390x/pci: shrink DMA aperture to be bound by vfio DMA limit")
      Signed-off-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
      Message-ID: <20231110175108.465851-3-mjrosato@linux.ibm.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      8011b508
    • Matthew Rosato's avatar
      s390x/pci: bypass vfio DMA counting when using cdev · 0ab35658
      Matthew Rosato authored
      
      The current code assumes that there is always a vfio group, but
      that's no longer guaranteed with the iommufd backend when using
      cdev.  In this case, we don't need to track the vfio dma limit
      anyway.
      
      Signed-off-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
      Message-ID: <20231110175108.465851-2-mjrosato@linux.ibm.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      0ab35658
    • Thomas Huth's avatar
      host/include/generic/host/atomic128: Fix compilation problem with Clang 17 · 34aee9c9
      Thomas Huth authored
      When compiling QEMU with Clang 17 on a s390x, the compilation fails:
      
      In file included from ../accel/tcg/cputlb.c:32:
      In file included from /root/qemu/include/exec/helper-proto-common.h:10:
      In file included from /root/qemu/include/qemu/atomic128.h:62:
      /root/qemu/host/include/generic/host/atomic128-ldst.h:68:15: error:
       __sync builtin operation MUST have natural alignment (consider using __
      atomic). [-Werror,-Wsync-alignment]
         68 |     } while (!__sync_bool_compare_and_swap_16(ptr_align, old, new.i));
            |               ^
      In file included from ../accel/tcg/cputlb.c:32:
      In file included from /root/qemu/include/exec/helper-proto-common.h:10:
      In file included from /root/qemu/include/qemu/atomic128.h:61:
      /root/qemu/host/include/generic/host/atomic128-cas.h:36:11: error:
       __sync builtin operation MUST have natural alignment (consider using __a
      tomic). [-Werror,-Wsync-alignment]
         36 |     r.i = __sync_val_compare_and_swap_16(ptr_align, c.i, n.i);
            |           ^
      2 errors generated.
      
      It's arguably a bug in Clang since we already use __builtin_assume_aligned()
      to tell the compiler that the pointer is properly aligned. But according to
      https://github.com/llvm/llvm-project/issues/69146 it seems like the Clang
      folks don't see an easy fix on their side and recommend to use a type
      declared with __attribute__((aligned(16))) to work around this problem.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1934
      
      
      Message-ID: <20231108085954.313071-1-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      34aee9c9
    • Markus Armbruster's avatar
      tests/qapi-schema: Tidy up pylint warnings and advice · 5c24c3e2
      Markus Armbruster authored
      
      Pylint warns:
      
          tests/qapi-schema/test-qapi.py:139:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
          tests/qapi-schema/test-qapi.py:143:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
      
      Add encoding='utf-8'.
      
      Pylint advises:
      
          tests/qapi-schema/test-qapi.py:143:13: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
      
      Silence this by returning the value directly.
      
      Pylint advises:
      
          tests/qapi-schema/test-qapi.py:221:4: R1722: Consider using sys.exit() (consider-using-sys-exit)
          tests/qapi-schema/test-qapi.py:226:4: R1722: Consider using sys.exit() (consider-using-sys-exit)
      
      Sure, why not.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-ID: <20231025092925.1785934-1-armbru@redhat.com>
      Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
      5c24c3e2
    • Markus Armbruster's avatar
      sphinx/qapidoc: Tidy up pylint warning raise-missing-from · c375f05e
      Markus Armbruster authored
      
      Pylint advises:
      
          docs/sphinx/qapidoc.py:518:12: W0707: Consider explicitly re-raising using 'raise ExtensionError(str(err)) from err' (raise-missing-from)
      
      >From its manual:
      
          Python's exception chaining shows the traceback of the current
          exception, but also of the original exception.  When you raise a
          new exception after another exception was caught it's likely that
          the second exception is a friendly re-wrapping of the first
          exception.  In such cases `raise from` provides a better link
          between the two tracebacks in the final error.
      
      Makes sense, so do it.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-ID: <20231025092159.1782638-2-armbru@redhat.com>
      Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
      c375f05e
    • Markus Armbruster's avatar
      qapi: Fix QAPISchemaEntity.__repr__() · 6d133eef
      Markus Armbruster authored
      
      I messed it up on merge.  It's a debugging aid, so no impact on build.
      
      Fixes: e307a817 (qapi: provide a friendly string representation of QAPI classes)
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-ID: <20231024104841.1569250-1-armbru@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      6d133eef
    • Markus Armbruster's avatar
      meson: Enable -Wshadow=local · 569205e4
      Markus Armbruster authored
      
      Local variables shadowing other local variables or parameters make the
      code needlessly hard to understand.  Bugs love to hide in such code.
      Evidence: commit bbde6562 (migration/rdma: Fix save_page method to
      fail on polling error).
      
      Enable -Wshadow=local to prevent such issues.  Possible thanks to
      recent cleanups.  Enabling -Wshadow would prevent more issues, but
      we're not yet ready for that.
      
      As usual, the warning is only enabled when the compiler recognizes it.
      GCC does, Clang doesn't.
      
      Some shadowed locals remain in bsd-user.  Since BSD prefers Clang,
      let's not wait for its cleanup.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-ID: <20231026053115.2066744-2-armbru@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      569205e4
    • David Hildenbrand's avatar
      virtio-mem: fix division by zero in virtio_mem_activate_memslots_to_plug() · 364eff68
      David Hildenbrand authored
      
      When running with "dynamic-memslots=off", we enter
      virtio_mem_activate_memslots_to_plug() to return immediately again
      because "vmem->dynamic_memslots == false". However, the compiler might
      not optimize out calculating start_idx+end_idx, where we divide by
      vmem->memslot_size. In such a configuration, the memslot size is 0 and
      we'll get a division by zero:
      
          (qemu) qom-set vmem0 requested-size 3G
          (qemu) q35.sh: line 38: 622940 Floating point exception(core dumped)
      
      The same is true for virtio_mem_deactivate_unplugged_memslots(), however
      we never really reach that code without a prior
      virtio_mem_activate_memslots_to_plug() call.
      
      Let's fix it by simply calling these functions only with
      "dynamic-memslots=on".
      
      This was found when using a debug build of QEMU.
      
      Message-ID: <20231023111341.219317-1-david@redhat.com>
      Reprted-by: default avatarMario Casquero <mcasquer@redhat.com>
      Fixes: 177f9b1e ("virtio-mem: Expose device memory dynamically via multiple memslots if enabled")
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
      Tested-by: default avatarMario Casquero <mcasquer@redhat.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      364eff68
    • Thomas Huth's avatar
      block/snapshot: Fix compiler warning with -Wshadow=local · 6ab4f1c9
      Thomas Huth authored
      
      No need to declare a new variable in the the inner code block
      here, we can re-use the "ret" variable that has been declared
      at the beginning of the function. With this change, the code
      can now be successfully compiled with -Wshadow=local again.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20231023175038.111607-1-thuth@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Commit message tweaked]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      6ab4f1c9
  3. Nov 11, 2023
    • Stefan Hajnoczi's avatar
      Merge tag 'qdev-array-prop' of https://repo.or.cz/qemu/kevin into staging · 69680740
      Stefan Hajnoczi authored
      qdev: Make array properties user accessible again
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmVOZicRHGt3b2xmQHJl
      # ZGhhdC5jb20ACgkQfwmycsiPL9arpw/+NKGRhSMrSq9Az+z5+ANUfw5SNLJYf1hH
      # jm5ITA1Gr9htqHtBfEOdkms2wef6m7onF72rHVUlBKdqCPNMGLme5B0oQ8PZ1X1t
      # OxAZ8KYwlO98QvOYl617SA/8wxc0U4/zi192kJpbRkKF6KdbbMGtLKjHyEitA/Yv
      # izx1vkKOgQyMFGF1JgIyG4R3WmsKQW1XLqb3emVNRzCqmJpkvMJZQG8tnyEAXlIS
      # gkY69cTpaKVaM1OxdB45gjlKTGzLWC/3tTGH+u8q356fvgm/QIgrokCirCZFPIl0
      # C8hvzPm/L8hkvWtUb3EZx0DLiunWcAGvoLgBNODHojKRtQ6X9TRTrjJ41ZCLXVqv
      # tVJm+XGKC0CZ/WW5yqVOmnzfPH4z8ubzSoRv5ryz3xDb5B/Zr10+ScE+/Ee24wJ2
      # HIehxc1LgVGGpikP88/Ns/nAlIVUQxxYvSJ23R5D1+UpP6FCy6Y1pKyRtZGzPCIe
      # N4Y+52GtelBR8gOjay5INn/Yf8Fh6sFxX556BW0XKYcbQgvl2bxASe/KVnAVZ1NB
      # 8DsaAWlK+hPGopwyp2lDRuGd4kusNbzQvIUZ0mr1g9HQ/iSnT/9RFdExsj+K6QTr
      # pX42QCe4mWHPAKx38cez+Bhx4TEOw+GmHuTp/oLdBRuY8DPu/I0Ny364uiW+At/R
      # 8jF+jt5uVZc=
      # =MV6O
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Sat 11 Nov 2023 01:19:35 HKT
      # gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
      # gpg:                issuer "kwolf@redhat.com"
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * tag 'qdev-array-prop' of https://repo.or.cz/qemu/kevin
      
      :
        qdev: Rework array properties based on list visitor
        qdev: Make netdev properties work as list elements
        qom: Add object_property_set_default_list()
        hw/rx/rx62n: Use qdev_prop_set_array()
        hw/arm/xlnx-versal: Use qdev_prop_set_array()
        hw/arm/virt: Use qdev_prop_set_array()
        hw/arm/vexpress: Use qdev_prop_set_array()
        hw/arm/sbsa-ref: Use qdev_prop_set_array()
        hw/arm/mps2: Use qdev_prop_set_array()
        hw/arm/mps2-tz: Use qdev_prop_set_array()
        hw/i386/pc: Use qdev_prop_set_array()
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      69680740
  4. Nov 10, 2023
  5. Nov 09, 2023
Loading