Displaying 8 results from an estimated 8 matches for "virtio_mdev_readl".
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...virtio_device vdev;
+ struct mdev_device *mdev;
+ unsigned long version;
+
+ struct virtqueue **vqs;
+ spinlock_t lock;
+};
+
+struct virtio_mdev_vq_info {
+ /* the actual virtqueue */
+ struct virtqueue *vq;
+
+ /* the list node for the virtqueues list */
+ struct list_head node;
+};
+
+static u32 virtio_mdev_readl(struct mdev_device *mdev,
+ loff_t off)
+{
+ struct mdev_parent *parent = mdev->parent;
+ ssize_t len;
+ u32 val;
+
+ if (unlikely(!parent->ops->read))
+ return 0xFFFFFFFF;
+
+ len = parent->ops->read(mdev, (char *)&val, 4, &off);
+ if (len != 4)
+ return 0xFFFFFFFF;...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...n;
> +
> + struct virtqueue **vqs;
> + spinlock_t lock;
> +};
> +
> +struct virtio_mdev_vq_info {
> + /* the actual virtqueue */
> + struct virtqueue *vq;
> +
> + /* the list node for the virtqueues list */
> + struct list_head node;
> +};
> +
> +static u32 virtio_mdev_readl(struct mdev_device *mdev,
> + loff_t off)
> +{
> + struct mdev_parent *parent = mdev->parent;
> + ssize_t len;
> + u32 val;
> +
> + if (unlikely(!parent->ops->read))
> + return 0xFFFFFFFF;
> +
> + len = parent->ops->read(mdev, (char *)&val, 4...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...n;
> +
> + struct virtqueue **vqs;
> + spinlock_t lock;
> +};
> +
> +struct virtio_mdev_vq_info {
> + /* the actual virtqueue */
> + struct virtqueue *vq;
> +
> + /* the list node for the virtqueues list */
> + struct list_head node;
> +};
> +
> +static u32 virtio_mdev_readl(struct mdev_device *mdev,
> + loff_t off)
> +{
> + struct mdev_parent *parent = mdev->parent;
> + ssize_t len;
> + u32 val;
> +
> + if (unlikely(!parent->ops->read))
> + return 0xFFFFFFFF;
> +
> + len = parent->ops->read(mdev, (char *)&val, 4...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...uct vfio_group *vfio_group;
> + struct vfio_device *vfio_device;
> + struct mdev_device *mdev;
> +};
> +
> +/*
> + * XXX
> + * We assume virtio_mdev.ko exposes below symbols for now, as we
> + * don't have a proper way to access parent ops directly yet.
> + *
> + * virtio_mdev_readl()
> + * virtio_mdev_writel()
> + */
> +extern u32 virtio_mdev_readl(struct mdev_device *mdev, loff_t off);
> +extern void virtio_mdev_writel(struct mdev_device *mdev, loff_t off, u32 val);
Need to consider a better approach, I feel we should do it through some
kind of mdev driver ins...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...state;
+ u64 features;
+ u64 acked_features;
+ struct vfio_group *vfio_group;
+ struct vfio_device *vfio_device;
+ struct mdev_device *mdev;
+};
+
+/*
+ * XXX
+ * We assume virtio_mdev.ko exposes below symbols for now, as we
+ * don't have a proper way to access parent ops directly yet.
+ *
+ * virtio_mdev_readl()
+ * virtio_mdev_writel()
+ */
+extern u32 virtio_mdev_readl(struct mdev_device *mdev, loff_t off);
+extern void virtio_mdev_writel(struct mdev_device *mdev, loff_t off, u32 val);
+
+static u8 mdev_get_status(struct mdev_device *mdev)
+{
+ return virtio_mdev_readl(mdev, VIRTIO_MDEV_STATUS);
+}
+
+...
2019 Sep 10
8
[RFC PATCH 0/4] mdev based hardware virtio offloading support
Hi all:
There are hardware that can do virtio datapath offloading while having
its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver to
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas,
a) Build vhost-mdev on top of the same abstraction defined in
the virtio-mdev series [1];
b) Introduce /dev/vhost-mdev to do vhost ioctls and support
setting mdev device as backend;
Now the userspace API looks like this:
- Userspace generates a compatible mdev device;
- Userspace opens this mdev device with VFIO API (including
doing IOMMU
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas,
a) Build vhost-mdev on top of the same abstraction defined in
the virtio-mdev series [1];
b) Introduce /dev/vhost-mdev to do vhost ioctls and support
setting mdev device as backend;
Now the userspace API looks like this:
- Userspace generates a compatible mdev device;
- Userspace opens this mdev device with VFIO API (including
doing IOMMU