Skip to content
Snippets Groups Projects
  1. Apr 11, 2023
    • Paolo Bonzini's avatar
      block: move has_variable_length to BlockLimits · 160a29e2
      Paolo Bonzini authored
      
      At the protocol level, has_variable_length only needs to be true in the
      very special case of host CD-ROM drives, so that they do not need an
      explicit monitor command to read the new size when a disc is loaded
      in the tray.
      
      However, at the format level has_variable_length has to be true for all
      raw blockdevs and for all filters, even though in practice the length
      depends on the underlying file and thus will not change except in the
      case of host CD-ROM drives.
      
      As a first step towards computing an accurate value of has_variable_length,
      add the value into the BlockLimits structure and initialize the field
      from the BlockDriver.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20230407153303.391121-2-pbonzini@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      160a29e2
    • Kevin Wolf's avatar
      iotests: Regression test for vhdx log corruption · 2b1f8fcb
      Kevin Wolf authored
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20230411115231.90398-1-kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      2b1f8fcb
    • Lukas Tschoke's avatar
      block/vhdx: fix dynamic VHDX BAT corruption · 8af037fe
      Lukas Tschoke authored
      The corruption occurs when a BAT entry aligned to 4096 bytes is changed.
      
      Specifically, the corruption occurs during the creation of the LOG Data
      Descriptor. The incorrect behavior involves copying 4088 bytes from the
      original 4096 bytes aligned offset to `tmp[8..4096]` and then copying
      the new value for the first BAT entry to the beginning `tmp[0..8]`.
      This results in all existing BAT entries inside the 4K region being
      incorrectly moved by 8 bytes and the last entry being lost.
      
      This bug did not cause noticeable corruption when only sequentially
      writing once to an empty dynamic VHDX (e.g.
      using `qemu-img convert -O vhdx -o subformat=dynamic ...`), but it
      still resulted in invalid values for the (unused) Sector Bitmap BAT
      entries.
      
      Importantly, this corruption would only become noticeable after the
      corrupted BAT is re-read from the file.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/727
      
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: default avatarLukas Tschoke <lukts330@gmail.com>
      Message-Id: <6cfb6d6b-adc5-7772-c8a5-6bae9a0ad668@gmail.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8af037fe
  2. Apr 10, 2023
    • Peter Maydell's avatar
      Merge tag 'pull-tcg-20230410' of https://gitlab.com/rth7680/qemu into staging · dda860b9
      Peter Maydell authored
      Fix Int128 function call abi for ppc32, mips o32, and _WIN64
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmQ0LAIdHHJpY2hhcmQu
      # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8Y8Af9H3h7arUdO0KfFtpr
      # UbL4KrTs5JcCJmqgnqAAdkYRCTbdXnGUO9gRFKXWY1+zqMZo7aeA8laE+qh6+6Vy
      # WE8OsyPjqkSRJorLZnyX+2iNLlIee2d+KdSlYxQuNVtv/a4XdpV+dlQove2Wd2yy
      # 0krswayiYxAfFV52n3Lvqv2kS0kywdhWWdUy11ndRqcYypuw9qdWF1wkpZk1v/Lv
      # ZbHe9oiJ610o274ocjpKcSLJFQvaeT/+WDJ3QaqQI8mklcMhampP3kfS27DGK6FH
      # O621PxgpVqpVTkOCRXJyMIWCpXabJ4YttMhDQjuAFRghzBvR5Krs2LFmTR7Fkwuo
      # F9NUJg==
      # =z+vz
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 10 Apr 2023 16:32:18 BST
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * tag 'pull-tcg-20230410' of https://gitlab.com/rth7680/qemu
      
      :
        tcg/ppc: Fix TCG_TARGET_CALL_{ARG,RET}_I128 for ppc32
        tcg/mips: Fix TCG_TARGET_CALL_RET_I128 for o32 abi
        tcg/i386: Adjust assert in tcg_out_addi_ptr
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      dda860b9
    • Richard Henderson's avatar
      tcg/ppc: Fix TCG_TARGET_CALL_{ARG,RET}_I128 for ppc32 · 20861f34
      Richard Henderson authored
      
      For both _CALL_SYSV and _CALL_DARWIN, return is by reference,
      not in 4 integer registers.  For _CALL_SYSV, argument is also
      by reference.
      
      This error resulted in
      
          $ ./qemu-system-i386 -nographic
          qemu-system-i386: tcg/ppc/tcg-target.c.inc:185: \
              tcg_target_call_oarg_reg: Assertion `slot >= 0 && slot <= 1' failed.
      
      Fixes: 5427a9a7 ("tcg: Add TCG_TARGET_CALL_{RET,ARG}_I128")
      Tested-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      20861f34
    • Richard Henderson's avatar
      tcg/mips: Fix TCG_TARGET_CALL_RET_I128 for o32 abi · 25acc3f2
      Richard Henderson authored
      
      The return is by reference, not in 4 integer registers.
      
      This error resulted in
      
        qemu-system-i386: tcg/mips/tcg-target.c.inc:140: \
          tcg_target_call_oarg_reg: Assertion `slot >= 0 && slot <= 1' failed.
      
      Fixes: 5427a9a7 ("tcg: Add TCG_TARGET_CALL_{RET,ARG}_I128")
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      25acc3f2
    • Richard Henderson's avatar
      tcg/i386: Adjust assert in tcg_out_addi_ptr · 7d9e1ee4
      Richard Henderson authored
      We can arrive here on _WIN64 because Int128 is passed by reference.
      Change the assert to check that the immediate is in range,
      instead of attempting to check the host ABI.
      
      Fixes: 6a6d772e ("tcg: Introduce tcg_out_addi_ptr")
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1581
      
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      7d9e1ee4
    • Peter Maydell's avatar
      Merge tag 'pull-target-arm-20230410' of... · 26aeb3b5
      Peter Maydell authored
      Merge tag 'pull-target-arm-20230410' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
      
      target-arm: Fix bug where we weren't initializing
                  guarded bit state when combining S1/S2 attrs
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmQ0GTsZHHBldGVyLm1h
      # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3koqD/4t7D6v7GyuefCbp8dEPj/S
      # FjA6CqkkD3QnVAgqTD/PVW9X3hJsUQaV2Nk+x0BUcvHpOdgpIY+wKIh5lUYm1Sma
      # JoXHTQ8i3jndIIbQqpCbBS9KdM0CeAvAm50ohAmKy4B3HIW31mhxTXN0ORA7cedT
      # nPGsbAZ1K4pTx/c0n/7uwA91PJb4mKzFJ0Catl/IUcuPRpHsxUHcd82XrSwHfuBY
      # 0KG8maSzIZn4/j8wYYhD2LeRxx5SHabkOJ4negKKCYpDi+8lCoxdp7mRJYASPM61
      # HWdEPQZm6GzY+c2TYVKYAGgxu+MPDImFI6znMMchBlZc4GR3sFwNbTOXEHXnC8am
      # FUCI+D7mJt44bGsLMLXPUX4wOLP64PejfeNUfA8RcWjcmGF8jaD4g4Aeoz1GXnmg
      # E09C3i60WmCaVAzLaVNpVpVA64uXLOaLuVl8X7zPFVr775SCOVDb1Npd/15SX3Cn
      # okVCY37u0VZlrYzfHi/66qryZ7PSkontc5FHfAZAEhxQOHMiFIlBWr+PCTQ4P5wX
      # wl92ro6rMteziC6dG2l0UrAtL8hp6m0EgAhw4cbtoXz4Sp+I/Ed0uCuF4lHhdnnS
      # F+7lyEN4/HyxA44i9tXLzlLlfl7fuscwxm6CWwlonVAah3mteclR0iMFIO0WP7EC
      # gT6omcjdhvU/uFmObRGTkA==
      # =QK6z
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 10 Apr 2023 15:12:11 BST
      # gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
      # gpg:                issuer "peter.maydell@linaro.org"
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
      # gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [ultimate]
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * tag 'pull-target-arm-20230410' of https://git.linaro.org/people/pmaydell/qemu-arm
      
      :
        target/arm: Copy guarded bit in combine_cacheattrs
        target/arm: PTE bit GP only applies to stage1
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      26aeb3b5
    • Richard Henderson's avatar
      target/arm: Copy guarded bit in combine_cacheattrs · 8539dc00
      Richard Henderson authored
      
      The guarded bit comes from the stage1 walk.
      
      Fixes: Coverity CID 1507929
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20230407185149.3253946-3-richard.henderson@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      8539dc00
    • Richard Henderson's avatar
      target/arm: PTE bit GP only applies to stage1 · 6a3b1e44
      Richard Henderson authored
      
      Only perform the extract of GP during the stage1 walk.
      
      Reported-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20230407185149.3253946-2-richard.henderson@linaro.org
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      6a3b1e44
    • Peter Maydell's avatar
      Merge tag 'pull-ppc-20230409' of https://github.com/legoater/qemu into staging · 08dede07
      Peter Maydell authored
      ppc queue:
      
      * Fix regresion with prefix instructions and pcrel addressing
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmQy9H8ACgkQUaNDx8/7
      # 7KGjBg/9EUOcf3QzS9v7GCgBjvHZ0II4bIB4qboNiBhmtLIpDoBC2el7gwSZV82a
      # qKrl+UMTAIs6DJQNR5Gcj69OUbAjGyaBNuC3I9lI8vzWn3aDJRTpL5WttyfnpLsO
      # bVR8Q+dDzIcZA/ymDw7AQfPvyCm6yrVXOUCCZNBpGjp98240SuDoJ7p6FpKFc8fT
      # 5amMllLksgJDk4cLv6xM1zQRXuCyYf9D1CS0CHAgxs+zvg9EnQcVBzIMZ9LfGAPU
      # JxU9Kj/clMyZx0ADtH9PkdgvHoMWRXlTuMQmfv4dzWZfy1as9Ks3Pfzt3Z4hx7t7
      # TqIiFGuJdI/fDHcKltwnLwdZ8GJwo+tXFP97VNFWtmNN1PWos9dwxrU04r0+ZxA/
      # 33NTDyOMidp9bnMlcld/pyCPfo5Psht1xlHSaikxcYHt0z1Yc/TR6/u+aiz9AGnf
      # FVxy1AlkY0rtKtmCozkcFtQe8yCogIfYnXe0ng3j3k45QXk03VmtiO4WLw8l0qwR
      # oB5FAAaokCoINwYIfLofR7jg7ciaISI+r4KkgOtOC7eN6O42magCkSPa5FxU9+WA
      # sZIq0iBpRxenv0+tDrXpV16Uy0H2N3oGOdUpUbO6wiHxhO9rj71preSr0eLhipZJ
      # c3jcf4p+MyXD1RI/62TuSIYWG5RwfA8XCyA/bd1bk2cBQ8GA+S0=
      # =BKGb
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Sun 09 Apr 2023 18:23:11 BST
      # gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
      # gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [undefined]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1
      
      * tag 'pull-ppc-20230409' of https://github.com/legoater/qemu
      
      :
        target/ppc: Fix temp usage in gen_op_arith_modw
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      08dede07
    • Peter Maydell's avatar
      Merge tag 'pull_error_handle_fix_use_after_free.v1' of... · 64f1c63d
      Peter Maydell authored
      Merge tag 'pull_error_handle_fix_use_after_free.v1' of https://github.com/stefanberger/qemu-tpm into staging
      
      Fix use-after-free in util/error.c
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQEzBAABCAAdFiEEuBi5yt+QicLVzsZrda1lgCoLQhEFAmQu9xYACgkQda1lgCoL
      # QhFX2ggAnZZF2KgvVSRh67X+3VdVsg+ifFc/k7kMq74UhTr4lXojPCcgSPu8PaRZ
      # Mv0I+xNv9pjEU7frwi6vc9DXyhWrVTLgW4TugVBgsB75CnjvFN3lw3T9goCc1h4m
      # eO7c6SMdUpyQG7ar1mqt2m0bjVz85OAsNYBiAjxfyrKzX6B/mHyru5re/8VC3Hho
      # IJWGlS51IxrVq44qjB8Lh3voXiEru7dX/y86fWqAiy61pON6+A43rBDIb9JOVv8q
      # QiHqXVjs9/ax9ZNRudlgJ7bAlUFp6vD9xBm6ztlABI9MCYZeibU6jPMLCBYnGiJq
      # f//Sqqd4WsqnhOJOLYeMNfFMElIXEw==
      # =uu4l
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Thu 06 Apr 2023 17:45:10 BST
      # gpg:                using RSA key B818B9CADF9089C2D5CEC66B75AD65802A0B4211
      # gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>" [unknown]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211
      
      * tag 'pull_error_handle_fix_use_after_free.v1' of https://github.com/stefanberger/qemu-tpm
      
      :
        util/error: Fix use-after-free errors reported by Coverity
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      64f1c63d
  3. Apr 09, 2023
  4. Apr 06, 2023
  5. Apr 05, 2023
  6. Apr 04, 2023
Loading