1. 21 3月, 2017 7 次提交
    • P
      configure: Warn about deprecated hosts · 898be3e0
      Peter Maydell 提交于
      We plan to drop support in a future QEMU release for host OSes
      and host architectures for which we have no test machine where
      we can build and run tests. For the 2.9 release, make configure
      print a warning if it is run on such a host, so that the user
      has some warning of the plans and can volunteer to help us
      maintain the port if they need it to continue to function.
      
      This commit flags up as deprecated the CPU architectures:
       * ia64
       * sparc
       * anything which we don't have a TCG port for
         (and which was presumably using TCI)
      and the OSes:
       * GNU/kFreeBSD
       * DragonFly BSD
       * NetBSD
       * OpenBSD
       * Solaris
       * AIX
       * Haiku
      
      It also makes entirely unrecognized host OS strings be
      rejected rather than treated as if they were Linux (which
      likely never worked).
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1490106717-9542-1-git-send-email-peter.maydell@linaro.org
      898be3e0
    • P
      Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging · 41a56822
      Peter Maydell 提交于
      This pull request fixes a potential QEMU hang in 9pfs and two issues
      reported by Coverity.
      
      # gpg: Signature made Tue 21 Mar 2017 09:57:58 GMT
      # gpg:                using DSA key 0x02FC3AEB0101DBC2
      # gpg: Good signature from "Greg Kurz <groug@kaod.org>"
      # gpg:                 aka "Greg Kurz <groug@free.fr>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "[jpeg image of size 3330]"
      # 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: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2
      
      * remotes/gkurz/tags/for-upstream:
        9pfs: proxy: assert if unmarshal fails
        9pfs: don't try to flush self and avoid QEMU hang on reset
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      41a56822
    • G
      add opengl_cflags to QEMU_CFLAGS · cc720a5d
      Gerd Hoffmann 提交于
      ... and drop OPENGL_CFLAGS from Makefiles.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1490079888-29029-1-git-send-email-kraxel@redhat.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      cc720a5d
    • G
      9pfs: proxy: assert if unmarshal fails · 262169ab
      Greg Kurz 提交于
      Replies from the virtfs proxy are made up of a fixed-size header (8 bytes)
      and a payload of variable size (maximum 64kb). When receiving a reply,
      the proxy backend first reads the whole header and then unmarshals it.
      If the header is okay, it then does the same operation with the payload.
      
      Since the proxy backend uses a pre-allocated buffer which has enough room
      for a header and the maximum payload size, marshalling should never fail
      with fixed size arguments. Any error here is likely to result from a more
      serious corruption in QEMU and we'd better dump core right away.
      
      This patch adds error checks where they are missing and converts the
      associated error paths into assertions.
      
      This should also address Coverity's complaints CID 1348519 and CID 1348520,
      about not always checking the return value of proxy_unmarshal().
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      262169ab
    • G
      9pfs: don't try to flush self and avoid QEMU hang on reset · d5f2af7b
      Greg Kurz 提交于
      According to the 9P spec [*], when a client wants to cancel a pending I/O
      request identified by a given tag (uint16), it must send a Tflush message
      and wait for the server to respond with a Rflush message before reusing this
      tag for another I/O. The server may still send a completion message for the
      I/O if it wasn't actually cancelled but the Rflush message must arrive after
      that.
      
      QEMU hence waits for the flushed PDU to complete before sending the Rflush
      message back to the client.
      
      If a client sends 'Tflush tag oldtag' and tag == oldtag, QEMU will then
      allocate a PDU identified by tag, find it in the PDU list and wait for
      this same PDU to complete... i.e. wait for a completion that will never
      happen. This causes a tag and ring slot leak in the guest, and a PDU
      leak in QEMU, all of them limited by the maximal number of PDUs (128).
      But, worse, this causes QEMU to hang on device reset since v9fs_reset()
      wants to drain all pending I/O.
      
      This insane behavior is likely to denote a bug in the client, and it would
      deserve an Rerror message to be sent back. Unfortunately, the protocol
      allows it and requires all flush requests to suceed (only a Tflush response
      is expected).
      
      The only option is to detect when we have to handle a self-referencing
      flush request and report success to the client right away.
      
      [*] http://man.cat-v.org/plan_9/5/flushReported-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      d5f2af7b
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 940a8ce0
      Peter Maydell 提交于
      fixes for 2.9-rc1, plus removal of -mno-cygwin references
      
      # gpg: Signature made Mon 20 Mar 2017 11:25:07 GMT
      # gpg:                using RSA key 0xBFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream:
        hax: fix breakage in locking
        configure: remove Cygwin
        xen: do not build backends for targets that do not support xen
        qemu-ga: obey LISTEN_PID when using systemd socket activation
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      940a8ce0
    • G
      audio: catch missing sdl support · 373967b2
      Gerd Hoffmann 提交于
      sdl is probed before audio, so we can simply look at $sdl so see
      whenever we have support or not.  Throw an error in case sdl audio
      is requested without sdl being available.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Tested-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1490000743-3615-1-git-send-email-kraxel@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      373967b2
  2. 20 3月, 2017 22 次提交
  3. 19 3月, 2017 5 次提交
    • P
      configure: remove Cygwin · 732a8020
      Paolo Bonzini 提交于
      The Cygwin target is really compiling for native Win32 with -mno-cygwin.
      Except, GCC 4.7.0 has finally removed the long deprecated -mno-cygwin
      option, and that happened about five years ago.
      
      Let it rest in peace.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      732a8020
    • S
      xen: do not build backends for targets that do not support xen · 6b827cca
      Stefano Stabellini 提交于
      Change Makefile.objs to use CONFIG_XEN instead of CONFIG_XEN_BACKEND, so
      that the Xen backends are only built for targets that support Xen.
      
      Set CONFIG_XEN in the toplevel Makefile to ensure that files that are
      built only once pick up Xen support properly.
      Signed-off-by: NStefano Stabellini <stefano@aporeto.com>
      Tested-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      CC: pbonzini@redhat.com
      CC: peter.maydell@linaro.org
      CC: rth@twiddle.net
      CC: stefanha@redhat.com
      Message-Id: <1489694518-16978-1-git-send-email-sstabellini@kernel.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6b827cca
    • P
      qemu-ga: obey LISTEN_PID when using systemd socket activation · 53fabd4b
      Paolo Bonzini 提交于
      qemu-ga's socket activation support was not obeying the LISTEN_PID
      environment variable, which avoids that a process uses a socket-activation
      file descriptor meant for its parent.
      
      Mess can for example ensue if a process forks a children before consuming
      the socket-activation file descriptor and therefore setting O_CLOEXEC
      on it.
      
      Luckily, qemu-nbd also got socket activation code, and its copy does
      support LISTEN_PID.  Some extra fixups are needed to ensure that the
      code can be used for both, but that's what this patch does.  The
      main change is to replace get_listen_fds's "consume" argument with
      the FIRST_SOCKET_ACTIVATION_FD macro from the qemu-nbd code.
      
      Cc: "Richard W.M. Jones" <rjones@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      53fabd4b
    • M
      nios2: iic: Convert CPU prop to qom link · ebedf0f9
      Marek Vasut 提交于
      Add a const qom link between the CPU and the IIC instead
      of passing the CPU link through a qom property.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 20170317210627.23532-1-marex@denx.de
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Chris Wulff <crwulff@gmail.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Jeff Da Silva <jdasilva@altera.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Sandra Loosemore <sandra@codesourcery.com>
      Cc: Yves Vandervennet <yvanderv@altera.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ebedf0f9
    • P
      Merge remote-tracking branch 'remotes/xtensa/tags/20170317-xtensa' into staging · 96dd9c89
      Peter Maydell 提交于
      target/xtensa fixes for 2.9:
      
      - fix build failure when FDT support is not enabled;
      - correctly pass command line arguments to semihosting guests.
      
      # gpg: Signature made Fri 17 Mar 2017 18:14:01 GMT
      # gpg:                using RSA key 0x51F9CC91F83FA044
      # gpg: Good signature from "Max Filippov <filippov@cadence.com>"
      # gpg:                 aka "Max Filippov <max.filippov@cogentembedded.com>"
      # gpg:                 aka "Max Filippov <jcmvbkbc@gmail.com>"
      # Primary key fingerprint: 2B67 854B 98E5 327D CDEB  17D8 51F9 CC91 F83F A044
      
      * remotes/xtensa/tags/20170317-xtensa:
        target/xtensa: fix semihosting argc/argv implementation
        target/xtensa: xtfpga: load DTB only when FDT support is enabled
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      96dd9c89
  4. 18 3月, 2017 2 次提交
  5. 17 3月, 2017 4 次提交
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 31d89228
      Peter Maydell 提交于
      Block layer fixes for 2.9.0-rc1
      
      # gpg: Signature made Fri 17 Mar 2017 12:06:04 GMT
      # gpg:                using RSA key 0x7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream:
        block: quiesce AioContext when detaching from it
        thread-pool: add missing qemu_bh_cancel in completion function
        block: Propagate error in bdrv_open_backing_file
        blockdev: fix bitmap clear undo
        block: Always call bdrv_child_check_perm first
        file-posix: Don't leak fd in hdev_get_max_segments
        replication: clarify permissions
        file-posix: clean up max_segments buffer termination
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      31d89228
    • K
      Merge remote-tracking branch 'mreitz/tags/pull-block-2017-03-17' into queue-block · 11f0f5e5
      Kevin Wolf 提交于
      Block patches for 2.9-rc1
      
      # gpg: Signature made Fri Mar 17 12:59:20 2017 CET
      # gpg:                using RSA key 0xF407DB0061D5CF40
      # gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
      # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40
      
      * mreitz/tags/pull-block-2017-03-17:
        block: quiesce AioContext when detaching from it
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      11f0f5e5
    • P
      block: quiesce AioContext when detaching from it · c2b6428d
      Paolo Bonzini 提交于
      While it is true that bdrv_set_aio_context only works on a single
      BlockDriverState subtree (see commit message for 53ec73e2, "block: Use
      bdrv_drain to replace uncessary bdrv_drain_all", 2015-07-07), it works
      at the AioContext level rather than the BlockDriverState level.
      
      Therefore, it is also necessary to trigger pending bottom halves too,
      even if no requests are pending.
      
      For NBD this ensures that the aio_co_schedule of a previous call to
      nbd_attach_aio_context is completed before detaching from the old
      AioContext; it fixes qemu-iotest 094.  Another similar bug happens
      when the VM is stopped and the virtio-blk dataplane irqfd is torn down.
      In this case it's possible that guest I/O gets stuck if notify_guest_bh
      was scheduled but doesn't run.
      
      Calling aio_poll from another AioContext is safe if non-blocking; races
      such as the one mentioned in the commit message for c9d1a561 ("block:
      only call aio_poll on the current thread's AioContext", 2016-10-28)
      are a concern for blocking calls.
      
      I considered other options, including:
      
      - moving the bs->wakeup mechanism to AioContext, and letting the caller
      check.  This might work for virtio which has a clear place to wakeup
      (notify_place_bh) and check the condition (virtio_blk_data_plane_stop).
      For aio_co_schedule I couldn't find a clear place to check the condition.
      
      - adding a dummy oneshot bottom half and waiting for it to trigger.
      This has the complication that bottom half list is LIFO for historical
      reasons.  There were performance issues caused by bottom half ordering
      in the past, so I decided against it for 2.9.
      
      Fixes: 99723548Reported-by: NMax Reitz <mreitz@redhat.com>
      Reported-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Tested-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20170314111157.14464-2-pbonzini@redhat.com
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      c2b6428d
    • P
      thread-pool: add missing qemu_bh_cancel in completion function · b7a745dc
      Peter Lieven 提交于
      commit 3c80ca15 fixed a deadlock scenarion with nested aio_poll invocations.
      
      However, the rescheduling of the completion BH introcuded unnecessary spinning
      in the main-loop. On very fast file backends this can even lead to the
      "WARNING: I/O thread spun for 1000 iterations" message popping up.
      
      Callgrind reports about 3-4% less instructions with this patch running
      qemu-img bench on a ramdisk based VMDK file.
      
      Fixes: 3c80ca15
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b7a745dc