13 Jan, 2021

1 commit

  • [ Upstream commit 01e31bea7e622f1890c274f4aaaaf8bccd296aa5 ]

    Currently the vhost_zerocopy_callback() maybe be called to decrease
    the refcount when sendmsg fails in tun. The error handling in vhost
    handle_tx_zerocopy() will try to decrease the same refcount again.
    This is wrong. To fix this issue, we only call vhost_net_ubuf_put()
    when vq->heads[nvq->desc].len == VHOST_DMA_IN_PROGRESS.

    Fixes: bab632d69ee4 ("vhost: vhost TX zero-copy support")
    Signed-off-by: Yunjian Wang
    Acked-by: Willem de Bruijn
    Acked-by: Michael S. Tsirkin
    Acked-by: Jason Wang
    Link: https://lore.kernel.org/r/1609207308-20544-1-git-send-email-wangyunjian@huawei.com
    Signed-off-by: Jakub Kicinski
    Signed-off-by: Greg Kroah-Hartman

    Yunjian Wang
     

30 Dec, 2020

1 commit

  • [ Upstream commit 2e1139d613c7fb0956e82f72a8281c0a475ad4f8 ]

    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.

    Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session")
    Reported-by: Hulk Robot
    Signed-off-by: Zhang Changzhong
    Link: https://lore.kernel.org/r/1607071411-33484-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Sasha Levin

    Zhang Changzhong
     

02 Dec, 2020

1 commit

  • The copy_to_user() function returns the number of bytes remaining to be
    copied but this should return -EFAULT to the user.

    Fixes: 1b48dc03e575 ("vhost: vdpa: report iova range")
    Signed-off-by: Dan Carpenter
    Link: https://lore.kernel.org/r/X8c32z5EtDsMyyIL@mwanda
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang
    Reviewed-by: Stefano Garzarella

    Dan Carpenter
     

25 Nov, 2020

3 commits

  • Pinned pages are not properly accounted particularly when
    mapping error occurs on IOTLB update. Clean up dangling
    pinned pages for the error path.

    The memory usage for bookkeeping pinned pages is reverted
    to what it was before: only one single free page is needed.
    This helps reduce the host memory demand for VM with a large
    amount of memory, or in the situation where host is running
    short of free memory.

    Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
    Signed-off-by: Si-Wei Liu
    Link: https://lore.kernel.org/r/1604618793-4681-1-git-send-email-si-wei.liu@oracle.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Si-Wei Liu
     
  • vringh_iov_push_*() functions don't have 'dst' parameter, but have
    the 'src' parameter.

    Replace 'dst' description with 'src' description.

    Signed-off-by: Stefano Garzarella
    Link: https://lore.kernel.org/r/20201116161653.102904-1-sgarzare@redhat.com
    Signed-off-by: Michael S. Tsirkin

    Stefano Garzarella
     
  • vhost scsi owns the scsi se_cmd but lio frees the se_cmd->se_tmr
    before calling release_cmd, so while with normal cmd completion we
    can access the se_cmd from the vhost work, we can't do the same with
    se_cmd->se_tmr. This has us copy the tmf response in
    vhost_scsi_queue_tm_rsp to our internal vhost-scsi tmf struct for
    when it gets sent to the guest from our worker thread.

    Fixes: efd838fec17b ("vhost scsi: Add support for LUN resets.")
    Signed-off-by: Mike Christie
    Acked-by: Stefan Hajnoczi
    Link: https://lore.kernel.org/r/1605887459-3864-1-git-send-email-michael.christie@oracle.com
    Signed-off-by: Michael S. Tsirkin

    Mike Christie
     

16 Nov, 2020

