24 Jul, 2013

1 commit

  • Pull vhost fixes from Michael Tsirkin:
    "vhost: more fixes for 3.11

    This includes some fixes for vhost net and scsi drivers.

    The test module has already been reworked to avoid rcu usage, but the
    necessary core changes are missing, we fixed this.

    Unlikely to affect any real-world users, but it's early in the cycle
    so, let's merge them"

    (It was earlier when Michael originally sent the email, but it somehot
    got missed in the flood, so here it is after -rc2)

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    vhost: Remove custom vhost rcu usage
    vhost-scsi: Always access vq->private_data under vq mutex
    vhost-net: Always access vq->private_data under vq mutex

    Linus Torvalds
     

12 Jul, 2013

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "Lots of activity this round on performance improvements in target-core
    while benchmarking the prototype scsi-mq initiator code with
    vhost-scsi fabric ports, along with a number of iscsi/iser-target
    improvements and hardening fixes for exception path cases post v3.10
    merge.

    The highlights include:

    - Make persistent reservations APTPL buffer allocated on-demand, and
    drop per t10_reservation buffer. (grover)
    - Make virtual LUN=0 a NULLIO device, and skip allocation of NULLIO
    device pages (grover)
    - Add transport_cmd_check_stop write_pending bit to avoid extra
    access of ->t_state_lock is WRITE I/O submission fast-path. (nab)
    - Drop unnecessary CMD_T_DEV_ACTIVE check from
    transport_lun_remove_cmd to avoid extra access of ->t_state_lock in
    release fast-path. (nab)
    - Avoid extra t_state_lock access in __target_execute_cmd fast-path
    (nab)
    - Drop unnecessary vhost-scsi wait_for_tasks=true usage +
    ->t_state_lock access in release fast-path. (nab)
    - Convert vhost-scsi to use modern se_cmd->cmd_kref
    TARGET_SCF_ACK_KREF usage (nab)
    - Add tracepoints for SCSI commands being processed (roland)
    - Refactoring of iscsi-target handling of ISCSI_OP_NOOP +
    ISCSI_OP_TEXT to be transport independent (nab)
    - Add iscsi-target SendTargets=$IQN support for in-band discovery
    (nab)
    - Add iser-target support for in-band discovery (nab + Or)
    - Add iscsi-target demo-mode TPG authentication context support (nab)
    - Fix isert_put_reject payload buffer post (nab)
    - Fix iscsit_add_reject* usage for iser (nab)
    - Fix iscsit_sequence_cmd reject handling for iser (nab)
    - Fix ISCSI_OP_SCSI_TMFUNC handling for iser (nab)
    - Fix session reset bug with RDMA_CM_EVENT_DISCONNECTED (nab)

    The last five iscsi/iser-target items are CC'ed to stable, as they do
    address issues present in v3.10 code. They are certainly larger than
    I'd like for stable patch set, but are important to ensure proper
    REJECT exception handling in iser-target for 3.10.y"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (51 commits)
    iser-target: Ignore non TEXT + LOGOUT opcodes for discovery
    target: make queue_tm_rsp() return void
    target: remove unused codes from enum tcm_tmrsp_table
    iscsi-target: kstrtou* configfs attribute parameter cleanups
    iscsi-target: Fix tfc_tpg_auth_cit configfs length overflow
    iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow
    iser-target: Add support for ISCSI_OP_TEXT opcode + payload handling
    iser-target: Rename sense_buf_[dma,len] to pdu_[dma,len]
    iser-target: Add vendor_err debug output
    target: Add (obsolete) checking for PMI/LBA fields in READ CAPACITY(10)
    target: Return correct sense data for IO past the end of a device
    target: Add tracepoints for SCSI commands being processed
    iser-target: Fix session reset bug with RDMA_CM_EVENT_DISCONNECTED
    iscsi-target: Fix ISCSI_OP_SCSI_TMFUNC handling for iser
    iscsi-target: Fix iscsit_sequence_cmd reject handling for iser
    iscsi-target: Fix iscsit_add_reject* usage for iser
    iser-target: Fix isert_put_reject payload buffer post
    iscsi-target: missing kfree() on error path
    iscsi-target: Drop left-over iscsi_conn->bad_hdr
    target: Make core_scsi3_update_and_write_aptpl return sense_reason_t
    ...

    Linus Torvalds
     

