1. 08 3月, 2018 6 次提交
    • S
      virtio-blk: dataplane: Don't batch notifications if EVENT_IDX is present · 12c1c7d7
      Sergio Lopez 提交于
      Commit 5b2ffbe4 ("virtio-blk: dataplane:
      notify guest as a batch") deferred guest notification to a BH in order
      batch notifications, with purpose of avoiding flooding the guest with
      interruptions.
      
      This optimization came with a cost. The average latency perceived in the
      guest is increased by a few microseconds, but also when multiple IO
      operations finish at the same time, the guest won't be notified until
      all completions from each operation has been run. On the contrary,
      virtio-scsi issues the notification at the end of each completion.
      
      On the other hand, nowadays we have the EVENT_IDX feature that allows a
      better coordination between QEMU and the Guest OS to avoid sending
      unnecessary interruptions.
      
      With this change, virtio-blk/dataplane only batches notifications if the
      EVENT_IDX feature is not present.
      
      Some numbers obtained with fio (ioengine=sync, iodepth=1, direct=1):
       - Test specs:
         * fio-3.4 (ioengine=sync, iodepth=1, direct=1)
         * qemu master
         * virtio-blk with a dedicated iothread (default poll-max-ns)
         * backend: null_blk nr_devices=1 irqmode=2 completion_nsec=280000
         * 8 vCPUs pinned to isolated physical cores
         * Emulator and iothread also pinned to separate isolated cores
         * variance between runs < 1%
      
       - Not patched
         * numjobs=1:  lat_avg=327.32  irqs=29998
         * numjobs=4:  lat_avg=337.89  irqs=29073
         * numjobs=8:  lat_avg=342.98  irqs=28643
      
       - Patched:
         * numjobs=1:  lat_avg=323.92  irqs=30262
         * numjobs=4:  lat_avg=332.65  irqs=29520
         * numjobs=8:  lat_avg=335.54  irqs=29323
      Signed-off-by: NSergio Lopez <slp@redhat.com>
      Message-id: 20180307114459.26636-1-slp@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      12c1c7d7
    • F
      README: Fix typo 'git-publish' · 7c9e2748
      Fam Zheng 提交于
      Reported-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180306024328.19195-1-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      7c9e2748
    • D
      block: Fix qemu crash when using scsi-block · c060332c
      Deepa Srinivasan 提交于
      Starting qemu with the following arguments causes qemu to segfault:
      ... -device lsi,id=lsi0 -drive file=iscsi:<...>,format=raw,if=none,node-name=
      iscsi1 -device scsi-block,bus=lsi0.0,id=<...>,drive=iscsi1
      
      This patch fixes blk_aio_ioctl() so it does not pass stack addresses to
      blk_aio_ioctl_entry() which may be invoked after blk_aio_ioctl() returns. More
      details about the bug follow.
      
      blk_aio_ioctl() invokes blk_aio_prwv() with blk_aio_ioctl_entry as the
      coroutine parameter. blk_aio_prwv() ultimately calls aio_co_enter().
      
      When blk_aio_ioctl() is executed from within a coroutine context (e.g.
      iscsi_bh_cb()), aio_co_enter() adds the coroutine (blk_aio_ioctl_entry) to
      the current coroutine's wakeup queue. blk_aio_ioctl() then returns.
      
      When blk_aio_ioctl_entry() executes later, it accesses an invalid pointer:
      ....
          BlkRwCo *rwco = &acb->rwco;
      
          rwco->ret = blk_co_ioctl(rwco->blk, rwco->offset,
                                   rwco->qiov->iov[0].iov_base);  <--- qiov is
                                                                       invalid here
      ...
      
      In the case when blk_aio_ioctl() is called from a non-coroutine context,
      blk_aio_ioctl_entry() executes immediately. But if bdrv_co_ioctl() calls
      qemu_coroutine_yield(), blk_aio_ioctl() will return. When the coroutine
      execution is complete, control returns to blk_aio_ioctl_entry() after the call
      to blk_co_ioctl(). There is no invalid reference after this point, but the
      function is still holding on to invalid pointers.
      
      The fix is to change blk_aio_prwv() to accept a void pointer for the IO buffer
      rather than a QEMUIOVector. blk_aio_prwv() passes this through in BlkRwCo and the
      coroutine function casts it to QEMUIOVector or uses the void pointer directly.
      Signed-off-by: NDeepa Srinivasan <deepa.srinivasan@oracle.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: NMark Kanda <mark.kanda@oracle.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c060332c
    • P
      Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-03-07-1' into staging · 0ab4537f
      Peter Maydell 提交于
      Merge tpm 2018/03/07
      
      # gpg: Signature made Wed 07 Mar 2018 12:42:13 GMT
      # gpg:                using RSA key 75AD65802A0B4211
      # gpg: Good signature from "Stefan Berger <stefanb@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: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211
      
      * remotes/stefanberger/tags/pull-tpm-2018-03-07-1:
        tpm: convert tpm_tis.c to use trace-events
        tpm: convert tpm_emulator.c to use trace-events
        tpm: convert tpm_util.c to use trace-events
        tpm: convert tpm_passthrough.c to use trace-events
        tpm: convert tpm_crb.c to use trace-events
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0ab4537f
    • P
      Merge remote-tracking branch 'remotes/berrange/tags/qio-next-pull-request' into staging · 3ef91576
      Peter Maydell 提交于
      # gpg: Signature made Wed 07 Mar 2018 11:24:41 GMT
      # gpg:                using RSA key BE86EBB415104FDF
      # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
      # gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
      # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF
      
      * remotes/berrange/tags/qio-next-pull-request:
        qio: non-default context for TLS handshake
        qio: non-default context for async conn
        qio: non-default context for threaded qtask
        qio: store gsources for net listeners
        qio: introduce qio_channel_add_watch_{full|source}
        qio: rename qio_task_thread_result
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3ef91576
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 854a4436
      Peter Maydell 提交于
      Multiboot patches
      
      # gpg: Signature made Wed 07 Mar 2018 11:15:17 GMT
      # gpg:                using RSA key 7F09B272C88F2FD6
      # 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:
        multiboot: fprintf(stderr...) -> error_report()
        multiboot: Use header names when displaying fields
        multiboot: Remove unused variables from multiboot.c
        multiboot: bss_end_addr can be zero
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      854a4436
  2. 07 3月, 2018 9 次提交
  3. 06 3月, 2018 25 次提交