1. 29 5月, 2015 8 次提交
  2. 18 5月, 2015 8 次提交
  3. 12 5月, 2015 3 次提交
  4. 28 4月, 2015 3 次提交
  5. 26 4月, 2015 2 次提交
    • S
      target-arm: rename c1_coproc to cpacr_el1 · 7ebd5f2e
      Sergey Fedorov 提交于
      Rename the field holding CPACR_EL1 system register state in AArch64
      naming style.
      Signed-off-by: NSergey Fedorov <serge.fdrv@gmail.com>
      [PMM: also fixed a couple of missed occurrences in cpu.c]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7ebd5f2e
    • P
      Switch non-CPU callers from ld/st*_phys to address_space_ld/st* · 42874d3a
      Peter Maydell 提交于
      Switch all the uses of ld/st*_phys to address_space_ld/st*,
      except for those cases where the address space is the CPU's
      (ie cs->as). This was done with the following script which
      generates a Coccinelle patch.
      
      A few over-80-columns lines in the result were rewrapped by
      hand where Coccinelle failed to do the wrapping automatically,
      as well as one location where it didn't put a line-continuation
      '\' when wrapping lines on a change made to a match inside
      a macro definition.
      
      ===begin===
      #!/bin/sh -e
      # Usage:
      # ./ldst-phys.spatch.sh > ldst-phys.spatch
      # spatch -sp_file ldst-phys.spatch -dir . | sed -e '/^+/s/\t/        /g' > out.patch
      # patch -p1 < out.patch
      
      for FN in ub uw_le uw_be l_le l_be q_le q_be uw l q; do
      cat <<EOF
      @ cpu_matches_ld_${FN} @
      expression E1,E2;
      identifier as;
      @@
      
      ld${FN}_phys(E1->as,E2)
      
      @ other_matches_ld_${FN} depends on !cpu_matches_ld_${FN} @
      expression E1,E2;
      @@
      
      -ld${FN}_phys(E1,E2)
      +address_space_ld${FN}(E1,E2, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      
      for FN in b w_le w_be l_le l_be q_le q_be w l q; do
      cat <<EOF
      @ cpu_matches_st_${FN} @
      expression E1,E2,E3;
      identifier as;
      @@
      
      st${FN}_phys(E1->as,E2,E3)
      
      @ other_matches_st_${FN} depends on !cpu_matches_st_${FN} @
      expression E1,E2,E3;
      @@
      
      -st${FN}_phys(E1,E2,E3)
      +address_space_st${FN}(E1,E2,E3, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      ===endit===
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      42874d3a
  6. 09 4月, 2015 1 次提交
  7. 02 4月, 2015 9 次提交
    • M
      sysbus: Make devices picking up backends unavailable with -device · 9f9bdf43
      Markus Armbruster 提交于
      Device models aren't supposed to go on fishing expeditions for
      backends.  They should expose suitable properties for the user to set.
      For onboard devices, board code sets them.
      
      A number of sysbus devices pick up block backends in their init() /
      instance_init() methods with drive_get_next() instead: sl-nand,
      milkymist-memcard, pl181, generic-sdhci.
      
      Likewise, a number of sysbus devices pick up character backends in
      their init() / realize() methods with qemu_char_get_next_serial():
      cadence_uart, digic-uart, etraxfs,serial, lm32-juart, lm32-uart,
      milkymist-uart, pl011, stm32f2xx-usart, xlnx.xps-uartlite.
      
      All these mistakes are already marked FIXME.  See the commit that
      added these FIXMEs for a more detailed explanation of what's wrong.
      
      Fortunately, only machines ppce500 and pseries-* support -device with
      sysbus devices, and none of the devices above is supported with these
      machines.
      
      Set cannot_instantiate_with_device_add_yet to preserve our luck.
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
      Cc: Antony Pavlov <antonynpavlov@gmail.com>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Michael Walle <michael@walle.cc>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      9f9bdf43
    • M
      hw: Mark device misusing nd_table[] FIXME · 19f33f16
      Markus Armbruster 提交于
      NICs defined with -net nic are for board initialization to wire up.
      Board code examines nd_table[] to find them, and creates devices with
      their qdev NIC properties set accordingly.
      
      Except "allwinner-a10" goes on a fishing expedition for NIC
      configuration instead of exposing the usual NIC properties for board
      code to set: it uses nd_table[0] in its instance_init() method.
      
      Picking up the first -net nic option's configuration that way works
      when the device is created by board code.  But it's inappropriate for
      -device and device_add.  Not only is it inconsistent with how the
      other block device models work (they get their configuration from
      properties "mac", "vlan", "netdev"), it breaks when nd_table[0] has
      been picked up by the board or a previous -device / device_add
      already.
      
      Example:
      
          $ qemu-system-arm -S -M cubieboard -device allwinner-a10
          qemu-system-arm: -device allwinner-a10: Property 'allwinner-emac.netdev' can't take value 'hub0port0', it's in use
          Aborted (core dumped)
      
      It also breaks in other entertaining ways:
      
          $ qemu-system-arm -M highbank -device allwinner-a10
          qemu-system-arm: -device allwinner-a10: Unsupported NIC model: xgmac
          $ qemu-system-arm -M highbank -net nic,model=allwinner-emac -device allwinner-a10
          qemu-system-arm: Unsupported NIC model: allwinner-emac
      
      Mark the mistake with a FIXME comment.
      
      Cc: Li Guang <lig.fnst@cn.fujitsu.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      19f33f16
    • M
      hw: Mark devices picking up char backends actively FIXME · d71b22bb
      Markus Armbruster 提交于
      Character devices defined with -serial and -parallel are for board
      initialization to wire up.  Board code examines serial_hds[] and
      parallel_hds[] to find them, and creates devices with their qdev
      chardev properties set accordingly.
      
      Except a few devices go on a fishing expedition for a suitable backend
      instead of exposing a chardev property for board code to set: they use
      serial_hds[] (often via qemu_char_get_next_serial()) or parallel_hds[]
      in their realize() or init() method to connect to a backend.
      
      Picking up backends that way works when the devices are created by
      board code.  But it's inappropriate for -device or device_add.  Not
      only is it inconsistent with how the other characrer device models
      work (they connect to a backend explicitly identified by a "chardev"
      property), it breaks when the backend has been picked up by the board
      or a previous -device / device_add already.
      
      Example:
      
          $ qemu-system-ppc64 -M bamboo -S -device i82378 -device pc87312 -device pc87312
          qemu-system-ppc64: -device pc87312: Property 'isa-parallel.chardev' can't take value 'parallel0', it's in use
      
      Mark them with suitable FIXME comments.
      
      Cc: Li Guang <lig.fnst@cn.fujitsu.com>
      Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
      Cc: Antony Pavlov <antonynpavlov@gmail.com>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
      Cc: "Andreas Färber" <andreas.faerber@web.de>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      d71b22bb
    • M
      hw: Mark devices picking up block backends actively FIXME · af9e40aa
      Markus Armbruster 提交于
      Drives defined with if!=none are for board initialization to wire up.
      Board code calls drive_get() or similar to find them, and creates
      devices with their qdev drive properties set accordingly.
      
      Except a few devices go on a fishing expedition for a suitable backend
      instead of exposing a drive property for board code to set: they call
      driver_get() or drive_get_next() in their realize() or init() method
      to implicitly connect to the "next" backend with a certain interface
      type.
      
      Picking up backends that way works when the devices are created by
      board code.  But it's inappropriate for -device or device_add.  Not
      only is this inconsistent with how the other block device models work
      (they connect to a backend explicitly identified by a "drive"
      property), it breaks when the "next" backend has been picked up by the
      board already.
      
      Example:
      
          $ qemu-system-arm -S -M connex -pflash flash.img -device ssi-sd
          Aborted (core dumped)
      
      Mark them with suitable FIXME comments.
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
      Cc: "Andreas Färber" <andreas.faerber@web.de>
      Cc: Michael Walle <michael@walle.cc>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      af9e40aa
    • P
      hw/arm/vexpress: Don't double-free flash filename · 11f10cf8
      Peter Maydell 提交于
      Commits 6e05a12f and db25a158 both attempt to fix the
      same "failed to free memory containing flash filename" bug,
      with the effect that when they were both applied we ended
      up freeing the memory twice. Delete the spurious extra free.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      Message-id: 1427968334-14527-1-git-send-email-peter.maydell@linaro.org
      11f10cf8
    • S
      hw/arm/virt: Fix corruption due to double free · c408d27a
      Shannon Zhao 提交于
      As 4de9a883(hw/arm/virt: Fix memory leak reported by Coverity)
      and 6e05a12f(arm: fix memory leak) both handle the memory leak
      reported by Coverity, this cause qemu corruption due to
      double free.
      Signed-off-by: NShannon Zhao <zhaoshenglong@huawei.com>
      Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      Message-id: 1427944026-8968-1-git-send-email-zhaoshenglong@huawei.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c408d27a
    • S
      hw/arm/virt: Fix memory leak reported by Coverity · 4de9a883
      Stefan Weil 提交于
      As the conditional statement had to be split anyway, we can also
      add a better error report message.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Message-id: 1426877982-3603-1-git-send-email-sw@weilnetz.de
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4de9a883
    • S
      hw/arm/vexpress: Fix memory leak reported by Coverity · db25a158
      Stefan Weil 提交于
      As the conditional statement had to be split anyway, we can also
      add a better error report message.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Message-id: 1426877963-3556-1-git-send-email-sw@weilnetz.de
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      db25a158
    • S
      hw/arm/highbank: Fix resource leak and wrong image loading · 60ff4e63
      Stefan Weil 提交于
      Coverity reports a resource leak for sysboot_filename which is allocated
      by qemu_find_file.
      
      In addition, that name is used to get the size of the image, but a
      different image name was used to load it.
      
      In addition, instead of passing the maximum allowed image size the actual
      image size was passed to load_image_targphys.
      
      Fix all three issues.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Message-id: 1426326781-2488-1-git-send-email-sw@weilnetz.de
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      60ff4e63
  8. 19 3月, 2015 4 次提交
    • Z
      error: Replace error_report() & error_free() with error_report_err() · 19867549
      zhanghailiang 提交于
      This is a continuation of the work started in commit 565f65d2:
      "error: Use error_report_err() where appropriate"
      Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      19867549
    • G
      arm: fix memory leak · 6e05a12f
      Gonglei 提交于
      Cc: Michael Tokarev <mjt@tls.msk.ru>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      6e05a12f
    • S
      arm/nseries: Fix warnings from Sparse · 30d76f13
      Stefan Weil 提交于
      Sparse report:
      
      arm/nseries.c:1406:5: warning: returning void-valued expression
      arm/nseries.c:1411:5: warning: returning void-valued expression
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      30d76f13
    • S
      omap: Fix warnings from Sparse · 77a8257e
      Stefan Weil 提交于
      Sparse report:
      
      arm/omap1.c:1015:9: warning: returning void-valued expression
      arm/omap1.c:1084:9: warning: returning void-valued expression
      arm/omap1.c:1178:9: warning: returning void-valued expression
      arm/omap1.c:1287:9: warning: returning void-valued expression
      arm/omap1.c:1382:9: warning: returning void-valued expression
      arm/omap1.c:1650:9: warning: returning void-valued expression
      arm/omap1.c:1778:9: warning: returning void-valued expression
      arm/omap1.c:1985:9: warning: returning void-valued expression
      arm/omap1.c:210:9: warning: returning void-valued expression
      arm/omap1.c:2213:9: warning: returning void-valued expression
      arm/omap1.c:2352:9: warning: returning void-valued expression
      arm/omap1.c:2447:9: warning: returning void-valued expression
      arm/omap1.c:2640:9: warning: returning void-valued expression
      arm/omap1.c:317:9: warning: returning void-valued expression
      arm/omap1.c:3413:13: warning: returning void-valued expression
      arm/omap1.c:3414:13: warning: returning void-valued expression
      arm/omap1.c:3415:14: warning: returning void-valued expression
      arm/omap1.c:3589:9: warning: returning void-valued expression
      arm/omap1.c:443:9: warning: returning void-valued expression
      arm/omap1.c:588:9: warning: returning void-valued expression
      arm/omap1.c:860:9: warning: returning void-valued expression
      arm/omap2.c:1362:9: warning: returning void-valued expression
      arm/omap2.c:450:9: warning: returning void-valued expression
      arm/omap2.c:695:9: warning: returning void-valued expression
      arm/omap2.c:760:9: warning: returning void-valued expression
      hw/char/omap_uart.c:115:9: warning: returning void-valued expression
      hw/display/omap_dss.c:1019:9: warning: returning void-valued expression
      hw/display/omap_dss.c:215:9: warning: returning void-valued expression
      hw/display/omap_dss.c:380:9: warning: returning void-valued expression
      hw/display/omap_dss.c:739:9: warning: returning void-valued expression
      hw/display/omap_dss.c:931:9: warning: returning void-valued expression
      hw/dma/omap_dma.c:139:5: warning: returning void-valued expression
      hw/dma/omap_dma.c:1505:9: warning: returning void-valued expression
      hw/dma/omap_dma.c:1860:9: warning: returning void-valued expression
      hw/gpio/omap_gpio.c:116:9: warning: returning void-valued expression
      hw/misc/omap_gpmc.c:627:9: warning: returning void-valued expression
      hw/misc/omap_l4.c:85:9: warning: returning void-valued expression
      hw/misc/omap_sdrc.c:95:9: warning: returning void-valued expression
      hw/misc/omap_tap.c:98:9: warning: returning void-valued expression
      hw/sd/omap_mmc.c:409:9: warning: returning void-valued expression
      hw/ssi/omap_spi.c:229:9: warning: returning void-valued expression
      hw/timer/omap_gptimer.c:447:9: warning: returning void-valued expression
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      77a8257e
  9. 11 3月, 2015 2 次提交