qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 1cc933: virtio-scsi: use virtqueue_map_sg() w


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 1cc933: virtio-scsi: use virtqueue_map_sg() when loading r...
Date: Tue, 18 Aug 2015 12:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1cc933453bf2baae1feb7c8e757bdfd0ef639002
      
https://github.com/qemu/qemu/commit/1cc933453bf2baae1feb7c8e757bdfd0ef639002
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-07-30 (Thu, 30 Jul 2015)

  Changed paths:
    M hw/scsi/virtio-scsi.c

  Log Message:
  -----------
  virtio-scsi: use virtqueue_map_sg() when loading requests

The VirtQueueElement struct is serialized during migration but the
in_sg[]/out_sg[] iovec arrays are not usable on the destination host
because the pointers are meaningless.

Use virtqueue_map_sg() to refresh in_sg[]/out_sg[] to valid pointers
based on in_addr[]/out_addr[] hwaddrs.

Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c85a7a0057ca454607a40cde991d495e0deec34d
      
https://github.com/qemu/qemu/commit/c85a7a0057ca454607a40cde991d495e0deec34d
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-07-30 (Thu, 30 Jul 2015)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: fix cmd.mode field typo

The cmd.xfer field is the data length.  The cmd.mode field is the data
transfer direction.

scsi_handle_rw_error() was using the wrong error policy for read
requests.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4bb7b0daf8ea34bcc582642d35a2e4902f7841db
      
https://github.com/qemu/qemu/commit/4bb7b0daf8ea34bcc582642d35a2e4902f7841db
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2015-07-30 (Thu, 30 Jul 2015)

  Changed paths:
    M tests/virtio-scsi-test.c

  Log Message:
  -----------
  tests: virtio-scsi: clear unit attention after reset

The unit attention after reset (power on) prevents normal commands from
running.  The unaligned WRITE SAME test never executed its command!

Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a56537a12757a8cdee24ad8c83e5af7a9833ea70
      
https://github.com/qemu/qemu/commit/a56537a12757a8cdee24ad8c83e5af7a9833ea70
  Author: Fam Zheng <address@hidden>
  Date:   2015-07-30 (Thu, 30 Jul 2015)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: Fix assertion failure on WRITE SAME

The last portion of an unaligned WRITE SAME command could fail the
assertion in bdrv_aligned_pwritev:

    assert(!qiov || bytes == qiov->size);

Because we updated data->iov.iov_len right above this if block, but
data->qiov still has the old size.

Reinitialize the qiov to make them equal and keep block layer happy.

Cc: address@hidden
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 975b66555cb56af453c6852e7e821e2451700527
      
https://github.com/qemu/qemu/commit/975b66555cb56af453c6852e7e821e2451700527
  Author: Fam Zheng <address@hidden>
  Date:   2015-07-30 (Thu, 30 Jul 2015)

  Changed paths:
    M tests/virtio-scsi-test.c

  Log Message:
  -----------
  virtio-scsi-test: Add test case for tail unaligned WRITE SAME

Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: af103c9310b7ab56a2552965d9d1274b0024f27b
      
https://github.com/qemu/qemu/commit/af103c9310b7ab56a2552965d9d1274b0024f27b
  Author: Igor Mammedov <address@hidden>
  Date:   2015-07-30 (Thu, 30 Jul 2015)

  Changed paths:
    M hw/scsi/vhost-scsi.c

  Log Message:
  -----------
  vhost/scsi: call vhost_dev_cleanup() at unrealize() time

vhost-scsi calls vhost_dev_init() at realize() time
but forgets to call it's counterpart vhost_dev_cleanup()
at unrealize() time.

Calling it should fix leaking of memory table and
mem_sections table in vhost device. And also unregister
vhost's memory listerner to prevent access from
memory core to freed memory.

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 02d57ea115b7669f588371c86484a2e8ebc369be
      
https://github.com/qemu/qemu/commit/02d57ea115b7669f588371c86484a2e8ebc369be
  Author: Sergey Fedorov <address@hidden>
  Date:   2015-08-06 (Thu, 06 Aug 2015)

  Changed paths:
    M cpu-exec.c
    M include/exec/exec-all.h
    M translate-all.c

  Log Message:
  -----------
  cpu-exec: Do not invalidate original TB in cpu_exec_nocache()

Instead of invalidating an original TB in cpu_exec_nocache()
prematurely, just save a link to it in the temporary generated TB. If
cpu_io_recompile() is raised subsequently from the temporary TB,
invalidate the original one as well. That allows reusing the original TB
each time cpu_exec_nocache() is called to handle expired instruction
counter in icount mode.

Signed-off-by: Sergey Fedorov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: b4a4b8d0e0767c85946fd8fc404643bf5766351a
      