5 commits

  • In newer versions of virtio-scsi we just reset the timer when an a
    command times out, so TMFs are never sent for the cmd time out case.
    However, in older kernels and for the TMF inject cases, we can still get
    resets and we end up just failing immediately so the guest might see the
    device get offlined and IO errors.

    For the older kernel cases, we want the same end result as the
    modern virtio-scsi driver where we let the lower levels fire their error
    handling and handle the problem. And at the upper levels we want to
    wait. This patch ties the LUN reset handling into the LIO TMF code which
    will just wait for outstanding commands to complete like we are doing in
    the modern virtio-scsi case.

    Note: I did not handle the ABORT case to keep this simple. For ABORTs
    LIO just waits on the cmd like how it does for the RESET case. If
    an ABORT fails, the guest OS ends up escalating to LUN RESET, so in
    the end we get the same behavior where we wait on the outstanding
    cmds.

    Signed-off-by: Mike Christie
    Link: https://lore.kernel.org/r/1604986403-4931-6-git-send-email-michael.christie@oracle.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Stefan Hajnoczi

    Mike Christie
     
  • Move code to parse lun from req's lun_buf to helper, so tmf code
    can use it in the next patch.

    Signed-off-by: Mike Christie
    Reviewed-by: Paolo Bonzini
    Acked-by: Jason Wang
    Link: https://lore.kernel.org/r/1604986403-4931-5-git-send-email-michael.christie@oracle.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Stefan Hajnoczi

    Mike Christie
     
  • We might not do the final se_cmd put from vhost_scsi_complete_cmd_work.
    When the last put happens a little later then we could race where
    vhost_scsi_complete_cmd_work does vhost_signal, the guest runs and sends
    more IO, and vhost_scsi_handle_vq runs but does not find any free cmds.

    This patch has us delay completing the cmd until the last lio core ref
    is dropped. We then know that once we signal to the guest that the cmd
    is completed that if it queues a new command it will find a free cmd.

    Signed-off-by: Mike Christie
    Reviewed-by: Maurizio Lombardi
    Link: https://lore.kernel.org/r/1604986403-4931-4-git-send-email-michael.christie@oracle.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Stefan Hajnoczi

    Mike Christie
     
  • We currently are limited to 256 cmds per session. This leads to problems
    where if the user has increased virtqueue_size to more than 2 or
    cmd_per_lun to more than 256 vhost_scsi_get_tag can fail and the guest
    will get IO errors.

    This patch moves the cmd allocation to per vq so we can easily match
    whatever the user has specified for num_queues and
    virtqueue_size/cmd_per_lun. It also makes it easier to control how much
    memory we preallocate. For cases, where perf is not as important and
    we can use the current defaults (1 vq and 128 cmds per vq) memory use
    from preallocate cmds is cut in half. For cases, where we are willing
    to use more memory for higher perf, cmd mem use will now increase as
    the num queues and queue depth increases.

    Signed-off-by: Mike Christie
    Link: https://lore.kernel.org/r/1604986403-4931-3-git-send-email-michael.christie@oracle.com
    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Maurizio Lombardi
    Acked-by: Stefan Hajnoczi

    Mike Christie
     
  • This adds a helper check if a vq has been setup. The next patches
    will use this when we move the vhost scsi cmd preallocation from per
    session to per vq. In the per vq case, we only want to allocate cmds
    for vqs that have actually been setup and not for all the possible
    vqs.

    Signed-off-by: Mike Christie
    Link: https://lore.kernel.org/r/1604986403-4931-2-git-send-email-michael.christie@oracle.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang
    Acked-by: Stefan Hajnoczi

    Mike Christie
     

30 Oct, 2020

