1. 28 1月, 2017 5 次提交
    • A
    • P
      xen-platform: add missing disk unplug option · ae4d2eb2
      Paul Durrant 提交于
      The Xen HVM unplug protocol [1] specifies a mechanism to allow guests to
      request unplug of 'aux' disks (which is stated to mean all IDE disks,
      except the primary master). This patch adds support for that unplug request.
      
      NOTE: The semantics of what happens if unplug of all disks and 'aux' disks
            is simultaneously requests is not clear. The patch makes that
            assumption that an 'all' request overrides an 'aux' request.
      
      [1] http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/hvm-emulated-unplug.markdownSigned-off-by: NPaul Durrant <paul.durrant@citrix.com>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      ----
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Anthony Perard <anthony.perard@citrix.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      ae4d2eb2
    • P
      xen-platform: add support for unplugging NVMe disks... · 090fa1c8
      Paul Durrant 提交于
      ...not just IDE and SCSI.
      
      This patch allows the Xen tool-stack to fully support of NVMe as an
      emulated disk type. See [1] for the relevant tool-stack patch discussion.
      
      [1] https://lists.xen.org/archives/html/xen-devel/2017-01/msg01225.htmlSigned-off-by: NPaul Durrant <paul.durrant@citrix.com>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      090fa1c8
    • P
      xen-platform: re-structure unplug_disks · 3d89e3f7
      Paul Durrant 提交于
      The current code is poorly structured and potentially leads to multiple
      config space reads when one is sufficient. Also the UNPLUG_ALL_IDE_DISKS
      flag is mis-named since it also results in SCSI disks being unplugged.
      
      This patch renames the flag and re-structures the code to be more
      efficient, and readable.
      Signed-off-by: NPaul Durrant <paul.durrant@citrix.com>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      3d89e3f7
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170127' into staging · 3aca12f8
      Peter Maydell 提交于
      target-arm queue:
       * various minor M profile bugfixes
       * aspeed/smc: handle dummy bytes when doing fast reads in command mode
       * pflash_cfi01: fix per-device sector length in CFI table
       * arm: stellaris: make MII accesses complete immediately
       * hw/char/exynos4210_uart: Drop unused local variable frame_size
       * arm_gicv3: Fix broken logic in ELRSR calculation
       * dma: omap: check dma channel data_type
      
      # gpg: Signature made Fri 27 Jan 2017 15:29:39 GMT
      # gpg:                using RSA key 0x3C2525ED14360CDE
      # 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>"
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20170127: (22 commits)
        dma: omap: check dma channel data_type
        arm_gicv3: Fix broken logic in ELRSR calculation
        hw/char/exynos4210_uart: Drop unused local variable frame_size
        arm: stellaris: make MII accesses complete immediately
        armv7m: R14 should reset to 0xffffffff
        armv7m: FAULTMASK should be 0 on reset
        armv7m: Honour CCR.USERSETMPEND
        armv7m: Report no-coprocessor faults correctly
        armv7m: set CFSR.UNDEFINSTR on undefined instructions
        armv7m: honour CCR.STACKALIGN on exception entry
        armv7m: implement CCR, CFSR, HFSR, DFSR, BFAR, and MMFAR
        armv7m: add state for v7M CCR, CFSR, HFSR, DFSR, MMFAR, BFAR
        armv7m_nvic: keep a pointer to the CPU
        target/arm: Drop IS_M() macro
        pflash_cfi01: fix per-device sector length in CFI table
        armv7m: Clear FAULTMASK on return from non-NMI exceptions
        armv7m: Fix reads of CONTROL register bit 1
        hw/registerfields.h: Pull FIELD etc macros out of hw/register.h
        armv7m: Explicit error for bad vector table
        armv7m: Replace armv7m.hack with unassigned_access handler
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3aca12f8
  2. 27 1月, 2017 30 次提交
  3. 26 1月, 2017 5 次提交
    • D
      io: fix possible double free of task error object · 80fb34ed
      Daniel P. Berrange 提交于
      If a QIOTask has an error set and the calling code uses
      qio_task_propagate_error() to steal the reference to
      that Error object, the task would not clear its own
      reference. This would lead to a double-free when
      qio_task_free runs, if the caller had (correctly) freed
      the Error object they now owned.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      80fb34ed
    • 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
    • C
      s390x/flic: fix compilation of kvm flic · a87adb66
      Cornelia Huck 提交于
      2c21ee76 ("migration: extend VMStateInfo") missed a void -> int
      return conversion for kvm_flic_save().
      
      Fixes: 2c21ee76 ("migration: extend VMStateInfo")
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      a87adb66
    • M
      test-hbitmap: Add hbitmap_is_serializable() calls · 7cdc49b9
      Max Reitz 提交于
      Add calls to hbitmap_is_serializable() (asserting that it returns true)
      where necessary (i.e. before every series of (de-)serialization function
      invocations).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-Id: <20161115225746.3590-3-mreitz@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      7cdc49b9
    • M
      hbitmap: Add hbitmap_is_serializable() · 20a579de
      Max Reitz 提交于
      Bitmaps with a granularity of 58 or above can be neither serialized nor
      deserialized (see the comment in the function added in this series for
      an explanation). This patch adds a function so that we can check whether
      a bitmap actually can be (de-)serialized at all, thus avoiding failing
      the necessary assertion in hbitmap_serialization_granularity().
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-Id: <20161115225746.3590-2-mreitz@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      20a579de