1. 13 1月, 2016 6 次提交
    • M
      hw: Don't use hw_error() for machine initialization errors · c525436e
      Markus Armbruster 提交于
      Printing CPU registers is not helpful during machine initialization.
      Moreover, these are straightforward configuration or "can get
      resources" errors, so dumping core isn't appropriate either.  Replace
      hw_error() by error_report(); exit(1).  Matches how we report these
      errors in other machine initializations.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: qemu-arm@nongnu.org
      Cc: qemu-ppc@nongnu.org
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Signed-off-by: NMarkus Armbruster <armbru@pond.sub.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1450370121-5768-2-git-send-email-armbru@redhat.com>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      c525436e
    • M
      hw: Inline the qdev_prop_set_drive_nofail() wrapper · 6231a6da
      Markus Armbruster 提交于
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1449764955-10741-3-git-send-email-armbru@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      6231a6da
    • M
      Use error_fatal to simplify obvious fatal errors · 007b0657
      Markus Armbruster 提交于
      Done with this Coccinelle semantic patch:
      
          @@
          type T;
          identifier FUN, RET;
          expression list ARGS;
          expression ERR, EC;
          @@
          (
          -    T RET = FUN(ARGS, &ERR);
          +    T RET = FUN(ARGS, &error_fatal);
          |
          -    RET = FUN(ARGS, &ERR);
          +    RET = FUN(ARGS, &error_fatal);
          |
          -    FUN(ARGS, &ERR);
          +    FUN(ARGS, &error_fatal);
          )
          -    if (ERR != NULL) {
          -        error_report_err(ERR);
          -        exit(EC);
          -    }
      
      This is actually a more elegant version of my initial semantic patch
      by courtesy of Eduardo.
      
      It leaves dead Error * variables behind, cleaned up manually.
      
      Cc: qemu-arm@nongnu.org
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      007b0657
    • M
      error: Document how to accumulate multiple errors · 8d780f43
      Markus Armbruster 提交于
      Suggested-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447776349-2344-1-git-send-email-armbru@redhat.com>
      8d780f43
    • P
      Merge remote-tracking branch 'remotes/kvaneesh/tags/for-upstream-signed' into staging · 649a1bba
      Peter Maydell 提交于
      VirtFS update:
      
      Cleanups mostly isolating virtio related details into separate files. This
      is done to enable easy addition of Xen transport for VirtFS.
      
      The changes include:
      
      1. Rename a bunch of files and functions to make clear they are generic.
      2. disentangle virtio transport code and generic 9pfs code.
      3. Some function name clean-up.
      
      # gpg: Signature made Tue 12 Jan 2016 06:04:35 GMT using RSA key ID 04C4E23A
      # gpg: Good signature from "Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 4846 9DE7 1860 360F A6E9  968C DE41 A4FE 04C4 E23A
      
      * remotes/kvaneesh/tags/for-upstream-signed: (25 commits)
        9pfs: introduce V9fsVirtioState
        9pfs: factor out v9fs_device_{,un}realize_common
        9pfs: rename virtio-9p.c to 9p.c
        9pfs: rename virtio_9p_set_fd_limit to use v9fs_ prefix
        9pfs: move handle_9p_output and make it static function
        9pfs: export pdu_{submit,alloc,free}
        9pfs: factor out virtio_9p_push_and_notify
        9pfs: break out 9p.h from virtio-9p.h
        9pfs: break out virtio_init_iov_from_pdu
        9pfs: factor out pdu_push_and_notify
        9pfs: factor out virtio_pdu_{,un}marshal
        9pfs: make pdu_{,un}marshal proper functions
        9pfs: PDU processing functions should start pdu_ prefix
        9pfs: PDU processing functions don't need to take V9fsState as argument
        fsdev: rename virtio-9p-marshal.{c,h} to 9p-iov-marshal.{c,h}
        fsdev: break out 9p-marshal.{c,h} from virtio-9p-marshal.{c,h}
        9pfs: remove dead code
        9pfs: merge hw/virtio/virtio-9p.h into hw/9pfs/virtio-9p.h
        9pfs: rename virtio-9p-xattr{,-user}.{c,h} to 9p-xattr{,-user}.{c,h}
        9pfs: rename virtio-9p-synth.{c,h} to 9p-synth.{c,h}
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      649a1bba
    • P
      disas/libvixl: Suppress gcc 4.6.3 sign-compare warnings · 8acc216b
      Peter Maydell 提交于
      The VIXL code includes some equality comparisons between signed
      and unsigned types. Modern gcc and clang do not complain about
      these, but older versions of gcc such as gcc 4.6.3 do. Since
      libvixl is an upstream library, the simplest approach is to
      suppress the warnings by applying -Wno-sign-compare to the
      relevant files.
      
      (GCC 4.6 is not quite yet irrelevant for us; it is the gcc
      shipped with Ubuntu Precise, for example, which is an LTS
      release not yet out of its support period.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1452604204-27202-1-git-send-email-peter.maydell@linaro.org
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      8acc216b
  2. 12 1月, 2016 16 次提交
    • P
      Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging · cf57c2f1
      Peter Maydell 提交于
      # gpg: Signature made Mon 11 Jan 2016 19:16:27 GMT using RSA key ID AAFC390E
      # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
      
      * remotes/jnsnow/tags/ide-pull-request:
        libqos/ahci: organize header
        qtest/ahci: ATAPI data tests
        libqos/ahci: add ahci_exec
        libqos/ahci: allow nondata commands for ahci_io variants
        libqos: allow zero-size allocations
        libqos/ahci: Switch to mutable properties
        libqos/ahci: ATAPI identify
        libqos/ahci: ATAPI support
        ahci-test: fix memory leak
        ide: ahci: reset ncq object to unused on error
        macio: fix overflow in lba to offset conversion for ATAPI devices
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      cf57c2f1
    • W
      9pfs: introduce V9fsVirtioState · 00588a0a
      Wei Liu 提交于
      V9fsState now only contains generic fields. Introduce V9fsVirtioState
      for virtio transport.  Change virtio-pci and virtio-ccw to use
      V9fsVirtioState.
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      00588a0a
    • J
      libqos/ahci: organize header · c5620e65
      John Snow 提交于
      Organize the prototypes into nice little sections.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-10-git-send-email-jsnow@redhat.com
      c5620e65
    • J
      qtest/ahci: ATAPI data tests · e8109694
      John Snow 提交于
      Simple I/O tests for DMA and PIO pathways in the AHCI HBA.
      
      I believe at this point in time all of the common, major IO pathways
      in BMDMA and AHCI are covered by qtests now.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-9-git-send-email-jsnow@redhat.com
      e8109694
    • J
      libqos/ahci: add ahci_exec · 9350df7c
      John Snow 提交于
      add ahci_exec, which is a standard purpose flexible command dispatcher
      and tester for the AHCI device. The intent is to eventually cut down on
      the absurd amount of boilerplate inside of the AHCI qtest.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-8-git-send-email-jsnow@redhat.com
      9350df7c
    • J
      libqos/ahci: allow nondata commands for ahci_io variants · b682d3a7
      John Snow 提交于
      These variants try to set a data offset, even if you don't specify one.
      In the cases where the offset is zero and it's a nondata command, just
      ignore the instruction.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-7-git-send-email-jsnow@redhat.com
      b682d3a7
    • J
      libqos: allow zero-size allocations · b1b66c3b
      John Snow 提交于
      As part of streamlining the AHCI tests interface, it'd be nice
      if specying a size of zero could be handled without special branches
      and the allocator could handle this special case gracefully.
      
      This lets me use the "ahci_io" macros for non-data commands, too,
      which moves me forward towards shepherding all AHCI qtests into
      a common set of commands in a unified pipeline.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-6-git-send-email-jsnow@redhat.com
      b1b66c3b
    • J
      libqos/ahci: Switch to mutable properties · b88641e2
      John Snow 提交于
      ATAPI commands are, unfortunately, weird in that they can
      be either DMA or PIO depending on a header bit. In order to
      accommodate them, I'll need to make AHCI command properties
      mutable so we can toggle between which "flavor" of ATAPI command
      we want to test.
      
      The default ATAPI transfer mechanism is PIO and the default
      properties are adjusted accordingly.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-5-git-send-email-jsnow@redhat.com
      b88641e2
    • J
      libqos/ahci: ATAPI identify · d0b282a5
      John Snow 提交于
      We need to say "hello!" to our ATAPI friends
      in a slightly different manner.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-4-git-send-email-jsnow@redhat.com
      d0b282a5
    • J
      libqos/ahci: ATAPI support · 54d268b2
      John Snow 提交于
      Add pathways to tolerate ATAPI commands.
      
      Notably, unlike ATA, each SCSI command's layout is a little different,
      so support will have to be patched in for each command as we want to
      test them in e.g. ahci_command_set_sizes and ahci_command_set_offset.
      
      For now, I'm adding support for 0x28, READ (10).
      
      [Maintainer edit: replaced type-punning with stl_be_p(). --js]
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-3-git-send-email-jsnow@redhat.com
      54d268b2
    • J
      ahci-test: fix memory leak · 248de4a8
      John Snow 提交于
      Use the proper free command to detroy an AHCICommand.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282920-21550-2-git-send-email-jsnow@redhat.com
      248de4a8
    • P
      ide: ahci: reset ncq object to unused on error · 4ab0359a
      Prasad J Pandit 提交于
      When processing NCQ commands, AHCI device emulation prepares a
      NCQ transfer object; To which an aio control block(aiocb) object
      is assigned in 'execute_ncq_command'. In case, when the NCQ
      command is invalid, the 'aiocb' object is not assigned, and NCQ
      transfer object is left as 'used'. This leads to a use after
      free kind of error in 'bdrv_aio_cancel_async' via 'ahci_reset_port'.
      Reset NCQ transfer object to 'unused' to avoid it.
      
      [Maintainer edit: s/ACHI/AHCI/ in the commit message. --js]
      Reported-by: NQinghao Tang <luodalongde@gmail.com>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1452282511-4116-1-git-send-email-ppandit@redhat.com
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      4ab0359a
    • M
      macio: fix overflow in lba to offset conversion for ATAPI devices · 97225170
      Mark Cave-Ayland 提交于
      As the IDEState lba field is an int32_t, make sure we cast to int64_t before
      shifting to calculate the offset. Otherwise we end up with an overflow when
      trying to access sectors beyond 2GB as can occur when using DVD images.
      
      [Maintainer edit: fixed extraneous parentheses. --js]
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1451928613-29476-1-git-send-email-mark.cave-ayland@ilande.co.uk
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      97225170
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160111-1' into staging · 7b8a354d
      Peter Maydell 提交于
      target-arm queue:
       * i.MX: move i.MX31 CCM object to register array
       * xilinx_axidma: remove dead code
       * disas/libvixl: Update to upstream VIXL 1.12
       * virt: Support legacy -nic command line syntax
      
      # gpg: Signature made Mon 11 Jan 2016 16:05:58 GMT using RSA key ID 14360CDE
      # 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>"
      
      * remotes/pmaydell/tags/pull-target-arm-20160111-1:
        hw/arm/virt: Support legacy -nic command line syntax
        disas/libvixl: Update to upstream VIXL 1.12
        hw/dma/xilinx_axidma: remove dead code
        i.MX: move i.MX31 CCM object to register array
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7b8a354d
    • A
      hw/arm/virt: Support legacy -nic command line syntax · fea9b3ca
      Ashok Kumar 提交于
      Support the legacy -nic syntax for creating PCI network devices
      as well as the new-style -device options. This makes life easier
      for people moving from x86 KVM virtualization to ARM KVM virtualization
      and expecting their network configuration options to work the same
      way for both setups.
      
      We use "virtio" as the default NIC model if the user doesn't specify one.
      Signed-off-by: NAshok Kumar <ashoks@broadcom.com>
      Message-id: 1452091659-17698-1-git-send-email-ashoks@broadcom.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      [PMM: expanded and clarified commit message]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fea9b3ca
    • P
      disas/libvixl: Update to upstream VIXL 1.12 · 5de6f3c0
      Peter Maydell 提交于
      Update our copy of libvixl to upstream's 1.12 release.
      The major benefit from QEMU's point of view is that some instructions
      previously disassembled as "unimplemented (System)" are now displayed
      as something more useful. It also fixes some warnings about format
      strings that newer w64-mingw32 compilers were emitting.
      
      We didn't have any local changes to libvixl so nothing needed
      to be forward-ported.
      
      Although this is a large commit (due to upstream renaming most
      of the files), only a few of the files changed in this commit
      are not just straight copies of upstream libvixl files:
       disas/arm-a64.cc
       disas/libvixl/Makefile.objs
       disas/libvixl/README
      
      Note that this commit introduces some signed-unsigned comparison
      warnings on the old mingw compilers. Those compilers have broken
      TLS support anyway so have only ever been much use for compile tests;
      anybody still using them should add -Wno-sign-compare to their
      --extra-cflags.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5de6f3c0
  3. 11 1月, 2016 18 次提交