Skip to content

Commit 4b98d5d

Browse files
committed
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
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()
2 parents 4855215 + 9d89606 commit 4b98d5d

File tree

10 files changed

+438
-216
lines changed

10 files changed

+438
-216
lines changed

drivers/vdpa/mlx5/core/mr.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,12 @@ static void fill_indir(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_mr *mkey, v
190190
klm->bcount = cpu_to_be32(klm_bcount(dmr->end - dmr->start));
191191
preve = dmr->end;
192192
} else {
193+
u64 bcount = min_t(u64, dmr->start - preve, MAX_KLM_SIZE);
194+
193195
klm->key = cpu_to_be32(mvdev->res.null_mkey);
194-
klm->bcount = cpu_to_be32(klm_bcount(dmr->start - preve));
195-
preve = dmr->start;
196+
klm->bcount = cpu_to_be32(klm_bcount(bcount));
197+
preve += bcount;
198+
196199
goto again;
197200
}
198201
}

drivers/vdpa/mlx5/net/mlx5_vnet.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3884,6 +3884,9 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
38843884
ndev->mvdev.max_vqs = max_vqs;
38853885
mvdev = &ndev->mvdev;
38863886
mvdev->mdev = mdev;
3887+
/* cpu_to_mlx5vdpa16() below depends on this flag */
3888+
mvdev->actual_features =
3889+
(device_features & BIT_ULL(VIRTIO_F_VERSION_1));
38873890

38883891
ndev->vqs = kcalloc(max_vqs, sizeof(*ndev->vqs), GFP_KERNEL);
38893892
ndev->event_cbs = kcalloc(max_vqs + 1, sizeof(*ndev->event_cbs), GFP_KERNEL);

drivers/vdpa/vdpa_user/vduse_dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ static struct workqueue_struct *vduse_irq_bound_wq;
144144
static u32 allowed_device_id[] = {
145145
VIRTIO_ID_BLOCK,
146146
VIRTIO_ID_NET,
147+
VIRTIO_ID_FS,
147148
};
148149

149150
static inline struct vduse_dev *vdpa_to_vduse(struct vdpa_device *vdpa)

drivers/vhost/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ config VHOST_SCSI
4747
tristate "VHOST_SCSI TCM fabric driver"
4848
depends on TARGET_CORE && EVENTFD
4949
select VHOST
50+
select SG_POOL
5051
default n
5152
help
5253
Say M here to enable the vhost_scsi TCM fabric module

0 commit comments

Comments
 (0)