3 commits

  • LKP considered variable 'ret' in vhost_vdpa_setup_vq_irq() as
    a unused variable, so suggest we remove it. Actually it stores
    return value of irq_bypass_register_producer(), but we did not
    check it, we should handle the failure case.

    This commit will print a message if irq bypass register producer
    fail, in this case, vqs still remain functional.

    Signed-off-by: Zhu Lingshan
    Reported-by: kernel test robot
    Link: https://lore.kernel.org/r/20201023104046.404794-1-lingshan.zhu@intel.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Zhu Lingshan
     
  • This reverts commit 7ed9e3d97c32d969caded2dfb6e67c1a2cc5a0b1.

    The patch creates a DoS risk since it can result in a high order memory
    allocation.

    Fixes: 7ed9e3d97c32d ("vhost-vdpa: fix page pinning leakage in error path")
    Cc: stable@vger.kernel.org
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • The copy_to/from_user() functions return the number of bytes which we
    weren't able to copy but the ioctl should return -EFAULT if they fail.

    Fixes: a127c5bbb6a8 ("vhost-vdpa: fix backend feature ioctls")
    Signed-off-by: Dan Carpenter
    Link: https://lore.kernel.org/r/20201023120853.GI282278@mwanda
    Signed-off-by: Michael S. Tsirkin
    Cc: stable@vger.kernel.org
    Acked-by: Jason Wang

    Dan Carpenter
     

23 Oct, 2020

1 commit

  • This patch introduces a new ioctl for vhost-vdpa device that can
    report the iova range by the device.

    For device that implements get_iova_range() method, we fetch it from
    the vDPA device. If device doesn't implement get_iova_range() but
    depends on platform IOMMU, we will query via DOMAIN_ATTR_GEOMETRY,
    otherwise [0, ULLONG_MAX] is assumed.

    For safety, this patch also rules out the map request which is not in
    the valid range.

    Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20201023090043.14430-3-jasowang@redhat.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     

21 Oct, 2020

4 commits

  • This commit removed unnecessary spin_locks in vhost_vring_call
    and related operations. Because we manipulate irq offloading
    contents in vhost_vdpa ioctl code path which is already
    protected by dev mutex and vq mutex.

    Signed-off-by: Zhu Lingshan
    Link: https://lore.kernel.org/r/20200909065234.3313-1-lingshan.zhu@intel.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Zhu Lingshan
     
  • If riov and wiov are both defined and they point to different
    objects, only riov is initialized. If the wiov is not initialized
    by the caller, the function fails returning -EINVAL and printing
    "Readable desc 0x... after writable" error message.

    This issue happens when descriptors have both readable and writable
    buffers (eg. virtio-blk devices has virtio_blk_outhdr in the readable
    buffer and status as last byte of writable buffer) and we call
    __vringh_iov() to get both type of buffers in two different iovecs.

    Let's replace the 'else if' clause with 'if' to initialize both
    riov and wiov if they are not NULL.

    As checkpatch pointed out, we also avoid crashing the kernel
    when riov and wiov are both NULL, replacing BUG() with WARN_ON()
    and returning -EINVAL.

    Fixes: f87d0fbb5798 ("vringh: host-side implementation of virtio rings.")
    Cc: stable@vger.kernel.org
    Signed-off-by: Stefano Garzarella
    Link: https://lore.kernel.org/r/20201008204256.162292-1-sgarzare@redhat.com
    Signed-off-by: Michael S. Tsirkin

    Stefano Garzarella
     
  • linux/kernel.h is included more than once, Remove the one that isn't
    necessary.

    Signed-off-by: Tian Tao
    Link: https://lore.kernel.org/r/1600131102-24672-1-git-send-email-tiantao6@hisilicon.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Tian Tao
     
  • Fix the warning: [-Werror=-Wframe-larger-than=]

    drivers/vhost/vhost.c: In function log_used:
    drivers/vhost/vhost.c:1906:1:
    warning: the frame size of 1040 bytes is larger than 1024 bytes

    Signed-off-by: Li Wang
    Link: https://lore.kernel.org/r/1600106889-25013-1-git-send-email-li.wang@windriver.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Li Wang
     

04 Oct, 2020