11 Jul, 2013

3 commits


08 Jul, 2013

1 commit

  • The return value wasn't checked by any of the callers. Assuming this is
    correct behaviour, we can simplify some code by not bothering to
    generate it.

    nab: Add srpt_queue_data_in() + srpt_queue_tm_rsp() nops around
    srpt_queue_response() void return

    Signed-off-by: Joern Engel
    Signed-off-by: Nicholas Bellinger

    Joern Engel
     

07 Jul, 2013

10 commits


21 Jun, 2013

2 commits

  • This patch coverts vhost/scsi to se_cmd->cmd_kref TARGET_SCF_ACK_KREF
    usage, instead of assuming that vhost_scsi_free_cmd() is always called
    before TCM processing is completed in the response fast path.

    This includes adding vhost_scsi_check_stop_free() -> target_put_sess_cmd()
    to perform the second se_cmd->cmd_kref put, and moving vhost_scsi_free_cmd()
    resource release into tcm_vhost_release_cmd() that is invoked once the last
    se_cmd->cmd_kref put occurs.

    Cc: Christoph Hellwig
    Cc: Roland Dreier
    Cc: Kent Overstreet
    Cc: Asias He
    Cc: Michael S. Tsirkin
    Cc: Or Gerlitz
    Cc: Moussa Ba
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • This patch changes vhost_scsi_free_cmd() to call transport_generic_free_cmd()
    with wait_for_tasks=false in order to avoid the extra se_cmd->t_state_lock
    access for the wait_for_tasks=true case.

    This is unnecessary because vhost_scsi_free_cmd() is only ever called by
    vhost_scsi_complete_cmd_work() after TCM completion handoff, and by
    vhost_scsi_handle_vq() exception code before TCM submission handoff, so
    there is never a case where se_cmd is still active from TCM's perspective
    when transport_generic_free_cmd() is called.

    Cc: Christoph Hellwig
    Cc: Roland Dreier
    Cc: Kent Overstreet
    Cc: Asias He
    Cc: Michael S. Tsirkin
    Cc: Or Gerlitz
    Cc: Moussa Ba
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

11 Jun, 2013

3 commits

  • vhost_net_clear_ubuf_info didn't clear ubuf_info
    after kfree, this could trigger double free.
    Fix this and simplify this code to make it more robust: make sure
    ubuf info is always freed through vhost_net_clear_ubuf_info.

    Reported-by: Tommi Rantala
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • If device has an owner, we shouldn't touch ubuf_info
    since it might be in use.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • When we decide not use zero-copy, msg.control should be set to NULL otherwise
    macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs
    wrongly.

    Bug were introduced by commit cedb9bdce099206290a2bdd02ce47a7b253b6a84
    (vhost-net: skip head management if no outstanding).

    This solves the following warnings:

    WARNING: at include/linux/kref.h:47 handle_tx+0x477/0x4b0 [vhost_net]()
    Modules linked in: vhost_net macvtap macvlan tun nfsd exportfs bridge stp llc openvswitch kvm_amd kvm bnx2 megaraid_sas [last unloaded: tun]
    CPU: 5 PID: 8670 Comm: vhost-8668 Not tainted 3.10.0-rc2+ #1566
    Hardware name: Dell Inc. PowerEdge R715/00XHKG, BIOS 1.5.2 04/19/2011
    ffffffffa0198323 ffff88007c9ebd08 ffffffff81796b73 ffff88007c9ebd48
    ffffffff8103d66b 000000007b773e20 ffff8800779f0000 ffff8800779f43f0
    ffff8800779f8418 000000000000015c 0000000000000062 ffff88007c9ebd58
    Call Trace:
    [] dump_stack+0x19/0x1e
    [] warn_slowpath_common+0x6b/0xa0
    [] warn_slowpath_null+0x15/0x20
    [] handle_tx+0x477/0x4b0 [vhost_net]
    [] handle_tx_kick+0x10/0x20 [vhost_net]
    [] vhost_worker+0xfe/0x1a0 [vhost_net]
    [] ? vhost_attach_cgroups_work+0x30/0x30 [vhost_net]
    [] ? vhost_attach_cgroups_work+0x30/0x30 [vhost_net]
    [] kthread+0xc6/0xd0
    [] ? kthread_freezable_should_stop+0x70/0x70
    [] ret_from_fork+0x7c/0xb0
    [] ? kthread_freezable_should_stop+0x70/0x70

    Signed-off-by: Jason Wang
    Acked-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Jason Wang
     

