1. 13 Jul, 2021 1 commit
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging · 5e05c40c
      Peter Maydell authored
      
      Pull request
      
      # gpg: Signature made Mon 12 Jul 2021 17:49:46 BST
      # gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha-gitlab/tags/tracing-pull-request:
        trace, lttng: require .pc files
        trace/simple: add st_init_group
        trace/simple: pass iter to st_write_event_mapping
        trace: add trace_event_iter_init_group
        trace: iter init tweaks
        qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      5e05c40c
  2. 12 Jul, 2021 13 commits
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/philmd/tags/sdmmc-20210712' into staging · eca73713
      Peter Maydell authored
      
      SD/MMC patches queue
      
      - sdcard: Check for valid address range in SEND_WRITE_PROT (CMD30)
      
      # gpg: Signature made Mon 12 Jul 2021 11:28:13 BST
      # 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
      
      * remotes/philmd/tags/sdmmc-20210712:
        hw/sd/sdcard: Check for valid address range in SEND_WRITE_PROT (CMD30)
        hw/sd/sdcard: Extract address_in_range() helper, log invalid accesses
        hw/sd/sdcard: When card is in wrong state, log which state it is
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      eca73713
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210708' into staging · 57e28d34
      Peter Maydell authored
      
      s390x updates:
      - add gen16 cpumodels
      - refactor/cleanup some code
      - bugfixes
      
      # gpg: Signature made Thu 08 Jul 2021 12:26:21 BST
      # gpg:                using EDDSA key 69A3B536F5CBFC65208026C1DE88BB5641DE66C1
      # gpg:                issuer "cohuck@redhat.com"
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown]
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [unknown]
      # gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [unknown]
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      #      Subkey fingerprint: 69A3 B536 F5CB FC65 2080  26C1 DE88 BB56 41DE 66C1
      
      * remotes/cohuck-gitlab/tags/s390x-20210708:
        target/s390x: split sysemu part of cpu models
        target/s390x: move kvm files into kvm/
        target/s390x: remove kvm-stub.c
        target/s390x: use kvm_enabled() to wrap call to kvm_s390_get_hpage_1m
        target/s390x: make helper.c sysemu-only
        target/s390x: split cpu-dump from helper.c
        target/s390x: move sysemu-only code out to cpu-sysemu.c
        target/s390x: start moving TCG-only code to tcg/
        target/s390x: rename internal.h to s390x-internal.h
        target/s390x: remove tcg-stub.c
        hw/s390x: only build tod-tcg from the CONFIG_TCG build
        hw/s390x: tod: make explicit checks for accelerators when initializing
        hw/s390x: rename tod-qemu.c to tod-tcg.c
        target/s390x: meson: add target_user_arch
        s390x/tcg: Fix m5 vs. m4 field for VECTOR MULTIPLY SUM LOGICAL
        target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL
        s390x/cpumodel: add 3931 and 3932
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      57e28d34
    • Paolo Bonzini's avatar
      trace, lttng: require .pc files · bbe47ed2
      Paolo Bonzini authored
      
      The next version of lttng-libs will not require liburcu at run time anymore.
      Therefore, it is expected that distros will not include the urcubp libraries
      anymore when installing lttng-ust-devel.
      
      To avoid future problems, just require pkg-config to detect lttng-ust.
      The .pc files for lttng-ust correctly include liburcubp.a for static
      builds, and have always done since pkg-config files were added in 2011.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20210712155710.520889-1-pbonzini@redhat.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      bbe47ed2
    • Gerd Hoffmann's avatar
      trace/simple: add st_init_group · 263b6e96
      Gerd Hoffmann authored
      
      Add helper function and call it for each trace event group added.
      Makes sure that events added at module load time are initialized
      properly.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20210601132414.432430-6-kraxel@redhat.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      263b6e96
    • Gerd Hoffmann's avatar
      trace/simple: pass iter to st_write_event_mapping · 3f2a0984
      Gerd Hoffmann authored
      
      Pass an iter to st_write_event_mapping, so the function can interate
      different things depending on how we initialize the iter.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20210601132414.432430-5-kraxel@redhat.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      3f2a0984
    • Gerd Hoffmann's avatar
      trace: add trace_event_iter_init_group · c5cc58b1
      Gerd Hoffmann authored
      
      This allows to interate over an event group.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20210601132414.432430-4-kraxel@redhat.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      c5cc58b1
    • Gerd Hoffmann's avatar
      trace: iter init tweaks · 117856c3
      Gerd Hoffmann authored
      
      Rename trace_event_iter_init() to trace_event_iter_init_pattern(),
      add trace_event_iter_init_all() for interating over all events.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20210601132414.432430-3-kraxel@redhat.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      117856c3
    • Gerd Hoffmann's avatar
      qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful. · 2adf2164
      Gerd Hoffmann authored
      
      Setting SYSTEMTAP_TAPSET to some value other than
      /usr/share/systemtap/tapsets results in systemtap not finding the
      standard tapset library any more, which in turn breaks tracing because
      pid() and other standard systemtap functions are not available any more.
      
      So using SYSTEMTAP_TAPSET to point systemtap to the qemu probes will
      only work for the prefix=/usr installs because both qemu and system
      tapsets in the same directory then.  All other prefixes are broken.
      
      Fix that by using the "-I $tapsetdir" command line switch instead.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-id: 20210601132414.432430-2-kraxel@redhat.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      2adf2164
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/philmd/tags/mips-20210711' into staging · 552fda48
      Peter Maydell authored
      
      MIPS patches queue
      
      - Rename Raven ASIC PCI bridge, add PCI_IO_BASE_ADDR definition
      - Various Toshiba TX79 opcodes implemented
      - Rewrite UHI errno_mips() using switch statement
      - Few fixes and improvements in the SONIC model (dp8393x)
      
      # gpg: Signature made Sun 11 Jul 2021 22:12:49 BST
      # 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
      
      * remotes/philmd/tags/mips-20210711:
        dp8393x: don't force 32-bit register access
        dp8393x: Rewrite dp8393x_get() / dp8393x_put()
        dp8393x: Store CAM registers as 16-bit
        dp8393x: Replace 0x40 magic value by SONIC_REG_COUNT definition
        dp8393x: Replace address_space_rw(is_write=1) by address_space_write()
        dp8393x: fix CAM descriptor entry index
        target/mips: Rewrite UHI errno_mips() using switch statement
        target/mips/tx79: Introduce SQ opcode (Store Quadword)
        target/mips/tx79: Introduce LQ opcode (Load Quadword)
        target/mips/tx79: Introduce PROT3W opcode (Parallel Rotate 3 Words)
        target/mips/tx79: Introduce PPACW opcode (Parallel Pack to Word)
        target/mips/tx79: Introduce PCGT* (Parallel Compare for Greater Than)
        target/mips/tx79: Introduce PCEQ* opcodes (Parallel Compare for Equal)
        target/mips/tx79: Introduce PEXTL[BHW] opcodes (Parallel Extend Lower)
        target/mips/tx79: Introduce PEXTUW (Parallel Extend Upper from Word)
        target/mips/tx79: Introduce PSUB* opcodes (Parallel Subtract)
        target/mips/tx79: Introduce PAND/POR/PXOR/PNOR opcodes (parallel logic)
        hw/pci-host/raven: Add PCI_IO_BASE_ADDR definition
        hw/pci-host: Rename Raven ASIC PCI bridge as raven.c
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      552fda48
    • Philippe Mathieu-Daudé's avatar
      hw/sd/sdcard: Check for valid address range in SEND_WRITE_PROT (CMD30) · 59b63d78
      Philippe Mathieu-Daudé authored
      OSS-Fuzz found sending illegal addresses when querying the write
      protection bits triggers an assertion:
      
        qemu-fuzz-i386: hw/sd/sd.c:824: uint32_t sd_wpbits(SDState *, uint64_t): Assertion `wpnum < sd->wpgrps_size' failed.
        ==11578== ERROR: libFuzzer: deadly signal
        #8 0x7ffff628e091 in __assert_fail
        #9 0x5555588f1a3c in sd_wpbits hw/sd/sd.c:824:9
        #10 0x5555588dd271 in sd_normal_command hw/sd/sd.c:1383:38
        #11 0x5555588d777c in sd_do_command hw/sd/sd.c
        #12 0x555558cb25a0 in sdbus_do_command hw/sd/core.c:100:16
        #13 0x555558e02a9a in sdhci_send_command hw/sd/sdhci.c:337:12
        #14 0x555558dffa46 in sdhci_write hw/sd/sdhci.c:1187:9
        #15 0x5555598b9d76 in memory_region_write_accessor softmmu/memory.c:489:5
      
      Similarly to commit 8573378e ("hw/sd: fix out-of-bounds check
      for multi block reads"), check the address range before sending
      the status of the write protection bits.
      
      Include the qtest reproducer provided by Alexander Bulekov:
      
        $ make check-qtest-i386
        ...
        Running test qtest-i386/fuzz-sdcard-test
        qemu-system-i386: ../hw/sd/sd.c:824: sd_wpbits: Assertion `wpnum < sd->wpgrps_size' failed.
      
      Reported-by: OSS-Fuzz (Issue 29225)
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/450
      
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      Message-Id: <20210702155900.148665-4-f4bug@amsat.org>
      59b63d78
    • Philippe Mathieu-Daudé's avatar
      hw/sd/sdcard: Extract address_in_range() helper, log invalid accesses · 66c152d7
      Philippe Mathieu-Daudé authored
      
      Multiple commands have to check the address requested is valid.
      Extract this code pattern as a new address_in_range() helper, and
      log invalid accesses as guest errors.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Message-Id: <20210624142209.1193073-3-f4bug@amsat.org>
      66c152d7
    • Philippe Mathieu-Daudé's avatar
      hw/sd/sdcard: When card is in wrong state, log which state it is · c60b2921
      Philippe Mathieu-Daudé authored
      
      We report the card is in an inconsistent state, but don't precise
      in which state it is. Add this information, as it is useful when
      debugging problems.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Message-Id: <20210624142209.1193073-2-f4bug@amsat.org>
      Reviewed-by: default avatarAlexander Bulekov <alxndr@bu.edu>
      c60b2921
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' into staging · bd38ae26
      Peter Maydell authored
      
      Add translator_use_goto_tb.
      Cleanups in prep of breakpoint fixes.
      Misc fixes.
      
      # gpg: Signature made Sat 10 Jul 2021 16:29:14 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
      
      * remotes/rth-gitlab/tags/pull-tcg-20210710: (41 commits)
        cpu: Add breakpoint tracepoints
        tcg: Remove TCG_TARGET_HAS_goto_ptr
        accel/tcg: Log tb->cflags with -d exec
        accel/tcg: Split out log_cpu_exec
        accel/tcg: Move tb_lookup to cpu-exec.c
        accel/tcg: Move helper_lookup_tb_ptr to cpu-exec.c
        target/i386: Use cpu_breakpoint_test in breakpoint_handler
        tcg: Fix prologue disassembly
        target/xtensa: Use translator_use_goto_tb
        target/tricore: Use tcg_gen_lookup_and_goto_ptr
        target/tricore: Use translator_use_goto_tb
        target/sparc: Use translator_use_goto_tb
        target/sh4: Use translator_use_goto_tb
        target/s390x: Remove use_exit_tb
        target/s390x: Use translator_use_goto_tb
        target/rx: Use translator_use_goto_tb
        target/riscv: Use translator_use_goto_tb
        target/ppc: Use translator_use_goto_tb
        target/openrisc: Use translator_use_goto_tb
        target/nios2: Use translator_use_goto_tb
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      bd38ae26
  3. 11 Jul, 2021 23 commits
  4. 10 Jul, 2021 3 commits
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 42e1d798
      Peter Maydell authored
      
      Block layer patches
      
      - Make blockdev-reopen stable
      - Remove deprecated qemu-img backing file without format
      - rbd: Convert to coroutines and add write zeroes support
      - rbd: Updated MAINTAINERS
      - export/fuse: Allow other users access to the export
      - vhost-user: Fix backends without multiqueue support
      - Fix drive-backup transaction endless drained section
      
      # gpg: Signature made Fri 09 Jul 2021 13:49:22 BST
      # 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
      
      * remotes/kevin/tags/for-upstream: (28 commits)
        block: Make blockdev-reopen stable API
        iotests: Test reopening multiple devices at the same time
        block: Support multiple reopening with x-blockdev-reopen
        block: Acquire AioContexts during bdrv_reopen_multiple()
        block: Add bdrv_reopen_queue_free()
        qcow2: Fix dangling pointer after reopen for 'file'
        qemu-img: Improve error for rebase without backing format
        qemu-img: Require -F with -b backing image
        qcow2: Prohibit backing file changes in 'qemu-img amend'
        blockdev: fix drive-backup transaction endless drained section
        vhost-user: Fix backends without multiqueue support
        MAINTAINERS: add block/rbd.c reviewer
        block/rbd: fix type of task->complete
        iotests/fuse-allow-other: Test allow-other
        iotests/308: Test +w on read-only FUSE exports
        export/fuse: Let permissions be adjustable
        export/fuse: Give SET_ATTR_SIZE its own branch
        export/fuse: Add allow-other option
        export/fuse: Pass default_permissions for mount
        util/uri: do not check argument of uri_free()
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      42e1d798
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.1-20210709' into staging · fc32b91a
      Peter Maydell authored
      
      ppc patch queue 2021-07-09
      
      Here's a (probably) final pull request before the qemu-6.1 soft
      freeze.  Includes:
        * Implementation of the new H_RPT_INVALIDATE hypercall
        * Virtual Open Firmware for pSeries and pegasos2 machine types.
          This is an experimental minimal Open Firmware implementation which
          works by delegating nearly everything to qemu itself via a special
          hypercall.
        * A number of cleanups to the ppc soft MMU code
        * Fix to handling of two-level radix mode translations for the
          powernv machine type
        * Update the H_GET_CPU_CHARACTERISTICS call with newly defined bits.
          This will allow more flexible handling of possible future CPU
          Spectre-like flaws
        * Correctly treat mtmsrd as an illegal instruction on BookE cpus
        * Firmware update for the ppce500 machine type
      
      # gpg: Signature made Fri 09 Jul 2021 06:16:42 BST
      # gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dg-gitlab/tags/ppc-for-6.1-20210709: (33 commits)
        target/ppc: Support for H_RPT_INVALIDATE hcall
        linux-headers: Update
        spapr: Fix implementation of Open Firmware client interface
        target/ppc: Don't compile ppc_tlb_invalid_all without TCG
        ppc/pegasos2: Implement some RTAS functions with VOF
        ppc/pegasos2: Fix use of && instead of &
        ppc/pegasos2: Use Virtual Open Firmware as firmware replacement
        target/ppc/spapr: Update H_GET_CPU_CHARACTERISTICS L1D cache flush bits
        target/ppc: Allow virtual hypervisor on CPU without HV
        ppc/pegasos2: Introduce Pegasos2MachineState structure
        target/ppc: mtmsrd is an illegal instruction on BookE
        spapr: Implement Open Firmware client interface
        docs/system: ppc: Update ppce500 documentation with eTSEC support
        roms/u-boot: Bump ppce500 u-boot to v2021.07 to add eTSEC support
        target/ppc: change ppc_hash32_xlate to use mmu_idx
        target/ppc: introduce mmu-books.h
        target/ppc: changed ppc_hash64_xlate to use mmu_idx
        target/ppc: fix address translation bug for radix mmus
        target/ppc: Fix compilation with DEBUG_BATS debug option
        target/ppc: Fix compilation with FLUSH_ALL_TLBS debug option
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      fc32b91a
    • Richard Henderson's avatar