Skip to content
Snippets Groups Projects
  1. Mar 08, 2021
    • Stefano Garzarella's avatar
      blockjob: report a better error message · 3b6ad623
      Stefano Garzarella authored
      
      When a block job fails, we report strerror(-job->job.ret) error
      message, also if the job set an error object.
      Let's report a better error message using error_get_pretty(job->job.err).
      
      If an error object was not set, strerror(-job->ret) is used as fallback,
      as explained in include/qemu/job.h:
      
      typedef struct Job {
          ...
          /**
           * Error object for a failed job.
           * If job->ret is nonzero and an error object was not set, it will be set
           * to strerror(-job->ret) during job_completed.
           */
          Error *err;
      }
      
      In block_job_query() there can be a transient where 'job.err' is not set
      by a scheduled bottom half. In that case we use strerror(-job->ret) as it
      was before.
      
      Suggested-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Message-Id: <20210225103633.76746-1-sgarzare@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      3b6ad623
    • Eric Blake's avatar
      iotests: Fix up python style in 300 · 4aa6fc69
      Eric Blake authored
      
      Break some long lines, and relax our type hints to be more generic to
      any JSON, in order to more easily permit the additional JSON depth now
      possible in migration parameters.  Detected by iotest 297.
      
      Fixes: ca4bfec4
       (qemu-iotests: 300: Add test case for modifying persistence of bitmap)
      Reported-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20210215220518.1745469-1-eblake@redhat.com>
      Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      4aa6fc69
    • Hanna Reitz's avatar
      iotests/283: Check that finalize drops backup-top · e4179940
      Hanna Reitz authored
      
      Without any of HEAD^ or HEAD^^ applied, qemu will most likely crash on
      the qemu-io invocation, for a variety of immediate reasons.  The
      underlying problem is generally a use-after-free access into
      backup-top's BlockCopyState.
      
      With only HEAD^ applied, qemu-io will run into an EIO (which is not
      capture by the output, but you can see that the qemu-io invocation will
      be accepted (i.e., qemu-io will run) in contrast to the reference
      output, where the node name cannot be found), and qemu will then crash
      in query-named-block-nodes: bdrv_get_allocated_file_size() detects
      backup-top to be a filter and passes the request through to its child.
      However, after bdrv_backup_top_drop(), that child is NULL, so the
      recursive call crashes.
      
      With HEAD^^ applied, this test should pass.
      
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20210219153348.41861-4-mreitz@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      e4179940
    • Hanna Reitz's avatar
      backup-top: Refuse I/O in inactive state · 705dde27
      Hanna Reitz authored
      
      When the backup-top node transitions from active to inactive in
      bdrv_backup_top_drop(), the BlockCopyState is freed and the filtered
      child is removed, so the node effectively becomes unusable.
      
      However, noone told its I/O functions this, so they will happily
      continue accessing bs->backing and s->bcs.  Prevent that by aborting
      early when s->active is false.
      
      (After the preceding patch, the node should be gone after
      bdrv_backup_top_drop(), so this should largely be a theoretical problem.
      But still, better to be safe than sorry, and also I think it just makes
      sense to check s->active in the I/O functions.)
      
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20210219153348.41861-3-mreitz@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      705dde27
    • Hanna Reitz's avatar
      backup: Remove nodes from job in .clean() · bdc4c4c5
      Hanna Reitz authored
      
      The block job holds a reference to the backup-top node (because it is
      passed as the main job BDS to block_job_create()).  Therefore,
      bdrv_backup_top_drop() cannot delete the backup-top node (replacing it
      by its child does not affect the job parent, because that has
      .stay_at_node set).  That is a problem, because all of its I/O functions
      assume the BlockCopyState (s->bcs) to be valid and that it has a
      filtered child; but after bdrv_backup_top_drop(), neither of those
      things are true.
      
      It does not make sense to add new parents to backup-top after
      backup_clean(), so we should detach it from the job before
      bdrv_backup_top_drop().  Because there is no function to do that for a
      single node, just detach all of the job's nodes -- the job does not do
      anything past backup_clean() anyway.
      
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20210219153348.41861-2-mreitz@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      bdc4c4c5
    • Alberto Garcia's avatar
      iotests: Drop deprecated 'props' from object-add · fa818b2f
      Alberto Garcia authored
      
      Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
      Message-Id: <20210222115737.2993-1-berto@igalia.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      fa818b2f
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210308' into staging · 138d2931
      Peter Maydell authored
      
      target-arm queue:
       * sbsa-ref: remove cortex-a53 from list of supported cpus
       * sbsa-ref: add 'max' to list of allowed cpus
       * target/arm: Add support for FEAT_SSBS, Speculative Store Bypass Safe
       * npcm7xx: add EMC model
       * xlnx-zynqmp: Remove obsolete 'has_rpu' property
       * target/arm: Speed up aarch64 TBL/TBX
       * virtio-mmio: improve virtio-mmio get_dev_path alog
       * target/arm: Use TCF0 and TFSRE0 for unprivileged tag checks
       * target/arm: Restrict v8M IDAU to TCG
       * target/arm/cpu: Update coding style to make checkpatch.pl happy
       * musicpal, tc6393xb, omap_lcdc, tcx: drop dead code for non-32-bit-RGB surfaces
       * Add new board: mps3-an524
      
      # gpg: Signature made Mon 08 Mar 2021 11:56:24 GMT
      # 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]
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20210308: (49 commits)
        hw/arm/mps2: Update old infocenter.arm.com URLs
        docs/system/arm/mps2.rst: Document the new mps3-an524 board
        hw/arm/mps2-tz: Provide PL031 RTC on mps3-an524
        hw/arm/mps2-tz: Stub out USB controller for mps3-an524
        hw/arm/mps2-tz: Add new mps3-an524 board
        hw/arm/mps2-tz: Get armv7m_load_kernel() size argument from RAMInfo
        hw/arm/mps2-tz: Support ROMs as well as RAMs
        hw/arm/mps2-tz: Set MachineClass default_ram info from RAMInfo data
        hw/arm/mps2-tz: Make RAM arrangement board-specific
        hw/arm/mps2-tz: Allow boards to have different PPCInfo data
        hw/arm/mps2-tz: Size the uart-irq-orgate based on the number of UARTs
        hw/arm/mps2-tz: Move device IRQ info to data structures
        hw/arm/mps2-tz: Allow PPCPortInfo structures to specify device interrupts
        hw/arm/mps2-tz: Correct wrong interrupt numbers for DMA and SPI
        hw/misc/mps2-scc: Implement CFG_REG5 and CFG_REG6 for MPS3 AN524
        hw/arm/mps2-tz: Make number of IRQs board-specific
        hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board type
        hw/arm/mps2-tz: Make FPGAIO switch and LED config per-board
        hw/misc/mps2-fpgaio: Support SWITCH register
        hw/misc/mps2-fpgaio: Make number of LEDs configurable by board
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      138d2931
    • Peter Maydell's avatar
      hw/arm/mps2: Update old infocenter.arm.com URLs · 50b52b18
      Peter Maydell authored
      
      Update old infocenter.arm.com URLs to the equivalent developer.arm.com
      ones (the old URLs should redirect, but we might as well avoid the
      redirection notice, and the new URLs are pleasantly shorter).
      
      This commit covers the links to the MPS2 board TRM, the various
      Application Notes, the IoTKit and SSE-200 documents.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210215115138.20465-25-peter.maydell@linaro.org
      50b52b18
    • Peter Maydell's avatar
      docs/system/arm/mps2.rst: Document the new mps3-an524 board · ced8bb04
      Peter Maydell authored
      
      Add brief documentation of the new mps3-an524 board.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210215115138.20465-24-peter.maydell@linaro.org
      ced8bb04
    • Peter Maydell's avatar
      hw/arm/mps2-tz: Provide PL031 RTC on mps3-an524 · 41745d20
      Peter Maydell authored
      
      The AN524 has a PL031 RTC, which we have a model of; provide it
      rather than an unimplemented-device stub.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210215115138.20465-23-peter.maydell@linaro.org
      41745d20
    • Peter Maydell's avatar
      hw/arm/mps2-tz: Stub out USB controller for mps3-an524 · a9597753
      Peter Maydell authored
      
      The AN524 has a USB controller (an ISP1763); we don't have a model of
      it but we should provide a stub "unimplemented-device" for it.  This
      is slightly complicated because the USB controller shares a PPC port
      with the ethernet controller.
      
      Implement a make_* function which provides creates a container
      MemoryRegion with both the ethernet controller and an
      unimplemented-device stub for the USB controller.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210215115138.20465-22-peter.maydell@linaro.org
      a9597753
  2. Mar 06, 2021
  3. Mar 05, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' into staging · 91e92cad
      Peter Maydell authored
      
      some accumulated s390x fixes
      
      # gpg: Signature made Fri 05 Mar 2021 15:50:00 GMT
      # gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
      # 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
      
      * remotes/cohuck-gitlab/tags/s390x-20210305:
        target/s390x/kvm: Simplify debug code
        vfio-ccw: Do not read region ret_code after write
        css: SCHIB measurement block origin must be aligned
        virtio-ccw: commands on revision-less devices
        s390x/pci: restore missing Query PCI Function CLP data
        hw/s390x: fix build for virtio-9p-ccw
        target/s390x/arch_dump: Fix warning for the name field in the PT_NOTE section
        s390x/cpu_model: disallow unpack for --only-migratable
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      91e92cad
Loading