Commit 4b98d5dc authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull virtio updates from Michael Tsirkin:
 "A small number of improvements all over the place:

   - shutdown has been reworked to reset devices

   - virtio fs is now allowed in vduse

   - vhost-scsi memory use has been reduced

   - cleanups, fixes all over the place

  A couple more fixes are being tested and will be merged after rc1"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vhost-scsi: Reduce response iov mem use
  vhost-scsi: Allocate iov_iter used for unaligned copies when needed
  vhost-scsi: Stop duplicating se_cmd fields
  vhost-scsi: Dynamically allocate scatterlists
  vhost-scsi: Return queue full for page alloc failures during copy
  vhost-scsi: Add better resource allocation failure handling
  vhost-scsi: Allocate T10 PI structs only when enabled
  vhost-scsi: Reduce mem use by moving upages to per queue
  vduse: add virtio_fs to allowed dev id
  sound/virtio: Fix cancel_sync warnings on uninitialized work_structs
  vdpa/mlx5: Fix oversized null mkey longer than 32bit
  vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines
  vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
  tools: virtio/linux/module.h add MODULE_DESCRIPTION() define.
  tools: virtio/linux/compiler.h: Add data_race() define.
  tools/virtio: Add DMA_MAPPING_ERROR and sg_dma_len api define for virtio test
  virtio: break and reset virtio devices on device_shutdown()
parents 48552153 9d896067
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -190,9 +190,12 @@ static void fill_indir(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *mkey, v
			klm->bcount = cpu_to_be32(klm_bcount(dmr->end - dmr->start));
			preve = dmr->end;
		} else {
			u64 bcount = min_t(u64, dmr->start - preve, MAX_KLM_SIZE);

			klm->key = cpu_to_be32(mvdev->res.null_mkey);
			klm->bcount = cpu_to_be32(klm_bcount(dmr->start - preve));
			preve = dmr->start;
			klm->bcount = cpu_to_be32(klm_bcount(bcount));
			preve += bcount;

			goto again;
		}
	}
+3 −0
Original line number Diff line number Diff line
@@ -3884,6 +3884,9 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
	ndev->mvdev.max_vqs = max_vqs;
	mvdev = &ndev->mvdev;
	mvdev->mdev = mdev;
	/* cpu_to_mlx5vdpa16() below depends on this flag */
	mvdev->actual_features =
			(device_features & BIT_ULL(VIRTIO_F_VERSION_1));

	ndev->vqs = kcalloc(max_vqs, sizeof(*ndev->vqs), GFP_KERNEL);
	ndev->event_cbs = kcalloc(max_vqs + 1, sizeof(*ndev->event_cbs), GFP_KERNEL);
+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ static struct workqueue_struct *vduse_irq_bound_wq;
static u32 allowed_device_id[] = {
	VIRTIO_ID_BLOCK,
	VIRTIO_ID_NET,
	VIRTIO_ID_FS,
};

static inline struct vduse_dev *vdpa_to_vduse(struct vdpa_device *vdpa)
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ config VHOST_SCSI
	tristate "VHOST_SCSI TCM fabric driver"
	depends on TARGET_CORE && EVENTFD
	select VHOST
	select SG_POOL
	default n
	help
	Say M here to enable the vhost_scsi TCM fabric module
+339 −208

File changed.

Preview size limit exceeded, changes collapsed.

Loading