1. 24 2月, 2017 3 次提交
    • A
      .shippable.yml: new CI provider · d92d886a
      Alex Bennée 提交于
      Ostensibly Shippable offers a similar set of services as Travis.
      However they are focused on Docker container based work-flows so we
      can use our existing containers to run a few extra builds - in this
      case a bunch of cross-compiled targets on a Debian multiarch system.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-Id: <20170220105139.21581-4-alex.bennee@linaro.org>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      d92d886a
    • A
      new: debian docker targets for cross-compiling · 24e0131f
      Alex Bennée 提交于
      This provides a basic Debian install with access to the emdebian cross
      compilers. The debian-armhf-cross and debian-arm64-cross targets build
      on the basic Debian image to allow cross compiling to those targets.
      
      A new environment variable (QEMU_CONFIGURE_OPTS) is set as part of the
      docker container and passed to the build to specify the
      --cross-prefix. The user still calls the build in the usual way, for
      example:
      
        make docker-test-build@debian-arm64-cross \
          TARGET_LIST="aarch64-softmmu,aarch64-linux-user"
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20170220105139.21581-3-alex.bennee@linaro.org>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      24e0131f
    • A
      tests/docker: add basic user mapping support · 414a8ce5
      Alex Bennée 提交于
      Currently all docker builds are done by exporting a tarball to the
      docker container and running the build as the containers root user.
      Other use cases are possible however and it is possible to map a part
      of users file-system to the container. This is useful for example for
      doing cross-builds of arbitrary source trees. For this to work
      smoothly the container needs to have a user created that maps cleanly
      to the host system.
      
      This adds a -u option to the docker script so that:
      
        DEB_ARCH=armhf DEB_TYPE=stable ./tests/docker/docker.py build \
          -u --include-executable=arm-linux-user/qemu-arm \
          debian:armhf ./tests/docker/dockerfiles/debian-bootstrap.docker
      
      Will build a container that can then be run like:
      
        docker run --rm -it -v /home/alex/lsrc/qemu/risu.git/:/src \
          --user=alex:alex -w /src/ debian:armhf \
          sh -c "make clean && ./configure -s && make"
      
      All docker containers built will add the current user unless
      explicitly disabled by specifying NOUSER when invoking the Makefile:
      
        make docker-image-debian-armhf-cross NOUSER=1
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20170220105139.21581-2-alex.bennee@linaro.org>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      414a8ce5
  2. 23 2月, 2017 1 次提交
    • P
      Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170222' into staging · 10f25e48
      Peter Maydell 提交于
      MIPS patches 2017-02-22
      
      Changes:
      * Add MIPS Boston board support
      
      # gpg: Signature made Wed 22 Feb 2017 00:08:00 GMT
      # gpg:                using RSA key 0x2238EB86D5F797C2
      # gpg: Good signature from "Yongbok Kim <yongbok.kim@imgtec.com>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 8600 4CF5 3415 A5D9 4CFA  2B5C 2238 EB86 D5F7 97C2
      
      * remotes/yongbok/tags/mips-20170222:
        hw/mips: MIPS Boston board support
        hw: xilinx-pcie: Add support for Xilinx AXI PCIe Controller
        loader: Support Flattened Image Trees (FIT images)
        dtc: Update requirement to v1.4.2
        target-mips: Provide function to test if a CPU supports an ISA
        hw/mips_gic: Update pin state on mask changes
        hw/mips_gictimer: provide API for retrieving frequency
        hw/mips_cmgcr: allow GCR base to be moved
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      10f25e48
  3. 22 2月, 2017 12 次提交
  4. 21 2月, 2017 24 次提交
    • P
      Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging · 796b288f
      Peter Maydell 提交于
      # gpg: Signature made Tue 21 Feb 2017 15:40:05 GMT
      # gpg:                using RSA key 0xBDBE7B27C0DE3057
      # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
      # gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
      # gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
      # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057
      
      * remotes/cody/tags/block-pull-request:
        qemu-options: Fix broken sheepdog URL
        mirror: do not increase offset during initial zero_or_discard phase
        QAPI: Fix blockdev-add example documentation
        iscsi: Add blockdev-add support
        iscsi: Add timeout option
        iscsi: Add header-digest option
        iscsi: Add initiator-name option
        iscsi: Handle -iscsi user/password in bdrv_parse_filename()
        iscsi: Split URL into individual options
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      796b288f
    • T
      qemu-options: Fix broken sheepdog URL · 6135c5e1
      Thomas Huth 提交于
      The sheepdog URL is broken twice: First it uses a duplicated
      http:// prefix, second the website seems to have moved to
      https://sheepdog.github.io/sheepdog/ instead.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      6135c5e1
    • A
      mirror: do not increase offset during initial zero_or_discard phase · 90ab48eb
      Anton Nefedov 提交于
      If explicit zeroing out before mirroring is required for the target image,
      it moves the block job offset counter to EOF, then offset and len counters
      count the image size twice. There is no harm but stats are confusing,
      specifically the progress of the operation is always reported as 99% by
      management tools.
      
      The patch skips offset increase for the first "technical" pass over the
      image. This should not cause any further harm.
      Signed-off-by: NAnton Nefedov <anton.nefedov@virtuozzo.com>
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1486045515-8009-1-git-send-email-den@openvz.org
      CC: Jeff Cody <jcody@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Max Reitz <mreitz@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      90ab48eb
    • J
      QAPI: Fix blockdev-add example documentation · b1660997
      Jeff Cody 提交于
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      b1660997
    • K
      iscsi: Add blockdev-add support · 31eb1202
      Kevin Wolf 提交于
      This adds blockdev-add support for iscsi devices.
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      31eb1202
    • K
      iscsi: Add timeout option · 1d560104
      Kevin Wolf 提交于
      This was previously only available with -iscsi. Again, after this patch,
      the -iscsi option only takes effect if an URL is given. New users are
      supposed to use the new driver-specific option.
      
      All -iscsi options have a corresponding driver-specific option for the
      iscsi block driver now.
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      1d560104
    • K
      iscsi: Add header-digest option · 81aa2a0f
      Kevin Wolf 提交于
      This was previously only available with -iscsi. Again, after this patch,
      the -iscsi option only takes effect if an URL is given. New users are
      supposed to use the new driver-specific option.
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      81aa2a0f
    • K
      iscsi: Add initiator-name option · d4e79929
      Kevin Wolf 提交于
      This was previously only available with -iscsi. Again, after this patch,
      the -iscsi option only takes effect if an URL is given. New users are
      supposed to use the new driver-specific option.
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      d4e79929
    • K
      iscsi: Handle -iscsi user/password in bdrv_parse_filename() · 43171420
      Kevin Wolf 提交于
      This splits the logic in the old parse_chap() function into a part that
      parses the -iscsi options into the new driver-specific options, and
      another part that actually applies those options (called apply_chap()
      now).
      
      Note that this means that username and password specified with -iscsi
      only take effect when a URL is provided. This is intentional, -iscsi is
      a legacy interface only supported for compatibility, new users should
      use the proper driver-specific options.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      43171420
    • K
      iscsi: Split URL into individual options · d5895fcb
      Kevin Wolf 提交于
      This introduces a .bdrv_parse_filename handler for iscsi which parses an
      URL if given and translates it to individual options.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      d5895fcb
    • P
      Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2017-02-21' into staging · a1cf5fac
      Peter Maydell 提交于
      Changes to -drive without if= and with if=scsi
      
      # gpg: Signature made Tue 21 Feb 2017 12:22:35 GMT
      # gpg:                using RSA key 0x3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-block-2017-02-21:
        hw/i386: Deprecate -drive if=scsi with PC machine types
        hw: Deprecate -drive if=scsi with non-onboard HBAs
        hw/scsi: Concentrate -drive if=scsi auto-create in one place
        hw: Drop superfluous special checks for orphaned -drive
        blockdev: Make orphaned -drive fatal
        blockdev: Improve message for orphaned -drive
        hw/arm/highbank: Default -drive to if=ide instead of if=scsi
        hw: Default -drive to if=none instead of scsi when scsi cannot work
        hw: Default -drive to if=none instead of ide when ide cannot work
        hw/arm/cubieboard hw/arm/xlnx-ep108: Fix units_per_default_bus
        hw: Default -drive to if=ide explicitly where it works
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a1cf5fac
    • M
      hw/i386: Deprecate -drive if=scsi with PC machine types · f778a82f
      Markus Armbruster 提交于
      The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically
      create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi.
      For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU
      create 25 of them.
      
      lsi53c895a is thoroughly obsolete (PCI Ultra2 SCSI, ca. 2000), and
      currently has no maintainer in QEMU.  megasas is a better choice,
      except with old OSes that lack drivers.  virtio-scsi is a much better
      choice when you have a driver, but only (newish) Linux comes with one
      in the box.  There is no good default that works for all guests.
      
      Encourage users to pick a non-obsolete SCSI HBA that works for them by
      deprecating -drive if=scsi.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-4-git-send-email-armbru@redhat.com>
      Acked-By: NPaolo Bonzini <pbonzini@redhat.com>
      f778a82f
    • M
      hw: Deprecate -drive if=scsi with non-onboard HBAs · a64aa578
      Markus Armbruster 提交于
      Block backends defined with "-drive if=T" with T other than "none" are
      meant to be picked up by machine initialization code: a suitable
      frontend gets created and wired up automatically.
      
      Drives defined with if=scsi are also picked up by SCSI HBAs added with
      -device, unlike other interface types.  Deprecate this usage, as follows.
      
      Create the frontends for onboard HBAs in machine initialization code,
      exactly like we do for if=ide and other interface types.  Change
      scsi_legacy_handle_cmdline() to create a frontend only when it's still
      missing, and warn that this usage is deprecated.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-3-git-send-email-armbru@redhat.com>
      a64aa578
    • M
      hw/scsi: Concentrate -drive if=scsi auto-create in one place · fb8b660e
      Markus Armbruster 提交于
      The logic to create frontends for -drive if=scsi is in SCSI HBAs.  For
      all other interface types, it's in machine initialization code.
      
      A few machine types create the SCSI HBAs necessary for that.  That's
      also not done for other interface types.
      
      I'm going to deprecate these SCSI eccentricities.  In preparation for
      that, create the frontends in main() instead of the SCSI HBAs, by
      calling new function scsi_legacy_handle_cmdline() there.
      
      Note that not all SCSI HBAs create frontends.  Take care not to change
      that.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-2-git-send-email-armbru@redhat.com>
      Acked-By: NPaolo Bonzini <pbonzini@redhat.com>
      fb8b660e
    • M
      hw: Drop superfluous special checks for orphaned -drive · 8f2d75e8
      Markus Armbruster 提交于
      We've traditionally rejected orphans here and there, but not
      systematically.  For instance, the sun4m machines have an onboard SCSI
      HBA (bus=0), and have always rejected bus>0.  Other machines with an
      onboard SCSI HBA don't.
      
      Commit a66c9dc7 made all orphans trigger a warning, and the previous
      commit turned this into an error.  The checks "here and there" are now
      redundant.  Drop them.
      
      Note that the one in mips_jazz.c was wrong: it rejected bus > MAX_FD,
      but MAX_FD is the number of floppy drives per bus.
      
      Error messages change from
      
          $ qemu-system-x86_64 -drive if=ide,bus=2
          qemu-system-x86_64: Too many IDE buses defined (3 > 2)
          $ qemu-system-mips64 -M magnum,accel=qtest -drive if=floppy,bus=2,id=fd1
          qemu: too many floppy drives
          $ qemu-system-sparc -M LX -drive if=scsi,bus=1
          qemu: too many SCSI bus
      
      to
      
          $ qemu-system-x86_64 -drive if=ide,bus=2
          qemu-system-x86_64: -drive if=ide,bus=2: machine type does not support if=ide,bus=2,unit=0
          $ qemu-system-mips64 -M magnum,accel=qtest -drive if=floppy,bus=2,id=fd1
          qemu-system-mips64: -drive if=floppy,bus=2,id=fd1: machine type does not support if=floppy,bus=2,unit=0
          $ qemu-system-sparc -M LX -drive if=scsi,bus=1
          qemu-system-sparc: -drive if=scsi,bus=1: machine type does not support if=scsi,bus=1,unit=0
      
      Cc: John Snow <jsnow@redhat.com>
      Cc: "Hervé Poussineau" <hpoussin@reactos.org>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487153147-11530-9-git-send-email-armbru@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      8f2d75e8
    • M
      blockdev: Make orphaned -drive fatal · 720b8dc0
      Markus Armbruster 提交于
      Block backends defined with "-drive if=T" with T other than "none" are
      meant to be picked up by machine initialization code: a suitable
      frontend gets created and wired up automatically.
      
      If machine initialization code doesn't comply, the block backend
      remains unused.  This triggers a warning since commit a66c9dc7, v2.2.0.
      Drives created by default are exempted; use -nodefaults to get rid of
      them.
      
      Turn this warning into an error.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487153147-11530-8-git-send-email-armbru@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      720b8dc0
    • M
      blockdev: Improve message for orphaned -drive · 664cc623
      Markus Armbruster 提交于
      We warn when a -drive isn't supported by the machine type (commit
      a66c9dc7):
      
          $ qemu-system-x86_64 -S -display none -drive if=mtd
          Warning: Orphaned drive without device: id=mtd0,file=,if=mtd,bus=0,unit=0
      
      Improve this to point to the offending bit of configuration:
      
          qemu-system-x86_64: -drive if=mtd: warning: machine type does not support if=mtd,bus=0,unit=0
      
      Especially nice when it's hidden behind -readconfig foo.cfg:
      
          qemu-system-x86_64:foo.cfg:140: warning: machine type does not support if=mtd,bus=0,unit=0
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487153147-11530-7-git-send-email-armbru@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      664cc623
    • M
      hw/arm/highbank: Default -drive to if=ide instead of if=scsi · 2a7ae4ee
      Markus Armbruster 提交于
      These machines have no onboard SCSI HBA, and no way to plug one.
      -drive if=scsi therefore cannot work.  They do have an onboard IDE
      controller (sysbus-ahci), but fail to honor if=ide.
      
      Change their default to if=ide, and add a TODO comment on what needs
      to be done to actually honor -drive if=ide.
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-arm@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1487153147-11530-6-git-send-email-armbru@redhat.com>
      2a7ae4ee
    • M
      hw: Default -drive to if=none instead of scsi when scsi cannot work · 7e465513
      Markus Armbruster 提交于
      Block backends defined with -drive if=scsi are meant to be picked up
      by machine initialization code: a suitable frontend gets created and
      wired up automatically.
      
      if=scsi drives not picked up that way can still be used with -device
      as if they had if=none, but that's unclean and best avoided.  Unused
      ones produce an "Orphaned drive without device" warning.
      
      A few machine types default to if=scsi, even though they don't
      actually have a SCSI HBA.  This makes no sense.  Change their default
      to if=none.  Affected machines:
      
      * aarch64/arm: realview-pbx-a9 vexpress-a9 vexpress-a15 xilinx-zynq-a9
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: qemu-arm@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-Id: <1487153147-11530-5-git-send-email-armbru@redhat.com>
      7e465513
    • M
      hw: Default -drive to if=none instead of ide when ide cannot work · a27fa28f
      Markus Armbruster 提交于
      Block backends defined with -drive if=ide are meant to be picked up by
      machine initialization code: a suitable frontend gets created and
      wired up automatically.
      
      if=ide drives not picked up that way can still be used with -device as
      if they had if=none, but that's unclean and best avoided.  Unused ones
      produce an "Orphaned drive without device" warning.
      
      -drive parameter "if" is optional, and the default depends on the
      machine type.  If a machine type doesn't specify a default, the
      default is "ide".
      
      Many machine types implicitly default to if=ide that way, even though
      they don't actually have an IDE controller.  This makes no sense.
      
      Change the implicit default to if=none.  Affected machines:
      
      * all targets: none
      * aarch64/arm: akita ast2500 canon cheetah collie connex imx25
        integratorcp kzm lm3s6965evb lm3s811evb mainstone musicpal n800 n810
        netduino2 nuri palmetto realview romulus sabrelite smdkc210 sx1 sx1
        verdex z2
      * cris: axis-dev88
      * i386/x86_64: xenpv
      * lm32: lm32-evr lm32-uclinux milkymist
      * m68k: an5206 dummy mcf5208evb
      * microblaze/microblazeel: petalogix-ml605 petalogix-s3adsp1800
      * mips/mips64/mips64el/mipsel: mipssim
      * moxie: moxiesim
      * or32: or32-sim
      * ppc/ppc64/ppcemb: bamboo ref405ep taihu virtex-ml507
      * ppc/ppc64: mpc8544ds ppce500
      * sh4/sh4eb: shix
      * sparc: leon3_generic
      * sparc64: niagara
      * tricore: tricore_testboard
      * unicore32: puv3
      * xtensa/xtensaeb: kc705 lx200 lx60 ml605 sim
      
      None of these machines have an IDE controller, let alone code to
      honor if=ide.
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-arm@nongnu.org
      Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Anthony Perard <anthony.perard@citrix.com>
      Cc: xen-devel@lists.xensource.com
      Cc: Michael Walle <michael@walle.cc>
      Cc: Laurent Vivier <laurent@vivier.eu>
      Cc: Anthony Green <green@moxielogic.com>
      Cc: Jia Liu <proljc@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: qemu-ppc@nongnu.org
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Fabien Chouteau <chouteau@adacore.com>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Cc: Artyom Tarasenko <atar4qemu@gmail.com>
      Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Acked-By: NArtyom Tarasenko <atar4qemu@gmail.com>
      Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1487153147-11530-4-git-send-email-armbru@redhat.com>
      a27fa28f
    • M
      hw/arm/cubieboard hw/arm/xlnx-ep108: Fix units_per_default_bus · e0319b03
      Markus Armbruster 提交于
      Machine types cubieboard, xlnx-ep108, xlnx-zcu102 have an onboard AHCI
      controller, but neglect to set their MachineClass member
      units_per_default_bus = 1.  This permits -drive if=ide,unit=1, which
      makes no sense for AHCI.  It also screws up index=N for odd N, because
      it gets desugared to unit=1,bus=N/2
      
      Doesn't really matter, because these machine types fail to honor
      -drive if=ide.  Add the missing units_per_default_bus = 1 anyway,
      along with a TODO comment on what needs to be done for -drive if=ide.
      
      Also set block_default_type = IF_IDE explicitly.  It's currently the
      default, but the next commit will change it to something more
      sensible, and we want to keep the IF_IDE default for these three
      machines.  See also the previous commit.
      
      Cc: Beniamino Galvani <b.galvani@gmail.com>
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-arm@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Acked-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-Id: <1487153147-11530-3-git-send-email-armbru@redhat.com>
      e0319b03
    • M
      hw: Default -drive to if=ide explicitly where it works · 2059839b
      Markus Armbruster 提交于
      Block backends defined with -drive if=ide are meant to be picked up by
      machine initialization code: a suitable frontend gets created and
      wired up automatically.
      
      if=ide drives not picked up that way can still be used with -device as
      if they had if=none, but that's unclean and best avoided.  Unused ones
      produce an "Orphaned drive without device" warning.
      
      -drive parameter "if" is optional, and the default depends on the
      machine type.  If a machine type doesn't specify a default, the
      default is "ide".
      
      Many machine types default to if=ide, even though they don't actually
      have an IDE controller.  A future patch will change these defaults to
      something more sensible.  To prepare for it, this patch makes default
      "ide" explicit for the machines that actually pick up if=ide drives:
      
      * alpha: clipper
      * arm/aarch64: spitz borzoi terrier tosa
      * i386/x86_64: generic-pc-machine (with concrete subtypes pc-q35-*
        pc-i440fx-* pc-* isapc xenfv)
      * mips64el: fulong2e
      * mips/mipsel/mips64el: malta mips
      * ppc/ppc64: mac99 g3beige prep
      * sh4/sh4eb: r2d
      * sparc64: sun4u sun4v
      
      Note that ppc64 machine powernv already sets an "ide" default
      explicitly.  Its IDE controller isn't implemented, yet.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1487153147-11530-2-git-send-email-armbru@redhat.com>
      2059839b
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · a0775e28
      Peter Maydell 提交于
      Pull request
      
      v2:
       * Rebased to resolve scsi conflicts
      
      # gpg: Signature made Tue 21 Feb 2017 11:56:24 GMT
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request: (24 commits)
        coroutine-lock: make CoRwlock thread-safe and fair
        coroutine-lock: add mutex argument to CoQueue APIs
        coroutine-lock: place CoMutex before CoQueue in header
        test-aio-multithread: add performance comparison with thread-based mutexes
        coroutine-lock: add limited spinning to CoMutex
        coroutine-lock: make CoMutex thread-safe
        block: document fields protected by AioContext lock
        async: remove unnecessary inc/dec pairs
        aio-posix: partially inline aio_dispatch into aio_poll
        block: explicitly acquire aiocontext in aio callbacks that need it
        block: explicitly acquire aiocontext in bottom halves that need it
        block: explicitly acquire aiocontext in callbacks that need it
        block: explicitly acquire aiocontext in timers that need it
        aio: push aio_context_acquire/release down to dispatching
        qed: introduce qed_aio_start_io and qed_aio_next_io_cb
        blkdebug: reschedule coroutine on the AioContext it is running on
        coroutine-lock: reschedule coroutine on the AioContext it was running on
        nbd: convert to use qio_channel_yield
        io: make qio_channel_yield aware of AioContexts
        io: add methods to set I/O handlers on AioContext
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a0775e28
    • P
      coroutine-lock: make CoRwlock thread-safe and fair · a7b91d35
      Paolo Bonzini 提交于
      This adds a CoMutex around the existing CoQueue.  Because the write-side
      can just take CoMutex, the old "writer" field is not necessary anymore.
      Instead of removing it altogether, count the number of pending writers
      during a read-side critical section and forbid further readers from
      entering.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-id: 20170213181244.16297-7-pbonzini@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a7b91d35