5 commits

  • Pinned pages are not properly accounted particularly when
    mapping error occurs on IOTLB update. Clean up dangling
    pinned pages for the error path. As the inflight pinned
    pages, specifically for memory region that strides across
    multiple chunks, would need more than one free page for
    book keeping and accounting. For simplicity, pin pages
    for all memory in the IOVA range in one go rather than
    have multiple pin_user_pages calls to make up the entire
    region. This way it's easier to track and account the
    pages already mapped, particularly for clean-up in the
    error path.

    Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
    Signed-off-by: Si-Wei Liu
    Link: https://lore.kernel.org/r/1601701330-16837-3-git-send-email-si-wei.liu@oracle.com
    Signed-off-by: Michael S. Tsirkin

    Si-Wei Liu
     
  • vhost_vdpa_map() should remove the iotlb entry just added
    if the corresponding mapping fails to set up properly.

    Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
    Signed-off-by: Si-Wei Liu
    Link: https://lore.kernel.org/r/1601701330-16837-2-git-send-email-si-wei.liu@oracle.com
    Signed-off-by: Michael S. Tsirkin

    Si-Wei Liu
     
  • When the IOTLB device is enabled, the log_guest_addr that is passed by
    userspace to the VHOST_SET_VRING_ADDR ioctl, and which is then written
    to vq->log_addr, is a GIOVA. All writes to this address are translated
    by log_user() to writes to an HVA, and then ultimately logged through
    the corresponding GPAs in log_write_hva(). No logging will ever occur
    with vq->log_addr in this case. It is thus wrong to pass vq->log_addr
    and log_guest_addr to log_access_vq() which assumes they are actual
    GPAs.

    Introduce a new vq_log_used_access_ok() helper that only checks accesses
    to the log for the used structure when there isn't an IOTLB device around.

    Signed-off-by: Greg Kurz
    Link: https://lore.kernel.org/r/160171933385.284610.10189082586063280867.stgit@bahia.lan
    Signed-off-by: Michael S. Tsirkin

    Greg Kurz
     
  • The open-coded computation of the used size doesn't take the event
    into account when the VIRTIO_RING_F_EVENT_IDX feature is present.
    Fix that by using vhost_get_used_size().

    Fixes: 8ea8cf89e19a ("vhost: support event index")
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kurz
    Link: https://lore.kernel.org/r/160171932300.284610.11846106312938909461.stgit@bahia.lan
    Signed-off-by: Michael S. Tsirkin

    Greg Kurz
     
  • When the IOTLB device is enabled, the vring addresses we get
    from userspace are GIOVAs. It is thus wrong to pass them down
    to access_ok() which only takes HVAs.

    Access validation is done at prefetch time with IOTLB. Teach
    vq_access_ok() about that by moving the (vq->iotlb) check
    from vhost_vq_access_ok() to vq_access_ok(). This prevents
    vhost_vring_set_addr() to fail when verifying the accesses.
    No behavior change for vhost_vq_access_ok().

    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1883084
    Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API")
    Cc: jasowang@redhat.com
    CC: stable@vger.kernel.org # 4.14+
    Signed-off-by: Greg Kurz
    Acked-by: Jason Wang
    Link: https://lore.kernel.org/r/160171931213.284610.2052489816407219136.stgit@bahia.lan
    Signed-off-by: Michael S. Tsirkin

    Greg Kurz
     

30 Sep, 2020

1 commit

  • We must free the vqs array in the open failure path, because
    vhost_vdpa_release will not be called.

    Signed-off-by: Mike Christie
    Link: https://lore.kernel.org/r/1600712588-9514-2-git-send-email-michael.christie@oracle.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Mike Christie
     

24 Sep, 2020

2 commits

  • Commit 653055b9acd4 ("vhost-vdpa: support get/set backend features")
    introduces two malfunction backend features ioctls:

    1) the ioctls was blindly added to vring ioctl instead of vdpa device
    ioctl
    2) vhost_set_backend_features() was called when dev mutex has already
    been held which will lead a deadlock

    This patch fixes the above issues.

    Cc: Eli Cohen
    Reported-by: Zhu Lingshan
    Fixes: 653055b9acd4 ("vhost-vdpa: support get/set backend features")
    Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20200907104343.31141-1-jasowang@redhat.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     
  • Fix documentation to match actual function prototypes

    "end" used instead of "last". Fix that.

    Signed-off-by: Eli Cohen
    Link: https://lore.kernel.org/r/20200630052925.GA157062@mtl-vdi-166.wap.labs.mlnx
    Signed-off-by: Michael S. Tsirkin

    Eli Cohen
     

