Skip to content
Snippets Groups Projects
  1. Dec 22, 2023
    • Kevin Wolf's avatar
      vl: Improve error message for conflicting -incoming and -loadvm · 64537ff1
      Kevin Wolf authored
      
      Currently, the conflict between -incoming and -loadvm is only detected
      when loading the snapshot fails because the image is still inactive for
      the incoming migration. This results in a suboptimal error message:
      
      $ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming defer
      qemu-system-x86_64: Device 'ide0-hd0' is writable but does not support snapshots
      
      Catch the situation already in qemu_validate_options() to improve the
      message:
      
      $ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming defer
      qemu-system-x86_64: 'incoming' and 'loadvm' options are mutually exclusive
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-ID: <20231201142520.32255-3-kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      (cherry picked from commit 5a7f21efaf99c60614fe1967be1c0f9aa46c526e)
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      64537ff1
    • Kevin Wolf's avatar
      block: Fix crash when loading snapshot on inactive node · e2e01b3a
      Kevin Wolf authored
      
      bdrv_is_read_only() only checks if the node is configured to be
      read-only eventually, but even if it returns false, writing to the node
      may not be permitted at the moment (because it's inactive).
      
      bdrv_is_writable() checks that the node can be written to right now, and
      this is what the snapshot operations really need.
      
      Change bdrv_can_snapshot() to use bdrv_is_writable() to fix crashes like
      the following:
      
      $ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming defer
      qemu-system-x86_64: ../block/io.c:1990: int bdrv_co_write_req_prepare(BdrvChild *, int64_t, int64_t, BdrvTrackedRequest *, int): Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed.
      
      The resulting error message after this patch isn't perfect yet, but at
      least it doesn't crash any more:
      
      $ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming defer
      qemu-system-x86_64: Device 'ide0-hd0' is writable but does not support snapshots
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-ID: <20231201142520.32255-2-kwolf@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      (cherry picked from commit d3007d348adaaf04ee8b099a475282034a662414)
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      e2e01b3a
  2. Dec 19, 2023
  3. Dec 12, 2023
  4. Dec 06, 2023
    • Stefan Hajnoczi's avatar
      9c74490b
    • Michael Roth's avatar
      i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit · 5746f70d
      Michael Roth authored
      
      Commit 7191f24c ("accel/kvm/kvm-all: Handle register access errors")
      added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it
      exposed a long-running bug in current KVM support for SEV-ES where the
      kernel assumes that MSR_EFER_LMA will be set explicitly by the guest
      kernel, in which case EFER write traps would result in KVM eventually
      seeing MSR_EFER_LMA get set and recording it in such a way that it would
      be subsequently visible when accessing it via KVM_GET_SREGS/etc.
      
      However, guest kernels currently rely on MSR_EFER_LMA getting set
      automatically when MSR_EFER_LME is set and paging is enabled via
      CR0_PG_MASK. As a result, the EFER write traps don't actually expose the
      MSR_EFER_LMA bit, even though it is set internally, and when QEMU
      subsequently tries to pass this EFER value back to KVM via
      KVM_SET_SREGS* it will fail various sanity checks and return -EINVAL,
      which is now considered fatal due to the aforementioned QEMU commit.
      
      This can be addressed by inferring the MSR_EFER_LMA bit being set when
      paging is enabled and MSR_EFER_LME is set, and synthesizing it to ensure
      the expected bits are all present in subsequent handling on the host
      side.
      
      Ultimately, this handling will be implemented in the host kernel, but to
      avoid breaking QEMU's SEV-ES support when using older host kernels, the
      same handling can be done in QEMU just after fetching the register
      values via KVM_GET_SREGS*. Implement that here.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
      Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
      Cc: Lara Lazier <laramglazier@gmail.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: Maxim Levitsky <mlevitsk@redhat.com>
      Cc:  <kvm@vger.kernel.org>
      Fixes: 7191f24c ("accel/kvm/kvm-all: Handle register access errors")
      Signed-off-by: default avatarMichael Roth <michael.roth@amd.com>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-ID: <20231206155821.1194551-1-michael.roth@amd.com>
      5746f70d
  5. Dec 05, 2023
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-ufs-20231205' of https://gitlab.com/jeuk20.kim/qemu into staging · d451e32c
      Stefan Hajnoczi authored
      ufs fixes for 8.2
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCgAdFiEEUBfYMVl8eKPZB+73EuIgTA5dtgIFAmVurjcACgkQEuIgTA5d
      # tgLWVBAAkzus4nN2+Z0H23VUmeBPCLPFXRSkK8mOWC3ymbX3kiy/IjgM7Ept6QWA
      # btssTf3YEeDtycgbrb5GZ4kEfKThDN7bbGRHvCW5bjwkyLQN1Ys2K61CTRX0VhSi
      # U4HDE3gCm+LpO28BuV/1KunlSH4TWjt76AB6YG5PuyzSH+AbC8yY7m+VSJTmCw1k
      # cZv0TQ+9lqWc4C6ziETV8UqhhltBmd/57P3xFDKhYNl0EtzxnKGSZ2szzWqE7guY
      # DsmTlfB5bnkYPE51xxTcJnRj907utNrIfa2kbu9wXU/GuPuEf9QkDo1Dt3t1Z0Zm
      # OZPkloXC2eNufVcGYVJa2PylRjwFlg01IuhYmlhsgerg5LZz2RIyrWM61JTONF2J
      # 6EvO89e2S3XpBbnl2ugf2rMIdW1tlLSWhnLZD+jZzOu+V2TeLm6/onHWCVQ02sLr
      # ddDVpf2djvUsmRvcBBYlI40FcC9Wt828Spm+wkRsGHC+VbAg2al6jRNXyJ2LWeiS
      # wGsAwRV6XhQz996uMOWTA7jEsAawHUFgYCsH4bgiqiWEn+FblufY2iicRxY4ZsJA
      # GXpvxGoUHWE8e0XjXG1BnRFo2Q5ns9SRl5gx5X7rcmIKUGGCh3ZI72zfeVgCjm7b
      # 5/CV/YzKuCRWJCYcORguli1GVuPO01FJrBloTJc0OSaDAtZL2Mg=
      # =o2kr
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 04 Dec 2023 23:59:35 EST
      # gpg:                using RSA key 5017D831597C78A3D907EEF712E2204C0E5DB602
      # gpg: Good signature from "Jeuk Kim <jeuk20.kim@samsung.com>" [unknown]
      # gpg:                 aka "Jeuk Kim <jeuk20.kim@gmail.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: 5017 D831 597C 78A3 D907  EEF7 12E2 204C 0E5D B602
      
      * tag 'pull-ufs-20231205' of https://gitlab.com/jeuk20.kim/qemu
      
      :
        hw/ufs: avoid generating the same ID string for different LU devices
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      d451e32c
    • Akinobu Mita's avatar
      hw/ufs: avoid generating the same ID string for different LU devices · 80a37b03
      Akinobu Mita authored
      
      QEMU would not start when trying to create two UFS host controllers and
      a UFS logical unit for each with the following options:
      
      -device ufs,id=bus0 \
      -device ufs-lu,drive=drive1,bus=bus0,lun=0 \
      -device ufs,id=bus1 \
      -device ufs-lu,drive=drive2,bus=bus1,lun=0 \
      
      This is because the same ID string ("0:0:0/scsi-disk") is generated
      for both UFS logical units.
      
      To fix this issue, prepend the parent pci device's path to make
      the ID string unique.
      ("0000:00:03.0/0:0:0/scsi-disk" and "0000:00:04.0/0:0:0/scsi-disk")
      
      Resolves: #2018
      Fixes: 096434fe ("hw/ufs: Modify lu.c to share codes with SCSI subsystem")
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Reviewed-by: default avatarJeuk Kim <jeuk20.kim@samsung.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Message-Id: <20231204150543.48252-1-akinobu.mita@gmail.com>
      Signed-off-by: default avatarJeuk Kim <jeuk20.kim@samsung.com>
      80a37b03
  6. Dec 04, 2023
    • Stefan Hajnoczi's avatar
      Merge tag 'misc-fixes-20231204' of https://github.com/philmd/qemu into staging · eeaaf96f
      Stefan Hajnoczi authored
      Misc fixes for 8.2
      
      - memory: Avoid unaligned accesses (Patrick)
      - target/riscv: Fix variable shadowing (Daniel)
      - tests/avocado: Update URL, skip flaky test (Alex, Phil)
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmVt7w4ACgkQ4+MsLN6t
      # wN7AzA/+N1ec1I2IC0LYT8ThBCyV/92o+1FH5KaIxiVN5Ty3cACnGAac8IJ1K2tC
      # 5WG8Dxg4rq+bM16lUq9ME7k82Y3PoxLoRQa8fuClFKdHMXU2sgY4OwTx2606cO4B
      # 0H4gR+i3XgrgIDo8qRezWX0JSd1Srrz9QPlcq6kJfDtRq7DU0329aOobkyzuUJPb
      # DJD9YPu9y0KokBCBuVlt5ypNSM9xJGRtznFt1sFfNyPgNOnie3s+fYpPn26UigcY
      # 8OY/PMS5hapDw/s/gFKWQb/nCTSRnJKZ5dODOjHXK8HvTbYHedw8C4apXyjSXwBI
      # fBerNEKJHwD/1QkFhbNCIwsidH72BWeHljrelbZlsUfXU1VcCqNiXV8d2R9ak3xt
      # lrW7UcytC1+PqhmIVEXAOA4cwJcq6Hs9IcZ9G9aMvcmlhY3Fv0UKMoRYgsGTULeP
      # ySQF3FDSc6dldsfBdwqHGHlwL12EYmpN2sIhEc5aQ9y5Mmuj2FBOYHUbPpyoVLpw
      # e45n9Epc43GUVCMj3lZNjWKd+87nGjwKOM3rpBlcaSG3JRkLUe8o5APxeYzePZfO
      # 2IOWcGnrUixsvWbNY+6JF98n5hQK7Va3h/e1YbS1K2OZ013LT1SNiZ1LOrl9KiXf
      # agY6HMukKbCpJAqpXnMbgWdxCb7GdtjVaWKIVEgejeZTVdH4f8Y=
      # =r21r
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 04 Dec 2023 10:23:58 EST
      # gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
      # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
      # Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE
      
      * tag 'misc-fixes-20231204' of https://github.com/philmd/qemu
      
      :
        tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky
        tests/avocado: Update yamon-bin-02.22.zip URL
        target/riscv/kvm: fix shadowing in kvm_riscv_(get|put)_regs_csr
        system/memory: use ldn_he_p/stn_he_p
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      eeaaf96f
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-target-arm-20231204-1' of... · db5e49e7
      Stefan Hajnoczi authored
      Merge tag 'pull-target-arm-20231204-1' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
      
      target-arm queue:
       * Turn off SME if SVE is turned off (this combination doesn't
         currently work and QEMU will assert if you try it)
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmVt3wQZHHBldGVyLm1h
      # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3vrmD/9zu48IxCdHFSshMRmXz6kI
      # tMvTrsMSOGXfuQqCbvLn3CUP/La50Yt/T1C2TKzVII1W8zpw8wEEvraCBjexzUzK
      # Jcjw0dPSIllQOHBkoUGsgqA0+UkhfIwH0po10rxm1L+ZP3DfISVdyDV9oxCNfEO0
      # pGXI1eAN9GIQtJtUj3kZE+RUoamJfoSjlm5XVeX3T+utEU7yf1461L1/qaylYOrW
      # wao72ffbuf41jRJwnVmMFoIPrwueYtEeuKl/EgYU4YPxkSQEo34u6d9fz2Irt6/Y
      # utO2SffhhmlxQaFhgPX3hvAsfapMt/p2Jy6oUpThOjN75adCq+g1CYj7lzEfIX16
      # kb2CY8zQ8NboJtgnkiQAA062myURnk/kmulv0OF6Hh0jHSuLzuMMLcCfBJgq4H6s
      # mnBCJfetwRgwqcSl1JTfrMm4wYOLmSrmOcM5JjYwY2YYjnFXI+XB1MdKm0h8cROG
      # nFu5TZtNnxgzqBgoh1140AYN851Y1dshczZIHb1/YuNpBIl+ZUO4v5sRT3KBSzb+
      # G21570neBv8QcfDSgrLesrjNBDREfkaWEu9BM85461uTjbCLG8RUpn+Jd4VtpkNe
      # YVzomhuM9CI5CmYdrTMJ74gnZUtAT9Q3FTcfGL8G4KiSIe85BTw+gEy4PhLXD6FT
      # 68fP1M+s8/hsuXCJYbvmAA==
      # =K/u0
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 04 Dec 2023 09:15:32 EST
      # 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]
      # gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [unknown]
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * tag 'pull-target-arm-20231204-1' of https://git.linaro.org/people/pmaydell/qemu-arm
      
      :
        target/arm: Disable SME if SVE is disabled
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      db5e49e7
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-request-2023-12-04' of https://gitlab.com/thuth/qemu into staging · 169c4e77
      Stefan Hajnoczi authored
      * Fix wording in iotest 149
      * Fix whitespace issues in sh4 code (ignore checkpatch.pl warnings here)
      * Make sure to check return values in qtests
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmVt4PwRHHRodXRoQHJl
      # ZGhhdC5jb20ACgkQLtnXdP5wLbWhYxAAm6ww++qfCh5uLrKjXrv/ZS+b+8UVMT+p
      # wOBNBz0RDpDahAwesxLABAg9b+fabLTx9OpOyQRgmM/ofCoW/Oi7xzCEwv9JPJX0
      # Kr7x5AMCTc2hPydxsMenWYZXLZXcc0HSkB+4yN5FTeOl8YPoRetegsGbiirGpod1
      # QyD/oLMZzBxqteF/m0a4gxEuwi3qgRVIOkdk8zeSBMAl6EUazsKR8sTrdCrkupHl
      # ddMKjRH4Gr2sXoZ8L/mr4T5FodVxAF1pcZnVyPYDlVgNK/V0IWDcbmFFNr0rXxCM
      # CZz7gIOZkpm/MXpVE9UEg++ZOQ16gDUNpvQRyNPgIn0vbiuF5kcXmUpstJWHDico
      # O98wgH6im3iC7xyaMTOq3pjSb9RNP4cmIw77EKJyS93RDAgiCX0ozN3zEkxsvZYu
      # hQadBd3TSUP6jxz2SWQ6irCwkElfozCc1cPfUyW0rFXjLqWei0UirWDdyN5dL8vk
      # pkupZG5p3jiiZs1hm+TQ4W1CPVZFTAW+LcI7V/Na3EBKQvrjYDlHMQdx0NaJh5e3
      # xn84bvTnuYfT/I63z9zqIbMwPQ5t+lJaR9ohkn9Q4tTEnHuMV9svON5rsRc3YE6p
      # XrR02G9zu4kVAKs51DFNWC9SLgviW+LB2DCe+e2CrqwPjiz+MeOVGEEre7/nnj/q
      # clP7u3MyX5A=
      # =rU6S
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 04 Dec 2023 09:23:56 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-12-04' of https://gitlab.com/thuth/qemu
      
      :
        tests/qtest: check the return value
        sh4: Coding style: Remove tabs
        tests/qemu-iotests/149: Use more inclusive language in this test
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      169c4e77
    • Alex Bennée's avatar
      tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky · 2e8ed6a9
      Alex Bennée authored
      
      I missed this when going through the recent failure logs. I can run
      the test 30 times without failure locally but it seems to hang pretty
      reliably on GitLab's CI infra-structure.
      
      Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Message-ID: <20231201201027.2689404-1-alex.bennee@linaro.org>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      2e8ed6a9
    • Philippe Mathieu-Daudé's avatar
      tests/avocado: Update yamon-bin-02.22.zip URL · d369ad55
      Philippe Mathieu-Daudé authored
      http://www.imgtec.com/tools/mips-tools/downloads/ redirects
      to https://mips.com/downloads/yamon-version-02-22/
      
       then points
      to an invalid path to a s3 bucket. Use the correct path. The
      site will eventually be fixed.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20231201205630.10837-1-philmd@linaro.org>
      d369ad55
    • Daniel Henrique Barboza's avatar
      target/riscv/kvm: fix shadowing in kvm_riscv_(get|put)_regs_csr · 560b8e1d
      Daniel Henrique Barboza authored
      
      KVM_RISCV_GET_CSR() and KVM_RISCV_SET_CSR() use an 'int ret' variable
      that is used to do an early 'return' if ret > 0. Both are being called
      in functions that are also declaring a 'ret' integer, initialized with
      '0', and this integer is used as return of the function.
      
      The result is that the compiler is less than pleased and is pointing
      shadowing errors:
      
      ../target/riscv/kvm/kvm-cpu.c: In function 'kvm_riscv_get_regs_csr':
      ../target/riscv/kvm/kvm-cpu.c:90:13: error: declaration of 'ret' shadows a previous local [-Werror=shadow=compatible-local]
         90 |         int ret = kvm_get_one_reg(cs, RISCV_CSR_REG(env, csr), &reg); \
            |             ^~~
      ../target/riscv/kvm/kvm-cpu.c:539:5: note: in expansion of macro 'KVM_RISCV_GET_CSR'
        539 |     KVM_RISCV_GET_CSR(cs, env, sstatus, env->mstatus);
            |     ^~~~~~~~~~~~~~~~~
      ../target/riscv/kvm/kvm-cpu.c:536:9: note: shadowed declaration is here
        536 |     int ret = 0;
            |         ^~~
      
      ../target/riscv/kvm/kvm-cpu.c: In function 'kvm_riscv_put_regs_csr':
      ../target/riscv/kvm/kvm-cpu.c:98:13: error: declaration of 'ret' shadows a previous local [-Werror=shadow=compatible-local]
         98 |         int ret = kvm_set_one_reg(cs, RISCV_CSR_REG(env, csr), &reg); \
            |             ^~~
      ../target/riscv/kvm/kvm-cpu.c:556:5: note: in expansion of macro 'KVM_RISCV_SET_CSR'
        556 |     KVM_RISCV_SET_CSR(cs, env, sstatus, env->mstatus);
            |     ^~~~~~~~~~~~~~~~~
      ../target/riscv/kvm/kvm-cpu.c:553:9: note: shadowed declaration is here
        553 |     int ret = 0;
            |         ^~~
      
      The macros are doing early returns for non-zero returns and the local
      'ret' variable for both functions is used just to do 'return 0', so
      remove them from kvm_riscv_get_regs_csr() and kvm_riscv_put_regs_csr()
      and do a straight 'return 0' in the end.
      
      For good measure let's also rename the 'ret' variables in
      KVM_RISCV_GET_CSR() and KVM_RISCV_SET_CSR() to '_ret' to make them more
      resilient to these kind of errors.
      
      Fixes: 937f0b45 ("target/riscv: Implement kvm_arch_get_registers")
      Signed-off-by: default avatarDaniel Henrique Barboza <dbarboza@ventanamicro.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Message-ID: <20231123101338.1040134-1-dbarboza@ventanamicro.com>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      560b8e1d
    • Patrick Venture's avatar
      system/memory: use ldn_he_p/stn_he_p · 2b8fe81b
      Patrick Venture authored
      
      Using direct pointer dereferencing can allow for unaligned accesses,
      which was seen during execution with sanitizers enabled.
      
      Cc: qemu-stable@nongnu.org
      Reviewed-by: default avatarChris Rauer <crauer@google.com>
      Reviewed-by: default avatarPeter Foley <pefoley@google.com>
      Signed-off-by: default avatarPatrick Venture <venture@google.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-ID: <20231116163633.276671-1-venture@google.com>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      2b8fe81b
    • Zhu Jun's avatar
      tests/qtest: check the return value · 4d98618b
      Zhu Jun authored
      
      These variables "ret" are never referenced in the code, thus
      add check logic for the "ret"
      
      Signed-off-by: default avatarZhu Jun <zhujun2@cmss.chinamobile.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20231121080802.4500-1-zhujun2@cmss.chinamobile.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      4d98618b
    • Yihuan Pan's avatar
      sh4: Coding style: Remove tabs · 55339361
      Yihuan Pan authored
      Replaces TABS with spaces to ensure have a consistent coding
      style with an indentation of 4 spaces in the SH4 subsystem.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/376
      
      
      Signed-off-by: default avatarYihuan Pan <xun794@gmail.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20231124044554.513752-1-xun794@gmail.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      55339361
    • Thomas Huth's avatar
      tests/qemu-iotests/149: Use more inclusive language in this test · 5689d4bd
      Thomas Huth authored
      
      Let's use 'unsupported_configs' and 'tested_configs' here
      instead of non-inclusive words.
      
      Message-ID: <20231122084000.809696-1-thuth@redhat.com>
      Reviewed-by: default avatar"Daniel P. Berrangé" <berrange@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      5689d4bd
    • Peter Maydell's avatar
      target/arm: Disable SME if SVE is disabled · f7767ca3
      Peter Maydell authored
      There is no architectural requirement that SME implies SVE, but
      our implementation currently assumes it. (FEAT_SME_FA64 does
      imply SVE.) So if you try to run a CPU with eg "-cpu max,sve=off"
      you quickly run into an assert when the guest tries to write to
      SMCR_EL1:
      
      #6  0x00007ffff4b38e96 in __GI___assert_fail
          (assertion=0x5555566e69cb "sm", file=0x5555566e5b24 "../../target/arm/helper.c", line=6865, function=0x5555566e82f0 <__PRETTY_FUNCTION__.31> "sve_vqm1_for_el_sm") at ./assert/assert.c:101
      #7  0x0000555555ee33aa in sve_vqm1_for_el_sm (env=0x555557d291f0, el=2, sm=false) at ../../target/arm/helper.c:6865
      #8  0x0000555555ee3407 in sve_vqm1_for_el (env=0x555557d291f0, el=2) at ../../target/arm/helper.c:6871
      #9  0x0000555555ee3724 in smcr_write (env=0x555557d291f0, ri=0x555557da23b0, value=2147483663) at ../../target/arm/helper.c:6995
      #10 0x0000555555fd1dba in helper_set_cp_reg64 (env=0x555557d291f0, rip=0x555557da23b0, value=2147483663) at ../../target/arm/tcg/op_helper.c:839
      #11 0x00007fff60056781 in code_gen_buffer ()
      
      Avoid this unsupported and slightly odd combination by
      disabling SME when SVE is not present.
      
      Cc: qemu-stable@nongnu.org
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2005
      
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20231127173318.674758-1-peter.maydell@linaro.org
      f7767ca3
    • Philippe Mathieu-Daudé's avatar
      tests/avocado: Update yamon-bin-02.22.zip URL · 1664d74c
      Philippe Mathieu-Daudé authored
      http://www.imgtec.com/tools/mips-tools/downloads/ redirects
      to https://mips.com/downloads/yamon-version-02-22/
      
       then points
      to an invalid path to a s3 bucket. Use the correct path. The
      site will eventually be fixed.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-ID: <20231201205630.10837-1-philmd@linaro.org>
      1664d74c
    • Stefan Hajnoczi's avatar
      Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging · 8e51bae8
      Stefan Hajnoczi authored
      ui/audio fixes for 8.2
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmVtiO0cHG1hcmNhbmRy
      # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5UDeEACvbixo8MuxOpBf9DK2
      # JTCQeHYeVW7QtwDh9xUUnbcM77+lWgkr9OeCJ7FKxF1J7UHkQ7jIzISs/P0zuCw0
      # JRkoOcfOnxV/Pn8XAq79F6Yq55EUdCdvsj0XgsVx+K096VHvjlK3fzNwNebJrkos
      # NpwQnnqI37TYBUFSivjKkEkPf1Kp4R4abeNs3eEzsIMUzEmEZQwwi5zZAMxxZ41o
      # fyItvdaEEDJxzupS6e0x4O4B5KkTo9RFwsJgstOAbkCxuJk67grV9dm3S3wFiUR3
      # iFR2P/EyzctT9QOkU7oEIi87CiociKaYWgw/tDU4lFjXwbkt0a59b783Rha1RlN8
      # ICFQ3B0NX+CNlc5PPsF1yp3+DNJRKz8Rap4PmU5IIVXTlPHm+YrWRw6vklw5kq7y
      # nAvdcfIJ+UQGVCgqQiLkuZslz4ATFOypnUvSL+eds1jHMS6UQcGd3zD1QCEPhDSP
      # jhFirqDQYWU/18ZU3b6VuDe5Ko3erd4V7hDikeQnjLjYfBFX1/Mts+6GmaGdfbqk
      # JLOHYa7CUP7akTB7fQF1/4B6cSf3hOsXYlmDHQPZgi1OYEy/BdPuwM5pN4jAikwO
      # b2z6TrXS3hQK61bUtU+XnhOOW98+gfz77UwluXDl22KHGV+c/SadyMFJWm8VYX4k
      # DuNTQ78vApqCuAhjFcKSXPSt7A==
      # =fpz/
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 04 Dec 2023 03:08:13 EST
      # gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
      # gpg:                issuer "marcandre.lureau@redhat.com"
      # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
      # gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
      # Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5
      
      * tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu
      
      :
        hw/audio/virtio-sound: mark the device as unmigratable
        ui/vnc-clipboard: fix inflate_buffer
        ui/gtk-egl: move function calls back to regular code path
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      8e51bae8
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-more-8.2-fixes-011223-2' of https://gitlab.com/stsquad/qemu into staging · 17dacf7a
      Stefan Hajnoczi authored
      Flaky avocado tests, gdbstub and gitlab tweaks
      
        - gdbstub, properly halt when QEMU is having IO issues
        - convert skipIf(GITLAB_CI) to skipUnless(QEMU_TEST_FLAKY_TESTS)
        - tag sbsa-ref tests as TCG only
        - build the correct microblaze for avocado-system-ubuntu
        - add optional flaky tests job to CI
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmVqHFgACgkQ+9DbCVqe
      # KkQHLwgAjP2iL5LSa3FaMUoESJQqRB0rpoJ80gtEtmvmgRF0fHsRfHtDdMN9h2Ed
      # YilCDhMKLyr2ZoK4atyuc5SR6vCXI5RAvfTddex0xSxlvBX5Z5+1FMC6yA8SDJM7
      # ezEXACEKHiGv+l8gvOZOf9ZYEgh8DMJYFMbrtxuxKWw/kAjZ3R3X/ChCL94ZCPRe
      # 486wqPIQfp5EPs2ddsW4DYFTjLpK5ImX+u/5kdaEGXwcg8UoLmQ9BVIrN/hYJ6u5
      # t/mAp1qVIQwSOSUBnerQ4ZkVQfCgLtEtiDtt8EZjUbQD3DcLjfHFjTwVlpqcC1zs
      # wHXYpLbD5jkthqav5E0DObCF9gIZdA==
      # =qtvU
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Fri 01 Dec 2023 12:48:08 EST
      # gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [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: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * tag 'pull-more-8.2-fixes-011223-2' of https://gitlab.com/stsquad/qemu
      
      :
        gitlab: add optional job to run flaky avocado tests
        gitlab: build the correct microblaze target
        tests/avocado: tag sbsa tests as tcg only
        docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS
        gdbstub: use a better signal when we halt for IO reasons
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      17dacf7a
    • Stefan Hajnoczi's avatar
      Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging · 173e8280
      Stefan Hajnoczi authored
      
      virtio,pc,pci: features, cleanups, fixes
      
      misc fixes, cleanups
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmVrmhwPHG1zdEByZWRo
      # YXQuY29tAAoJECgfDbjSjVRp/XsH/05hHtQqO+EnKSAW5SEwZnlLfzDcajVVPIkT
      # h6Yf6ahHNf4hG1qqa2CICqJtDAOQYamO128QjZdQxsnYejwBmZ/oG//neWh6qLPV
      # Hp4AaKV2MjKRQZPNblnrGUirxkSWSTqIONXp4FsVVpKOKW9IX5f9tH6nyFAqXWX7
      # KzNY/3KD1CVSwAV1+hY2c6OzWVdTSJykPRocfB0jTYY1RygI0t57Hiq7v8AliGAx
      # 7ktSJFD9MBr+4Un7CQZWp24eyrL77j8U+YQRlPVYupkmQyuXHPdBr4RruHcGupIy
      # GeIvbkX1mTCEfOd/HFQ1X41hpf8AEyZjjq2SOEBncIRWY6EhSio=
      # =opjy
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Sat 02 Dec 2023 15:57:00 EST
      # gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
      # gpg:                issuer "mst@redhat.com"
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
      # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu
      
      :
        vhost-user-scsi: free the inflight area when reset
        vhost-user: fix the reconnect error
        msix: unset PCIDevice::msix_vector_poll_notifier in rollback
        virtio-iommu: Remove useless !sdev check in virtio_iommu_probe()
        hw/i386: fix short-circuit logic with non-optimizing builds
        hw/acpi/erst: Do not ignore Error* in realize handler
        pcie_sriov: Remove g_new assertion
        virtio-sound: add realize() error cleanup path
        virtio-snd: check AUD_register_card return value
        hw/audio/hda-codec: reenable the audio mixer
        hw/audio/hda-codec: fix multiplication overflow
        hw/audio/virtio-snd-pci: fix the PCI class code
        tests/acpi/bios-tables-test: do not write new blobs unless there are changes
        netdev: set timeout depending on loadavg
        osdep: add getloadavg
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      173e8280
    • Stefan Hajnoczi's avatar
      Merge tag 'migration-20231201-pull-request' of https://github.com/xzpeter/qemu into staging · 019f8c19
      Stefan Hajnoczi authored
      Migration patches for rc3:
      
      - One more memleak regression fix from Het
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZWoLbRIccGV0ZXJ4QHJl
      # ZGhhdC5jb20ACgkQO1/MzfOr1wahYwD+OsD7CaZYjkl9KSooRfblEenD6SdfhAdC
      # oZc07f2UxocA/0s1keDBZUUcZOiGYPDFV5his4Jw4F+RRD1YIpVWZg4J
      # =T0/r
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Fri 01 Dec 2023 11:35:57 EST
      # gpg:                using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706
      # gpg:                issuer "peterx@redhat.com"
      # gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [full]
      # gpg:                 aka "Peter Xu <peterx@redhat.com>" [full]
      # Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D  D1A9 3B5F CCCD F3AB D706
      
      * tag 'migration-20231201-pull-request' of https://github.com/xzpeter/qemu
      
      :
        migration: Plug memory leak with migration URIs
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      019f8c19
    • Volker Rümelin's avatar
      hw/audio/virtio-sound: mark the device as unmigratable · 551ef0fa
      Volker Rümelin authored
      
      The virtio-sound device is currently not migratable. QEMU crashes
      on the source machine at some point during the migration with a
      segmentation fault.
      
      Even with this bug fixed, the virtio-sound device doesn't migrate
      the state of the audio streams. For example, running streams leave
      the device on the destination machine in a broken condition.
      
      Mark the device as unmigratable until these issues have been fixed.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20231204072837.6058-1-vr_qemu@t-online.de>
      551ef0fa
    • Fiona Ebner's avatar
      ui/vnc-clipboard: fix inflate_buffer · ebfbf394
      Fiona Ebner authored
      
      Commit d921fea3 ("ui/vnc-clipboard: fix infinite loop in
      inflate_buffer (CVE-2023-3255)") removed this hunk, but it is still
      required, because it can happen that stream.avail_in becomes zero
      before coming across a return value of Z_STREAM_END in the loop.
      
      This fixes the host->guest direction of the clipboard with noVNC and
      TigerVNC as clients.
      
      Fixes: d921fea3 ("ui/vnc-clipboard: fix infinite loop in inflate_buffer (CVE-2023-3255)")
      Reported-by: default avatarFriedrich Weber <f.weber@proxmox.com>
      Signed-off-by: default avatarFiona Ebner <f.ebner@proxmox.com>
      Acked-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20231122125826.228189-1-f.ebner@proxmox.com>
      ebfbf394
    • Volker Rümelin's avatar
      ui/gtk-egl: move function calls back to regular code path · 53a939f1
      Volker Rümelin authored
      
      Commit 6f189a08 ("ui/gtk-egl: Check EGLSurface before doing
      scanout") introduced a regression when QEMU is running with a
      virtio-gpu-gl-device on a host under X11. After the guest has
      initialized the virtio-gpu-gl-device, the guest screen only
      shows "Display output is not active.".
      
      Commit 6f189a08 moved all function calls in
      gd_egl_scanout_texture() to a code path which is only called
      once after gd_egl_init() succeeds in gd_egl_scanout_texture().
      Move all function calls in gd_egl_scanout_texture() back to
      the regular code path so they get always called if one of the
      gd_egl_init() calls was successful.
      
      Fixes: 6f189a08 ("ui/gtk-egl: Check EGLSurface before doing scanout")
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20231111104020.26183-1-vr_qemu@t-online.de>
      53a939f1
  7. Dec 02, 2023
Loading