Commit 64145482 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull virtio updates from Michael Tsirkin:

 - vdpa sim refactoring

 - virtio mem: Big Block Mode support

 - misc cleanus, fixes

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (61 commits)
  vdpa: Use simpler version of ida allocation
  vdpa: Add missing comment for virtqueue count
  uapi: virtio_ids: add missing device type IDs from OASIS spec
  uapi: virtio_ids.h: consistent indentions
  vhost scsi: fix error return code in vhost_scsi_set_endpoint()
  virtio_ring: Fix two use after free bugs
  virtio_net: Fix error code in probe()
  virtio_ring: Cut and paste bugs in vring_create_virtqueue_packed()
  tools/virtio: add barrier for aarch64
  tools/virtio: add krealloc_array
  tools/virtio: include asm/bug.h
  vdpa/mlx5: Use write memory barrier after updating CQ index
  vdpa: split vdpasim to core and net modules
  vdpa_sim: split vdpasim_virtqueue's iov field in out_iov and in_iov
  vdpa_sim: make vdpasim->buffer size configurable
  vdpa_sim: use kvmalloc to allocate vdpasim->buffer
  vdpa_sim: set vringh notify callback
  vdpa_sim: add set_config callback in vdpasim_dev_attr
  vdpa_sim: add get_config callback in vdpasim_dev_attr
  vdpa_sim: make 'config' generic and usable for any device type
  ...
parents 58cf05f5 418eddef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3072,6 +3072,7 @@ static int virtnet_probe(struct virtio_device *vdev)
			dev_err(&vdev->dev,
				"device MTU appears to have changed it is now %d < %d",
				mtu, dev->min_mtu);
			err = -EINVAL;
			goto free;
		}

+9 −7
Original line number Diff line number Diff line
@@ -9,21 +9,24 @@ menuconfig VDPA
if VDPA

config VDPA_SIM
	tristate "vDPA device simulator"
	tristate "vDPA device simulator core"
	depends on RUNTIME_TESTING_MENU && HAS_DMA
	select DMA_OPS
	select VHOST_RING
	help
	  Enable this module to support vDPA device simulators. These devices
	  are used for testing, prototyping and development of vDPA.

config VDPA_SIM_NET
	tristate "vDPA simulator for networking device"
	depends on VDPA_SIM
	select GENERIC_NET_UTILS
	default n
	help
	  vDPA networking device simulator which loop TX traffic back
	  to RX. This device is used for testing, prototyping and
	  development of vDPA.
	  vDPA networking device simulator which loops TX traffic back to RX.

config IFCVF
	tristate "Intel IFC VF vDPA driver"
	depends on PCI_MSI
	default n
	help
	  This kernel module can drive Intel IFC VF NIC to offload
	  virtio dataplane traffic to hardware.
@@ -42,7 +45,6 @@ config MLX5_VDPA_NET
	tristate "vDPA driver for ConnectX devices"
	select MLX5_VDPA
	depends on MLX5_CORE
	default n
	help
	  VDPA network driver for ConnectX6 and newer. Provides offloading
	  of virtio net datapath such that descriptors put on the ring will
+2 −9
Original line number Diff line number Diff line
@@ -417,16 +417,9 @@ static int ifcvf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
		return ret;
	}

	ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
	if (ret) {
		IFCVF_ERR(pdev, "No usable DMA confiugration\n");
		return ret;
	}

	ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
	if (ret) {
		IFCVF_ERR(pdev,
			  "No usable coherent DMA confiugration\n");
		IFCVF_ERR(pdev, "No usable DMA configuration\n");
		return ret;
	}

+5 −0
Original line number Diff line number Diff line
@@ -479,6 +479,11 @@ static int mlx5_vdpa_poll_one(struct mlx5_vdpa_cq *vcq)
static void mlx5_vdpa_handle_completions(struct mlx5_vdpa_virtqueue *mvq, int num)
{
	mlx5_cq_set_ci(&mvq->cq.mcq);

	/* make sure CQ cosumer update is visible to the hardware before updating
	 * RX doorbell record.
	 */
	dma_wmb();
	rx_post(&mvq->vqqp, num);
	if (mvq->event_cb.callback)
		mvq->event_cb.callback(mvq->event_cb.private);
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
	if (!vdev)
		goto err;

	err = ida_simple_get(&vdpa_index_ida, 0, 0, GFP_KERNEL);
	err = ida_alloc(&vdpa_index_ida, GFP_KERNEL);
	if (err < 0)
		goto err_ida;

Loading