https://github.com/qemu/qemu/commit/b4a4b8d0e0767c85946fd8fc404643bf5766351a
  Author: Peter Crosthwaite <address@hidden>
  Date:   2015-08-06 (Thu, 06 Aug 2015)

  Changed paths:
    M include/exec/cpu-defs.h

  Log Message:
  -----------
  cpu_defs: Simplify CPUTLB padding logic

There was a complicated subtractive arithmetic for determining the
padding on the CPUTLBEntry structure. Simplify this with a union.

Signed-off-by: Peter Crosthwaite <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 414b15c909c88e4cf5f10e80d033b3aa90bcc9e1
      
https://github.com/qemu/qemu/commit/414b15c909c88e4cf5f10e80d033b3aa90bcc9e1
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M cpu-exec.c
    M cpus.c
    M include/exec/exec-all.h
    M include/qom/cpu.h
    M qom/cpu.c
    M softmmu_template.h
    M translate-all.c

  Log Message:
  -----------
  exec: drop cpu_can_do_io, just read cpu->can_do_io

After commit 626cf8f (icount: set can_do_io outside TB execution,
2014-12-08), can_do_io is set to 1 if not executing code.  It is
no longer necessary to make this assumption in cpu_can_do_io.

It is also possible to remove the use_icount test, simply by
never setting cpu->can_do_io to 0 unless use_icount is true.

With these changes cpu_can_do_io boils down to a read of
cpu->can_do_io.

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c097a60b100c10d79d8bd5c91ce804e865d7e70b
      
https://github.com/qemu/qemu/commit/c097a60b100c10d79d8bd5c91ce804e865d7e70b
  Author: Wen Congyang <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M util/rcu.c

  Log Message:
  -----------
  rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

If rcu_(un)register_thread() is called together with synchronize_rcu(),
it will wait for the synchronize_rcu() to finish. But when synchronize_rcu()
waits for some events, we can modify the list registry.
We also use the lock rcu_gp_lock to assume that synchronize_rcu() isn't
executed in more than one thread at the same time. Add a new mutex lock
rcu_sync_lock to assume it and rename rcu_gp_lock to rcu_registry_lock.
Release rcu_registry_lock when synchronize_rcu() waits for some events.

Signed-off-by: Wen Congyang <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9284f31994919c001b54af57fc7d1bbb0d19b6fd
      
https://github.com/qemu/qemu/commit/9284f31994919c001b54af57fc7d1bbb0d19b6fd
  Author: Chen Hanxiao <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: use macro ROUND_UP for alignment

Use ROUND_UP instead.

Signed-off-by: Chen Hanxiao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fe2d1a81d96e8ffe74974bd4b3ebc608f1f6a25d
      
https://github.com/qemu/qemu/commit/fe2d1a81d96e8ffe74974bd4b3ebc608f1f6a25d
  Author: Lu Lina <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M hw/scsi/vhost-scsi.c

  Log Message:
  -----------
  vhost-scsi: Clarify vhost_virtqueue_mask argument

vhost_virtqueue_mask takes an "absolute" virtqueue index, while the
code looks like it's passing an index that is relative to
s->dev.vq_index.  In reality, s->dev.vq_index is always zero, so
this patch does not make any difference, but the code is clearer.

Signed-off-by: Lu Lina <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 06832648e1dbd268d7b719b9a49df476af689c6d
      
https://github.com/qemu/qemu/commit/06832648e1dbd268d7b719b9a49df476af689c6d
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M qemu-nbd.c

  Log Message:
  -----------
  qemu-nbd: remove unnecessary qemu_notify_event()

This was needed when qemu-nbd was using qemu_set_fd_handler2.  It is
not needed anymore now that nbd_update_server_fd_handler is called
whenever nbd_can_accept() can change from false to true.
nbd_update_server_fd_handler will call qemu_set_fd_handler(),
which will call qemu_notify_event().

Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 416471916542f30c49f2ed2187d634e9ad26d57d
      
https://github.com/qemu/qemu/commit/416471916542f30c49f2ed2187d634e9ad26d57d
  Author: Daniel P. Berrange <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: only add CONFIG_RDMA to config-host.h once

For unknown reasons (probably a git rebase merge mistake)

  commit 2da776db4846eadcb808598a5d3484d149773c05
  Author: Michael R. Hines <address@hidden>
  Date:   Mon Jul 22 10:01:54 2013 -0400

    rdma: core logic

Adds CONFIG_RDMA to config-host.h twice, as can be seen
in the generated file:

 $ grep CONFIG_RDMA config-host.h
 #define CONFIG_RDMA 1
 #define CONFIG_RDMA 1

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d223c10453f1a7909349fd3e52a6047295d0e94f
      
https://github.com/qemu/qemu/commit/d223c10453f1a7909349fd3e52a6047295d0e94f
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M hw/scsi/scsi-bus.c

  Log Message:
  -----------
  scsi: create restart bottom half in the right AioContext