04 Sep, 2020

1 commit

  • Pull networking fixes from David Miller:

    1) Use netif_rx_ni() when necessary in batman-adv stack, from Jussi
    Kivilinna.

    2) Fix loss of RTT samples in rxrpc, from David Howells.

    3) Memory leak in hns_nic_dev_probe(), from Dignhao Liu.

    4) ravb module cannot be unloaded, fix from Yuusuke Ashizuka.

    5) We disable BH for too lokng in sctp_get_port_local(), add a
    cond_resched() here as well, from Xin Long.

    6) Fix memory leak in st95hf_in_send_cmd, from Dinghao Liu.

    7) Out of bound access in bpf_raw_tp_link_fill_link_info(), from
    Yonghong Song.

    8) Missing of_node_put() in mt7530 DSA driver, from Sumera
    Priyadarsini.

    9) Fix crash in bnxt_fw_reset_task(), from Michael Chan.

    10) Fix geneve tunnel checksumming bug in hns3, from Yi Li.

    11) Memory leak in rxkad_verify_response, from Dinghao Liu.

    12) In tipc, don't use smp_processor_id() in preemptible context. From
    Tuong Lien.

    13) Fix signedness issue in mlx4 memory allocation, from Shung-Hsi Yu.

    14) Missing clk_disable_prepare() in gemini driver, from Dan Carpenter.

    15) Fix ABI mismatch between driver and firmware in nfp, from Louis
    Peens.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (110 commits)
    net/smc: fix sock refcounting in case of termination
    net/smc: reset sndbuf_desc if freed
    net/smc: set rx_off for SMCR explicitly
    net/smc: fix toleration of fake add_link messages
    tg3: Fix soft lockup when tg3_reset_task() fails.
    doc: net: dsa: Fix typo in config code sample
    net: dp83867: Fix WoL SecureOn password
    nfp: flower: fix ABI mismatch between driver and firmware
    tipc: fix shutdown() of connectionless socket
    ipv6: Fix sysctl max for fib_multipath_hash_policy
    drivers/net/wan/hdlc: Change the default of hard_header_len to 0
    net: gemini: Fix another missing clk_disable_unprepare() in probe
    net: bcmgenet: fix mask check in bcmgenet_validate_flow()
    amd-xgbe: Add support for new port mode
    net: usb: dm9601: Add USB ID of Keenetic Plus DSL
    vhost: fix typo in error message
    net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init()
    pktgen: fix error message with wrong function name
    net: ethernet: ti: am65-cpsw: fix rmii 100Mbit link mode
    cxgb4: fix thermal zone device registration
    ...

    Linus Torvalds
     

02 Sep, 2020

1 commit

  • "enable" should be "disable" when the function name is
    vhost_disable_notify(), which does the disabling work.

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

    Yunsheng Lin
     

26 Aug, 2020

1 commit


12 Aug, 2020

1 commit

  • Pull virtio updates from Michael Tsirkin:

    - IRQ bypass support for vdpa and IFC

    - MLX5 vdpa driver

    - Endianness fixes for virtio drivers

    - Misc other fixes

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (71 commits)
    vdpa/mlx5: fix up endian-ness for mtu
    vdpa: Fix pointer math bug in vdpasim_get_config()
    vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config()
    vdpa/mlx5: fix memory allocation failure checks
    vdpa/mlx5: Fix uninitialised variable in core/mr.c
    vdpa_sim: init iommu lock
    virtio_config: fix up warnings on parisc
    vdpa/mlx5: Add VDPA driver for supported mlx5 devices
    vdpa/mlx5: Add shared memory registration code
    vdpa/mlx5: Add support library for mlx5 VDPA implementation
    vdpa/mlx5: Add hardware descriptive header file
    vdpa: Modify get_vq_state() to return error code
    net/vdpa: Use struct for set/get vq state
    vdpa: remove hard coded virtq num
    vdpasim: support batch updating
    vhost-vdpa: support IOTLB batching hints
    vhost-vdpa: support get/set backend features
    vhost: generialize backend features setting/getting
    vhost-vdpa: refine ioctl pre-processing
    vDPA: dont change vq irq after DRIVER_OK
    ...

    Linus Torvalds
     

