Skip to content
Snippets Groups Projects
  1. Apr 17, 2018
  2. Apr 16, 2018
  3. Apr 15, 2018
  4. Apr 13, 2018
  5. Apr 11, 2018
  6. Apr 10, 2018
    • Pavel Dovgaluk's avatar
      icount: fix cpu_restore_state_from_tb for non-tb-exit cases · afd46fca
      Pavel Dovgaluk authored
      
      In icount mode, instructions that access io memory spaces in the middle
      of the translation block invoke TB recompilation.  After recompilation,
      such instructions become last in the TB and are allowed to access io
      memory spaces.
      
      When the code includes instruction like i386 'xchg eax, 0xffffd080'
      which accesses APIC, QEMU goes into an infinite loop of the recompilation.
      
      This instruction includes two memory accesses - one read and one write.
      After the first access, APIC calls cpu_report_tpr_access, which restores
      the CPU state to get the current eip.  But cpu_restore_state_from_tb
      resets the cpu->can_do_io flag which makes the second memory access invalid.
      Therefore the second memory access causes a recompilation of the block.
      Then these operations repeat again and again.
      
      This patch moves resetting cpu->can_do_io flag from
      cpu_restore_state_from_tb to cpu_loop_exit* functions.
      
      It also adds a parameter for cpu_restore_state which controls restoring
      icount.  There is no need to restore icount when we only query CPU state
      without breaking the TB.  Restoring it in such cases leads to the
      incorrect flow of the virtual time.
      
      In most cases new parameter is true (icount should be recalculated).
      But there are two cases in i386 and openrisc when the CPU state is only
      queried without the need to break the TB.  This patch fixes both of
      these cases.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      Message-Id: <20180409091320.12504.35329.stgit@pasha-VirtualBox>
      [rth: Make can_do_io setting unconditional; move from cpu_exec;
      make cpu_loop_exit_{noexc,restore} call cpu_loop_exit.]
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      afd46fca
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180410a' into staging · ac4ba87a
      Peter Maydell authored
      
      Migration reversion pull for 2.12
      
      One to revert after we decided it needs some more thinking.
      
      # gpg: Signature made Tue 10 Apr 2018 16:02:17 BST
      # gpg:                using RSA key 0516331EBC5BFDE7
      # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
      # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7
      
      * remotes/dgilbert/tags/pull-migration-20180410a:
        Revert "migration: Don't activate block devices if using -S"
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      ac4ba87a
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/ericb/tags/pull-qapi-2018-04-10' into staging · 26d6a7c8
      Peter Maydell authored
      
      qapi patches for 2018-04-10
      
      - Peter Xu: iotests: fix wait_until_completed()
      - Peter Xu: iothread: workaround glib bug which hangs qmp-test
      - Peter Xu: monitor: bind dispatch bh to iohandler context
      
      # gpg: Signature made Tue 10 Apr 2018 14:15:09 BST
      # gpg:                using RSA key A7A16B4A2527436A
      # gpg: Good signature from "Eric Blake <eblake@redhat.com>"
      # gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>"
      # gpg:                 aka "[jpeg image of size 6874]"
      # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A
      
      * remotes/ericb/tags/pull-qapi-2018-04-10:
        monitor: bind dispatch bh to iohandler context
        iothread: workaround glib bug which hangs qmp-test
        iotests: fix wait_until_completed()
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      26d6a7c8
    • James Cowgill's avatar
      linux-user: implement HWCAP bits on MIPS · 46a1ee4f
      James Cowgill authored
      Add support for the two currently defined HWCAP bits on MIPS - R6 and
      MSA.
      
      Buglink: https://bugs.launchpad.net/qemu/+bug/1754372
      
      
      Signed-off-by: default avatarJames Cowgill <james.cowgill@mips.com>
      Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
      Message-Id: <20180315151348.6451-1-james.cowgill@mips.com>
      Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
      46a1ee4f
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.12-20180410' into staging · 69550301
      Peter Maydell authored
      
      ppc patch queue 2018-04-10
      
      Here's a rather late pull request with a handful of fixes for 2.12.
      These have been blocked for some time, because I wasn't able to
      complete my usual test set due to the SCSI problem fixed in 37c51741
      "scsi-disk: Don't enlarge min_io_size to max_io_size".
      
      Since we're in hard freeze, these are all bugfixes.  Most are also
      regressions, although in one case it's only a "regression" because a
      longstanding bug has been exposed by a new machine type (sam460ex) in
      the testcases.  There are also a couple of sam460ex fixes that aren't
      regressions since the board didn't exist before.  On the flipside
      though, they're low risk because they only touch board specific code
      for a board that doesn't exist in any released version.
      
      # gpg: Signature made Tue 10 Apr 2018 08:13:52 BST
      # gpg:                using RSA key 6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-2.12-20180410:
        roms/u-boot-sam460ex: Change to qemu git mirror and update
        sam460ex: Fix timer frequency and clock multipliers
        tests/boot-serial: Test the sam460ex board
        spapr: Initialize reserved areas list in FDT in H_CAS handler
        target/ppc: Fix backwards migration of msr_mask
        hw/misc/macio: Fix crash when listing device properties of macio device
        target/ppc: Initialize lazy_tlb_flush correctly
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      69550301
    • Laurent Vivier's avatar
      linux-user: add microblaze/microblazeel magic numbers in qemu-binfmt-conf.sh · 947aeab3
      Laurent Vivier authored
      
      Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
      Message-Id: <20180409115212.875-2-laurent@vivier.eu>
      947aeab3
    • Laurent Vivier's avatar
      linux-user: fix microblaze get_sp_from_cpustate() · a31e7605
      Laurent Vivier authored
      
      get_sigframe() uses regs[1] and this is actual SP.
      
      Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
      Message-Id: <20180409115212.875-1-laurent@vivier.eu>
      a31e7605
    • Stefan Hajnoczi's avatar
      qemu-iotests: update 185 output · c1de5696
      Stefan Hajnoczi authored
      
      Commit 4486e89c ("vl: introduce
      vm_shutdown()") added a bdrv_drain_all() call.  As a side-effect of the
      drain operation the block job iterates one more time than before.  The
      185 output no longer matches and the test is failing now.
      
      It may be possible to avoid the superfluous block job iteration, but
      that type of patch is not suitable late in the QEMU 2.12 release cycle.
      
      This patch simply updates the 185 output file.  The new behavior is
      correct, just not optimal, so make the test pass again.
      
      Fixes: 4486e89c ("vl: introduce vm_shutdown()")
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: QingFeng Hao <haoqf@linux.vnet.ibm.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarQingFeng Hao <haoqf@linux.vnet.ibm.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      c1de5696
    • Kevin Wolf's avatar
      commit/stream: Reset delay_ns · 2fe4bba1
      Kevin Wolf authored
      
      Streaming and the commit block job only want to apply throttling when
      they actually copied data instead of skipping it, so they made the
      calculation of delay_ns conditional. However, delay_ns isn't reset when
      skipping some sectors, so instead of not waiting, the old delay is
      applied again.
      
      Properly reset delay_ns where needed.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      2fe4bba1
    • Kevin Wolf's avatar
      qemu-iotests: Remove _supported_fmt dmg · ad53ea42
      Kevin Wolf authored
      
      qemu-iotests doesn't support dmg, and the dmg block driver doesn't
      support image creation. Two test cases declare dmg as supported, but
      that's obviously wrong for both reasons. Remove the declaration.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      ad53ea42
    • Vladimir Sementsov-Ogievskiy's avatar
      iotests: blacklist bochs and cloop for 205 and 208 · e819edd0
      Vladimir Sementsov-Ogievskiy authored
      
      Blacklist these formats, as they don't support image creation, as they
      say:
          > ./qemu-img create -f bochs x 1m
          qemu-img: x: Format driver 'bochs' does not support image creation
      
          > ./qemu-img create -f cloop x 1m
          qemu-img: x: Format driver 'cloop' does not support image creation
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      e819edd0
    • Vladimir Sementsov-Ogievskiy's avatar
      iotests.py: improve verify_image_format helper · f48351d2
      Vladimir Sementsov-Ogievskiy authored
      
      Support "generic" formats like in bash tests with their
         _supported_fmt generic
      The test, supporting "generic" formats will run if IMGFMT_GENERIC =
      true, which is default, except for bochs and cloop. However, you can
      use verify_image_format(['generic', 'bochs']), which will run for all
      except cloop (for this moment).
      
      Also, add an assert (we don't want set both arguments) and remove
      duplication.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      f48351d2
    • Philippe Mathieu-Daudé's avatar
      hw/block/pflash_cfi: fix off-by-one error · 07c13a71
      Philippe Mathieu-Daudé authored
      
      ASAN reported:
      
          hw/block/pflash_cfi02.c:245:33: runtime error: index 82 out of bounds for type 'uint8_t [82]'
      
      Since the 'cfi_len' member is not used, remove it to keep the code safer.
      
      Cc: qemu-stable@nongnu.org
      Reported-by: AddressSanitizer
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      07c13a71
    • Vladimir Sementsov-Ogievskiy's avatar
    • Dr. David Alan Gilbert's avatar
      Revert "migration: Don't activate block devices if using -S" · a18a73d7
      Dr. David Alan Gilbert authored
      
      This reverts commit 0746a926.
      Discussion with kwolf suggests this is actually an API change that
      we need to gate on a capability.  Push to 2.13.
      
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      a18a73d7
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180410' into staging · f41ee66d
      Peter Maydell authored
      
      target-arm queue:
       * fpu: Fix rounding mode for floatN_to_uintM_round_to_zero
       * tcg: Fix guest state corruption when running 64-bit Arm
         guests on a 32-bit host (especially when using icount)
       * linux-user/signal.c: Ensure AArch64 signal frame isn't too small
       * cpus.c: ensure running CPU recalculates icount deadlines on timer expiry
       * target/arm: Report unsupported MPU region sizes more clearly
       * hw/arm/fsl-imx: Fix introspection problem with fsl-imx6 and fsl-imx7
       * hw/arm/allwinner-a10: Do not use nd_table in instance_init function
       * hw/sd/bcm2835_sdhost: Don't raise spurious interrupts
       * hw/sd/bcm2835_sdhost: Add tracepoints
       * target-arm: Check undefined opcodes for SWP in A32 decoder
       * hw/arm/integratorcp: Don't do things that could be fatal in the instance_init
       * hw/arm: Allow manually specified /psci node
      
      # gpg: Signature made Tue 10 Apr 2018 13:16:12 BST
      # gpg:                using RSA key 3C2525ED14360CDE
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20180410:
        fpu: Fix rounding mode for floatN_to_uintM_round_to_zero
        tcg: Introduce tcg_set_insn_start_param
        linux-user/signal.c: Ensure AArch64 signal frame isn't too small
        cpus.c: ensure running CPU recalculates icount deadlines on timer expiry
        target/arm: Report unsupported MPU region sizes more clearly
        hw/arm/fsl-imx: Fix introspection problem with fsl-imx6 and fsl-imx7
        hw/arm/allwinner-a10: Do not use nd_table in instance_init function
        hw/sd/bcm2835_sdhost: Don't raise spurious interrupts
        hw/sd/bcm2835_sdhost: Add tracepoints
        target-arm: Check undefined opcodes for SWP in A32 decoder
        hw/arm/integratorcp: Don't do things that could be fatal in the instance_init
        hw/arm: Allow manually specified /psci node
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      f41ee66d
Loading