Skip to content
Snippets Groups Projects
  1. Sep 26, 2023
  2. Sep 25, 2023
    • Paolo Bonzini's avatar
      mptsas: avoid shadowed local variables · 4c186847
      Paolo Bonzini authored
      
      Rename the argument so that "addr" is only used inside the for loop.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4c186847
    • Paolo Bonzini's avatar
      ui/vnc: fix handling of VNC_FEATURE_XVP · 477b3010
      Paolo Bonzini authored
      
      VNC_FEATURE_XVP was not shifted left before adding it to vs->features,
      so it was never enabled; but it was also checked the wrong way with
      a logical AND instead of vnc_has_feature.  Fix both places.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      477b3010
    • Paolo Bonzini's avatar
      ui/vnc: fix debug output for invalid audio message · 0cb9c588
      Paolo Bonzini authored
      
      The debug message was cut and pasted from the invalid audio format
      case, but the audio message is at bytes 2-3.
      
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0cb9c588
    • Paolo Bonzini's avatar
    • Thomas Huth's avatar
      hw/scsi/scsi-disk: Disallow block sizes smaller than 512 [CVE-2023-42467] · 7cfcc79b
      Thomas Huth authored
      We are doing things like
      
          nb_sectors /= (s->qdev.blocksize / BDRV_SECTOR_SIZE);
      
      in the code here (e.g. in scsi_disk_emulate_mode_sense()), so if
      the blocksize is smaller than BDRV_SECTOR_SIZE (=512), this crashes
      with a division by 0 exception. Thus disallow block sizes of 256
      bytes to avoid this situation.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1813
      
      
      CVE: 2023-42467
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20230925091854.49198-1-thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7cfcc79b
    • Paolo Bonzini's avatar
      user-exec-stub: remove unused variable · 8a9fc82b
      Paolo Bonzini authored
      
      enable_cpu_pm is only used by softmmu-specific code, namely target/i386/host-cpu.c
      and target/i386/kvm/*.  It does not need a stub definition anymore.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8a9fc82b
    • Paolo Bonzini's avatar
      seabios: remove PCI drivers from bios.bin · a1fadbcf
      Paolo Bonzini authored
      
      bios.bin is now used only by ISA PC, so PCI drivers are not necessary.
      
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a1fadbcf
    • Paolo Bonzini's avatar
      pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7 · ea985d23
      Paolo Bonzini authored
      
      These are the last users of the 128K SeaBIOS blob in the i440FX family.
      Removing them allows us to drop PCI support from the 128K blob,
      thus making it easier to update SeaBIOS to newer versions.
      
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ea985d23
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-request-2023-09-25' of https://gitlab.com/thuth/qemu into staging · 494a6a2c
      Stefan Hajnoczi authored
      * Make keyutils independent from keyring in meson.build
      * Simplify the NIC init code of the jazz machine a little bit
      * Minor qtest and avocado fixes
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmURS8gRHHRodXRoQHJl
      # ZGhhdC5jb20ACgkQLtnXdP5wLbVn4A/+NQKFZcN7gVn5JXkK7kf6i01LNmAoqjj9
      # QeQL+WCoNC68OApw7DxIEnpBYT0G42NTHHx4SYeOvzJUzCpeWcxYzQUz58ObZML7
      # +OKsiOsaHu3/qOuihBCn43et6moLdDCWbee5Zr6JQv/Fjn3q3nEQZnJDWdw8vm1v
      # csYQJZOD6HelLVMmbLfl1szzrykDTT53NhPncH/SjPz6we17sKqHqmT6LBUIsXcV
      # u2LaowppKmT7Ooexu6SmsCagLhtWuYo1iGGcRqoojtRWo7eZtWLrAy2DJpyFkPBW
      # AIYBfntRISZv4eBGCxcVfvODD/Q4OXHuYTfGzD3m+ELJ6hUk/+d4/aHJ2hm+KEm+
      # AD0IpDtimaEmyQTPlaWHhhEur/82JZ+zYlxUMPf3+hglB/rbr6fhA0SMAV6nwR0r
      # N8jnB8UCml9oDxJVvDZyrcPMGFs1xlr5FVSHHEoL338SvSfjG3NOEtcNao9n6A8d
      # rO2CfPzI7peQhKWAzJL+qpnmenyIniH23tFnf2mpOZ0g45ZWtJeT0CXL3aQO3XAZ
      # m56pkM0d/etAHHRoLQ5D/iKZpwiTRLjdzsJ0gMAQsIuRlG/j5h+zou0vUMgm6F8F
      # igRHLxytlywZBTCABm2XIlKmaJp8hQlVQMpKsv/BwzTvzzk0GGS5d1qzzFt5WWR7
      # 4rSalTn5Xuw=
      # =FioB
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 25 Sep 2023 04:58:48 EDT
      # 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-09-25' of https://gitlab.com/thuth/qemu
      
      :
        tests/avocado: fix waiting for vm shutdown in replay_linux
        hw/mips/jazz: Simplify the NIC setup code
        hw/mips/jazz: Move the NIC init code into a separate function
        tests/qtest/netdev-socket: Do not test multicast on Darwin
        tests/qtest/m48t59-test: Silence compiler warning with -Wshadow
        tests/qtest/netdev-socket: Raise connection timeout to 120 seconds
        meson.build: Make keyutils independent from keyring
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      494a6a2c
    • Stefan Hajnoczi's avatar
      Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging · 29578f57
      Stefan Hajnoczi authored
      * add host ticks function for RISC-V
      * target/i386: Export GDS_NO bit
      * target/i386: add support for bit 56 of MSR_IA32_VMX_BASIC
      * first part of audiodev cleanups
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmUNtYUUHHBib256aW5p
      # QHJlZGhhdC5jb20ACgkQv/vSX3jHroN7Uwf9Fy4aE1PHzSNr2FqT4rUSYrT4N8cL
      # QiPeB8JiJUnl73TcCkTwi7S/Az+37okv+Qsr7eh1wdarY8DOYir9dGJU3TGzICSw
      # cgPImb99rhBc2kEmwciCWGlhXIMD8WNN64EanPPg5VeQYdzrorYwl7jCTMQMBR5H
      # wtOq3f6FfYJonVwZ6YOmbioD2mFfoGBuiDcYmTTw440vrruKqHagbm5onD1SY9kR
      # SM0/HXcYaKB6Ae9qNKhyR9h94KZzDUkCvcTLdFGtK90GBs4VxZVHQn6Dpkh5lPtT
      # t0MbMv1mcO6ODzg9TxO3gUAgoklTy3gM2wISXo5C9NGuxmF2svwkuQl5pg==
      # =CuIa
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Fri 22 Sep 2023 11:40:53 EDT
      # 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
      
      :
        vl: recognize audiodev groups in configuration files
        tests/qtest: Specify audiodev= and -audiodev
        hw/display/xlnx_dp.c: Add audiodev property
        hw/audio/lm4549: Add errp error reporting to init function
        hw/audio: Simplify hda audio init
        hw/input/tsc210x: Extract common init code into new function
        qemu/timer: Add host ticks function for RISC-V
        target/i386: Export GDS_NO bit to guests
        target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      29578f57
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-target-arm-20230921' of... · bf94b63d
      Stefan Hajnoczi authored
      Merge tag 'pull-target-arm-20230921' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
      
      target-arm queue:
       * target/m68k: Add URL to semihosting spec
       * docs/devel/loads-stores: Fix git grep regexes
       * hw/arm/boot: Set SCR_EL3.FGTEn when booting kernel
       * linux-user: Correct SME feature names reported in cpuinfo
       * linux-user: Add missing arm32 hwcaps
       * Don't skip MTE checks for LDRT/STRT at EL0
       * Implement FEAT_HBC
       * Implement FEAT_MOPS
       * audio/jackaudio: Avoid dynamic stack allocation
       * sbsa-ref: add non-secure EL2 virtual timer
       * elf2dmp: improve Win2022, Win11 and large dumps
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmUMfwAZHHBldGVyLm1h
      # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3jvnD/0QE/oOxfr+wkDUkTasSwVc
      # UNfhObMj3h8x2XApqXckXnckew97I7hh7OLk35p9Ncea7fb6CvGMZ/DJir7AG4aQ
      # Anpd5g2Qo0AMfPIyvoJ5pgtqZ1aS/EpBfYixmjL/zY6+zNzoVzWG/KfL+XamW6ir
      # 6U7EqcAUzfX0+Splcxs5WgCDI5nGtn0B42EwOMpmwsH4opfr6HTn8Rzbn9gIwKU7
      # u82PaKAqWPYD0ev9NQra+VVTrrFS4SCcqkV+SoYu0Cg5vvBlgAVcx0Zz2objp9LC
      # 96fOtFH4Rch611j87WiGvN+fxQawqYzAYdy2y+j0wwuonTH9G3PpdZZT0557NjeS
      # rFpW2UQebDqZ3ZTDwhzefsVKc3emLZtEd+RFa/YcDtao0afKfbSHv5A2/pGHxzlv
      # 8psKOOH82WXTOHwFKA2o0lXDAauzirY+1Avy0vozNzPCdErXPgMHY4tABU77PpER
      # Pz17jJO9C1AGyQVF+o09ieJR2Du5Wb2LLcZP3+5Ctm0SNVmREKKNcMkhJiEM9snm
      # PQBR7FNEbAuQAO2MDK70dWUcTNtOv4Q1jgTR+aYd2MrArxCmAA5Zd9gjeYDwv6XH
      # n242ONDAhlG1fY5f5giE3vCrcV1FDbvHEn6GDVilgMrF3a3Iw30xUaATiO09hIfi
      # XAwGwLtMsp21WDa5PsfZVw==
      # =dalQ
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Thu 21 Sep 2023 13:36:00 EDT
      # 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-20230921' of https://git.linaro.org/people/pmaydell/qemu-arm
      
      : (30 commits)
        elf2dmp: rework PDB_STREAM_INDEXES::segments obtaining
        elf2dmp: use Linux mmap with MAP_NORESERVE when possible
        elf2dmp: introduce merging of physical memory runs
        elf2dmp: introduce physical block alignment
        elf2dmp: replace PE export name check with PDB name check
        sbsa-ref: add non-secure EL2 virtual timer
        audio/jackaudio: Avoid dynamic stack allocation in qjack_process()
        audio/jackaudio: Avoid dynamic stack allocation in qjack_client_init
        target/arm: Enable FEAT_MOPS for CPU 'max'
        target/arm: Implement the CPY* instructions
        target/arm: Implement MTE tag-checking functions for FEAT_MOPS copies
        target/arm: Implement the SETG* instructions
        target/arm: Define new TB flag for ATA0
        target/arm: Implement the SET* instructions
        target/arm: Implement MTE tag-checking functions for FEAT_MOPS
        target/arm: New function allocation_tag_mem_probe()
        target/arm: Define syndrome function for MOPS exceptions
        target/arm: Pass unpriv bool to get_a64_user_mem_index()
        target/arm: Implement FEAT_MOPS enable bits
        target/arm: Don't skip MTE checks for LDRT/STRT at EL0
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      bf94b63d
    • Pavel Dovgalyuk's avatar
      tests/avocado: fix waiting for vm shutdown in replay_linux · b8211095
      Pavel Dovgalyuk authored
      
      This patch fixes the race condition in waiting for shutdown
      of the replay linux test.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
      Suggested-by: default avatarJohn Snow <jsnow@redhat.com>
      Message-ID: <20230811070608.3383343-4-pavel.dovgalyuk@ispras.ru>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      b8211095
    • Thomas Huth's avatar
      hw/mips/jazz: Simplify the NIC setup code · c9daa685
      Thomas Huth authored
      
      The for-loop does not make much sense here - it is always left after
      the first iteration, so we can also check for nb_nics == 1 instead
      which is way easier to understand.
      
      Also, the checks for nd->model are superfluous since the code in
      mips_jazz_init_net() calls qemu_check_nic_model() that already
      takes care of this (i.e. initializing nd->model if it has not been
      set yet, and checking whether it is the "help" option or the
      supported NIC model).
      
      Message-ID: <20230913160922.355640-3-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      c9daa685
    • Thomas Huth's avatar
      hw/mips/jazz: Move the NIC init code into a separate function · 4032f04c
      Thomas Huth authored
      
      The mips_jazz_init() function is already quite big, so moving
      away some code here can help to make it more understandable.
      Additionally, by moving this code into a separate function, the
      next patch (that will refactor the for-loop around the NIC init
      code) will be much shorter and easier to understand.
      
      Message-ID: <20230913160922.355640-2-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      4032f04c
    • Philippe Mathieu-Daudé's avatar
      tests/qtest/netdev-socket: Do not test multicast on Darwin · 02e8828a
      Philippe Mathieu-Daudé authored
      
      Do not run this test on Darwin, otherwise we get:
      
        qemu-system-arm: -netdev dgram,id=st0,remote.type=inet,remote.host=230.0.0.1,remote.port=1234:
         can't add socket to multicast group 230.0.0.1: Can't assign requested address
        Broken pipe
        ../../tests/qtest/libqtest.c:191: kill_qemu() tried to terminate QEMU
         process but encountered exit status 1 (expected 0)
        Abort trap: 6
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Message-ID: <20230918062549.2363-1-philmd@linaro.org>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      02e8828a
    • Thomas Huth's avatar
      tests/qtest/m48t59-test: Silence compiler warning with -Wshadow · 926bef1d
      Thomas Huth authored
      
      When compiling this file with -Wshadow=local , we get:
      
      ../tests/qtest/m48t59-test.c: In function ‘bcd_check_time’:
      ../tests/qtest/m48t59-test.c:195:17: warning: declaration of ‘s’
       shadows a previous local [-Wshadow=local]
        195 |         long t, s;
            |                 ^
      ../tests/qtest/m48t59-test.c:158:17: note: shadowed declaration is here
        158 |     QTestState *s = m48t59_qtest_start();
            |                 ^
      
      Rename the QTestState variable to "qts" which is the common
      naming for such a variable in other tests.
      
      Reported-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-ID: <20230922163742.149444-1-thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatar"Daniel P. Berrangé" <berrange@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      926bef1d
    • Stefan Hajnoczi's avatar
      tests/qtest/netdev-socket: Raise connection timeout to 120 seconds · 0daaf276
      Stefan Hajnoczi authored
      The test still fails intermittently with a 60 second timeout in the
      GitLab CI environment. Raise the timeout to 120 seconds.
      
        576/839 ERROR:../tests/qtest/netdev-socket.c:293:test_stream_unix:
         assertion failed (resp == expect):
         ("st0: index=0,type=stream,connection error\r\n" == "st0: index=0,type=stream,unix:/tmp/netdev-socket.UW5IA2/stream_unix\r\n") ERROR
        576/839 qemu:qtest+qtest-sh4 / qtest-sh4/netdev-socket
                                    ERROR          62.85s   killed by signal 6 SIGABRT
        >>> MALLOC_PERTURB_=249 QTEST_QEMU_BINARY=./qemu-system-sh4
         QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/qemu-storage-daemon
         G_TEST_DBUS_DAEMON=/home/gitlab-runner/builds/-LCfcJ2T/0/qemu-project/qemu/tests/dbus-vmstate-daemon.sh
         QTEST_QEMU_IMG=./qemu-img /home/gitlab-runner/builds/-LCfcJ2T/0/qemu-project/qemu/build/tests/qtest/netdev-socket --tap -k
        ――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
        stderr:
        **
        ERROR:../tests/qtest/netdev-socket.c:293:test_stream_unix: assertion failed (resp == expect): ("st0: index=0,type=stream,connection error\r\n" == "st0: index=0,type=stream,unix:/tmp/netdev-socket.UW5IA2/stream_unix\r\n")
        (test program exited with status code -6)
      
      Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1881
      
      
      Fixes: 417296c8 ("tests/qtest/netdev-socket: Raise connection timeout to 60 seconds")
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: default avatar"Daniel P. Berrangé" <berrange@redhat.com>
      Message-ID: <20230912133310.60583-1-stefanha@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      0daaf276
    • Thomas Huth's avatar
      meson.build: Make keyutils independent from keyring · c64023b0
      Thomas Huth authored
      Commit 0db0fbb5 ("Add conditional dependency for libkeyutils")
      tried to provide a possibility for the user to disable keyutils
      if not required by makeing it depend on the keyring feature. This
      looked reasonable at a first glance (the unit test in tests/unit/
      needs both), but the condition in meson.build fails if the feature
      is meant to be detected automatically, and there is also another
      spot in backends/meson.build where keyutils is used independently
      from keyring. So let's remove the dependency on keyring again and
      introduce a proper meson build option instead.
      
      Cc: qemu-stable@nongnu.org
      Fixes: 0db0fbb5 ("Add conditional dependency for libkeyutils")
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1842
      
      
      Message-ID: <20230824094208.255279-1-thuth@redhat.com>
      Reviewed-by: default avatar"Daniel P. Berrangé" <berrange@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      c64023b0
  3. Sep 22, 2023
  4. Sep 21, 2023
Loading