06 Aug, 2020

7 commits

  • Modify get_vq_state() so it returns an error code. In case of hardware
    acceleration, the available index may be retrieved from the device, an
    operation that can possibly fail.

    Reviewed-by: Parav Pandit
    Signed-off-by: Eli Cohen
    Link: https://lore.kernel.org/r/20200804162048.22587-9-eli@mellanox.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Eli Cohen
     
  • For now VQ state involves 16 bit available index value encoded in u64
    variable. In the future it will be extended to contain more fields. Use
    struct to contain the state, now containing only a single u16 for the
    available index. In the future we can add fields to this struct.

    Reviewed-by: Parav Pandit
    Acked-by: Jason Wang
    Signed-off-by: Eli Cohen
    Link: https://lore.kernel.org/r/20200804162048.22587-8-eli@mellanox.com
    Signed-off-by: Michael S. Tsirkin

    Eli Cohen
     
  • This will enable vdpa providers to add support for multi queue feature
    and publish it to upper layers (vhost and virtio).

    Signed-off-by: Max Gurtovoy
    Reviewed-by: Jason Wang
    Link: https://lore.kernel.org/r/20200804162048.22587-7-eli@mellanox.com
    Signed-off-by: Michael S. Tsirkin

    Max Gurtovoy
     
  • This patches extend the vhost IOTLB API to accept batch updating hints
    form userspace. When userspace wants update the device IOTLB in a
    batch, it may do:

    1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag
    2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE
    3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag

    Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when
    vDPA device support set_map() ops. This is useful for the vDPA device
    that want to know all the mappings to tweak their own DMA translation
    logic.

    For vDPA device that doesn't require set_map(), no behavior changes.

    This capability is advertised via VHOST_BACKEND_F_IOTLB_BATCH capability.

    Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20200804162048.22587-5-eli@mellanox.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     
  • This patch makes userspace can get and set backend features to
    vhost-vdpa.

    Signed-off-by: Cindy Lu
    Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20200804162048.22587-4-eli@mellanox.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     
  • Move the backend features setting/getting from net.c to vhost.c to be
    reused by vhost-vdpa.

    Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20200804162048.22587-3-eli@mellanox.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     
  • Switch to use 'switch' to make the codes more easier to be extended.

    Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20200804162048.22587-2-eli@mellanox.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     

05 Aug, 2020

2 commits

  • IRQ of a vq is not expected to be changed in a DRIVER_OK ~ !DRIVER_OK
    period for irq offloading purposes. Place this comment at the side of
    bus ops get_vq_irq than in set_status in vhost_vdpa.

    Signed-off-by: Zhu Lingshan
    Link: https://lore.kernel.org/r/20200804102123.69978-1-lingshan.zhu@intel.com
    Signed-off-by: Michael S. Tsirkin

    Zhu Lingshan
     
  • This patch introduce a set of functions for setup/unsetup
    and update irq offloading respectively by register/unregister
    and re-register the irq_bypass_producer.

    With these functions, this commit can setup/unsetup
    irq offloading through setting DRIVER_OK/!DRIVER_OK, and
    update irq offloading through SET_VRING_CALL.

    Signed-off-by: Zhu Lingshan
    Suggested-by: Jason Wang
    Link: https://lore.kernel.org/r/20200731065533.4144-5-lingshan.zhu@intel.com
    Signed-off-by: Michael S. Tsirkin

    Zhu Lingshan