1. 26 1月, 2017 3 次提交
    • S
      aio-posix: honor is_external in AioContext polling · 59c9f437
      Stefan Hajnoczi 提交于
      AioHandlers marked ->is_external must be skipped when aio_node_check()
      fails.  bdrv_drained_begin() needs this to prevent dataplane from
      submitting new I/O requests while another thread accesses the device and
      relies on it being quiesced.
      
      This patch fixes the following segfault:
      
        Program terminated with signal SIGSEGV, Segmentation fault.
        #0  0x00005577f6127dad in bdrv_io_plug (bs=0x5577f7ae52f0) at qemu/block/io.c:2650
        2650            bdrv_io_plug(child->bs);
        [Current thread is 1 (Thread 0x7ff5c4bd1c80 (LWP 10917))]
        (gdb) bt
        #0  0x00005577f6127dad in bdrv_io_plug (bs=0x5577f7ae52f0) at qemu/block/io.c:2650
        #1  0x00005577f6114363 in blk_io_plug (blk=0x5577f7b8ba20) at qemu/block/block-backend.c:1561
        #2  0x00005577f5d4091d in virtio_blk_handle_vq (s=0x5577f9ada030, vq=0x5577f9b3d2a0) at qemu/hw/block/virtio-blk.c:589
        #3  0x00005577f5d4240d in virtio_blk_data_plane_handle_output (vdev=0x5577f9ada030, vq=0x5577f9b3d2a0) at qemu/hw/block/dataplane/virtio-blk.c:158
        #4  0x00005577f5d88acd in virtio_queue_notify_aio_vq (vq=0x5577f9b3d2a0) at qemu/hw/virtio/virtio.c:1304
        #5  0x00005577f5d8aaaf in virtio_queue_host_notifier_aio_poll (opaque=0x5577f9b3d308) at qemu/hw/virtio/virtio.c:2134
        #6  0x00005577f60ca077 in run_poll_handlers_once (ctx=0x5577f79ddbb0) at qemu/aio-posix.c:493
        #7  0x00005577f60ca268 in try_poll_mode (ctx=0x5577f79ddbb0, blocking=true) at qemu/aio-posix.c:569
        #8  0x00005577f60ca331 in aio_poll (ctx=0x5577f79ddbb0, blocking=true) at qemu/aio-posix.c:601
        #9  0x00005577f612722a in bdrv_flush (bs=0x5577f7c20970) at qemu/block/io.c:2403
        #10 0x00005577f60c1b2d in bdrv_close (bs=0x5577f7c20970) at qemu/block.c:2322
        #11 0x00005577f60c20e7 in bdrv_delete (bs=0x5577f7c20970) at qemu/block.c:2465
        #12 0x00005577f60c3ecf in bdrv_unref (bs=0x5577f7c20970) at qemu/block.c:3425
        #13 0x00005577f60bf951 in bdrv_root_unref_child (child=0x5577f7a2de70) at qemu/block.c:1361
        #14 0x00005577f6112162 in blk_remove_bs (blk=0x5577f7b8ba20) at qemu/block/block-backend.c:491
        #15 0x00005577f6111b1b in blk_remove_all_bs () at qemu/block/block-backend.c:245
        #16 0x00005577f60c1db6 in bdrv_close_all () at qemu/block.c:2382
        #17 0x00005577f5e60cca in main (argc=20, argv=0x7ffea6eb8398, envp=0x7ffea6eb8440) at qemu/vl.c:4684
      
      The key thing is that bdrv_close() uses bdrv_drained_begin() and
      virtio_queue_host_notifier_aio_poll() must not be called.
      
      Thanks to Fam Zheng <famz@redhat.com> for identifying the root cause of
      this crash.
      Reported-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Tested-by: NAlberto Garcia <berto@igalia.com>
      Message-id: 20170124095350.16679-1-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      59c9f437
    • P
      Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging · c7f1cf01
      Peter Maydell 提交于
      This pull request fixes a 2.9 regression and a long standing bug that can
      cause 9p clients to hang. Other patches are minor enhancements.
      
      # gpg: Signature made Wed 25 Jan 2017 10:12:27 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@fr.ibm.com>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "Gregory Kurz (Cimai Technology) <gkurz@cimai.com>"
      # gpg:                 aka "Gregory Kurz (Meiosys Technology) <gkurz@meiosys.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: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2
      
      * remotes/gkurz/tags/for-upstream:
        9pfs: fix offset error in v9fs_xattr_read()
        9pfs: local: trivial cosmetic fix in pwritev op
        9pfs: fix off-by-one error in PDU free list
        tests: virtio-9p: improve error reporting
        9pfs: add missing coroutine_fn annotations
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c7f1cf01
    • P
      Merge remote-tracking branch 'remotes/xtensa/tags/20170124-xtensa' into staging · e32c41e4
      Peter Maydell 提交于
      target/xtensa updates:
      
      - refactor CCOUNT/CCOMPARE (use QEMU timers instead of instruction counting);
      - support icount; run target/xtensa TCG tests with icount;
      - implement SMP prerequisites: static vector selection, RUNSTALL and RER/WER.
      
      # gpg: Signature made Wed 25 Jan 2017 00:27:51 GMT
      # gpg:                using RSA key 0x51F9CC91F83FA044
      # gpg: Good signature from "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/20170124-xtensa:
        target-xtensa: implement RER/WER instructions
        target/xtensa: tests: clean up interrupt tests
        target/xtensa: tests: add memctl test
        target/xtensa: implement MEMCTL SR
        target/xtensa: fix ICACHE/DCACHE options detection
        target/xtensa: tests: add ccount write tests
        target/xtensa: tests: replace hardcoded interrupt masks
        target/xtensa: tests: fix timer tests
        target/xtensa: tests: run tests with icount
        target/xtensa: don't continue translation after exception
        target/xtensa: support icount
        target/xtensa: refactor CCOUNT/CCOMPARE
        target/xtensa: implement RUNSTALL
        target/xtensa: add static vectors selection
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e32c41e4
  2. 25 1月, 2017 37 次提交