This matches commit 4407c1c (virtio-blk: Schedule BH in the right context,
2014-06-17), which did the same thing for virtio-blk.

Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5fd2b563a7624959ae7f000202785a30279021f8
      
https://github.com/qemu/qemu/commit/5fd2b563a7624959ae7f000202785a30279021f8
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: identify AIO callbacks more clearly

Functions that are not callbacks should assert that aiocb is NULL and
have a non-opaque argument (usually a pointer to SCSIDiskReq).

AIO callbacks should assert that aiocb is not NULL and take care of
calling block_acct done.  They also have an opaque argument.

Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fa0d653b06cec7b3188a733dc7394e030948018e
      
https://github.com/qemu/qemu/commit/fa0d653b06cec7b3188a733dc7394e030948018e
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M hw/scsi/scsi-generic.c

  Log Message:
  -----------
  scsi-generic: identify AIO callbacks more clearly

Functions that are not callbacks should assert that aiocb is NULL and
have a SCSIGenericReq argument.

AIO callbacks should assert that aiocb is not NULL.  They also have an
opaque argument.

Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 491ffc1f7ce857b88e9d310ce901ce033e45b75d
      
https://github.com/qemu/qemu/commit/491ffc1f7ce857b88e9d310ce901ce033e45b75d
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M hw/char/mcf_uart.c

  Log Message:
  -----------
  hw: fix mask for ColdFire UART command register

The "miscellaneous commands" part of the register is 3 bits wide.
Spotted by Coverity and confirmed in the datasheet, downloadable from
http://cache.freescale.com/files/32bit/doc/ref_manual/MCF5307BUM.pdf
(figure 14-6).

Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9504c5445cb709415aea509954a922983925c2d3
      
https://github.com/qemu/qemu/commit/9504c5445cb709415aea509954a922983925c2d3
  Author: Peter Crosthwaite <address@hidden>
  Date:   2015-08-14 (Fri, 14 Aug 2015)

  Changed paths:
    M disas.c

  Log Message:
  -----------
  disas: Defeature print_target_address

It does not work in multi-arch as it requires the CPU specific
TARGET_VIRT_ADDR_SPACE_BITS global define. Just use the generic
version that does no masking. Targets should be responsible for
passing in a sane virtual address.

Signed-off-by: Peter Crosthwaite <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 5452b6f61ae943aff5c13cdd65fb476efff636d3
      
https://github.com/qemu/qemu/commit/5452b6f61ae943aff5c13cdd65fb476efff636d3
  Author: Peter Maydell <address@hidden>
  Date:   2015-08-18 (Tue, 18 Aug 2015)

  Changed paths:
    M configure
    M cpu-exec.c
    M cpus.c
    M disas.c
    M exec.c
    M hw/char/mcf_uart.c
    M hw/scsi/scsi-bus.c
    M hw/scsi/scsi-disk.c
    M hw/scsi/scsi-generic.c
    M hw/scsi/vhost-scsi.c
    M hw/scsi/virtio-scsi.c
    M include/exec/cpu-defs.h
    M include/exec/exec-all.h
    M include/qom/cpu.h
    M qemu-nbd.c
    M qom/cpu.c
    M softmmu_template.h
    M tests/virtio-scsi-test.c
    M translate-all.c
    M util/rcu.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* SCSI fixes from Stefan and Fam
* vhost-scsi fix from Igor and Lu Lina
* a build system fix from Daniel
* two more multi-arch-related patches from Peter C.
* TCG patches from myself and Sergey Fedorov
* RCU improvement from Wen Congyang
* a few more simple cleanups

# gpg: Signature made Fri 14 Aug 2015 22:41:52 BST using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# 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:
  disas: Defeature print_target_address
  hw: fix mask for ColdFire UART command register
  scsi-generic: identify AIO callbacks more clearly
  scsi-disk: identify AIO callbacks more clearly
  scsi: create restart bottom half in the right AioContext
  configure: only add CONFIG_RDMA to config-host.h once
  qemu-nbd: remove unnecessary qemu_notify_event()
  vhost-scsi: Clarify vhost_virtqueue_mask argument
  exec: use macro ROUND_UP for alignment
  rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()
  exec: drop cpu_can_do_io, just read cpu->can_do_io
  cpu_defs: Simplify CPUTLB padding logic
  cpu-exec: Do not invalidate original TB in cpu_exec_nocache()
  vhost/scsi: call vhost_dev_cleanup() at unrealize() time
  virtio-scsi-test: Add test case for tail unaligned WRITE SAME
  scsi-disk: Fix assertion failure on WRITE SAME
  tests: virtio-scsi: clear unit attention after reset
  scsi-disk: fix cmd.mode field typo
  virtio-scsi: use virtqueue_map_sg() when loading requests

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/6b324b3e5906...5452b6f61ae9

reply via email to

[Prev in Thread] Current Thread [Next in Thread]