08 May, 2013

2 commits

  • [ 624.286653] vringh: module license 'unspecified' taints kernel.

    Signed-off-by: Dave Jones
    Signed-off-by: Rusty Russell

    Dave Jones
     
  • Pull more vhost fixes from Michael Tsirkin:
    "This fixes some minor issues in the patches that have been merged.

    We also finally drop the workaround disabling event_idx for scsi: it
    was always questionable, and now we know it's not needed.

    There's also a memory leak fix"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    vhost-scsi: Enable VIRTIO_RING_F_EVENT_IDX
    vhost: drop virtio_net.h dependency
    vhost-net: Cleanup vhost_ubuf and vhost_zcopy
    vhost: Remove vhost_enable_zcopy in vhost.h
    vhost: Remove comments for hdr in vhost.h
    vhost: Move VHOST_NET_FEATURES to net.c
    vhost-net: Free ubuf when vhost_dev_set_owner fails
    vhost: Export vhost_dev_set_owner

    Linus Torvalds
     

07 May, 2013

1 commit

  • It was disabled as a workaround. Now userspace bits work fine with it.
    The broken version was not ever committed to QEMU, I guess the same is
    true for nlkt.

    So, let's enable it.

    Signed-off-by: Asias He
    Acked-by: Paolo Bonzini
    Signed-off-by: Michael S. Tsirkin

    Asias He
     

06 May, 2013

7 commits


03 May, 2013

1 commit

  • Pull virtio & lguest updates from Rusty Russell:
    "Lots of virtio work which wasn't quite ready for last merge window.

    Plus I dived into lguest again, reworking the pagetable code so we can
    move the switcher page: our fixmaps sometimes take more than 2MB now..."

    Ugh. Annoying conflicts with the tcm_vhost -> vhost_scsi rename.
    Hopefully correctly resolved.

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (57 commits)
    caif_virtio: Remove bouncing email addresses
    lguest: improve code readability in lg_cpu_start.
    virtio-net: fill only rx queues which are being used
    lguest: map Switcher below fixmap.
    lguest: cache last cpu we ran on.
    lguest: map Switcher text whenever we allocate a new pagetable.
    lguest: don't share Switcher PTE pages between guests.
    lguest: expost switcher_pages array (as lg_switcher_pages).
    lguest: extract shadow PTE walking / allocating.
    lguest: make check_gpte et. al return bool.
    lguest: assume Switcher text is a single page.
    lguest: rename switcher_page to switcher_pages.
    lguest: remove RESERVE_MEM constant.
    lguest: check vaddr not pgd for Switcher protection.
    lguest: prepare to make SWITCHER_ADDR a variable.
    virtio: console: replace EMFILE with EBUSY for already-open port
    virtio-scsi: reset virtqueue affinity when doing cpu hotplug
    virtio-scsi: introduce multiqueue support
    virtio-scsi: push vq lock/unlock into virtscsi_vq_done
    virtio-scsi: pass struct virtio_scsi to virtqueue completion function
    ...

    Linus Torvalds
     

02 May, 2013

3 commits


01 May, 2013

5 commits