search for: virtio_mdev_queue_ready

Displaying 18 results from an estimated 18 matches for "virtio_mdev_queue_ready".

2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...t; + int err; > + > + if (!name) > + return NULL; > + > + /* Select the queue we're interested in */ > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_SEL, index); > + > + /* Queue shouldn't already be set up. */ > + if (virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY)) { > + err = -ENOENT; > + goto error_available; > + } > + > + /* Allocate and fill out our active queue description */ > + info = kmalloc(sizeof(*info), GFP_KERNEL); > + if (!info) { > + err = -ENOMEM; > + goto error_kmalloc; > + } > + > + num = virtio_mdev_...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...t; + int err; > + > + if (!name) > + return NULL; > + > + /* Select the queue we're interested in */ > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_SEL, index); > + > + /* Queue shouldn't already be set up. */ > + if (virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY)) { > + err = -ENOENT; > + goto error_available; > + } > + > + /* Allocate and fill out our active queue description */ > + info = kmalloc(sizeof(*info), GFP_KERNEL); > + if (!info) { > + err = -ENOMEM; > + goto error_kmalloc; > + } > + > + num = virtio_mdev_...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...igned long flags; + u32 align, num; + u64 addr; + int err; + + if (!name) + return NULL; + + /* Select the queue we're interested in */ + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_SEL, index); + + /* Queue shouldn't already be set up. */ + if (virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY)) { + err = -ENOENT; + goto error_available; + } + + /* Allocate and fill out our active queue description */ + info = kmalloc(sizeof(*info), GFP_KERNEL); + if (!info) { + err = -ENOMEM; + goto error_kmalloc; + } + + num = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_NUM_MAX); + if (num...
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 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...VIRTIO_MDEV_QUEUE_NUM_MAX 0x034 > > > + > > > +/* Queue size for the currently selected queue - Write Only */ > > > +#define VIRTIO_MDEV_QUEUE_NUM 0x038 > > > + > > > +/* Ready bit for the currently selected queue - Read Write */ > > > +#define VIRTIO_MDEV_QUEUE_READY 0x044 > > Is this same as started? > > > Do you mean "status"? I really meant "enabled", didn't remember the correct name. As in: VIRTIO_PCI_COMMON_Q_ENABLE > > > > > > + > > > +/* Alignment of virtqueue - Read Only */ > &...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...VIRTIO_MDEV_QUEUE_NUM_MAX 0x034 > > > + > > > +/* Queue size for the currently selected queue - Write Only */ > > > +#define VIRTIO_MDEV_QUEUE_NUM 0x038 > > > + > > > +/* Ready bit for the currently selected queue - Read Write */ > > > +#define VIRTIO_MDEV_QUEUE_READY 0x044 > > Is this same as started? > > > Do you mean "status"? I really meant "enabled", didn't remember the correct name. As in: VIRTIO_PCI_COMMON_Q_ENABLE > > > > > > + > > > +/* Alignment of virtqueue - Read Only */ > &...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ue - Read Only */ >> +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034 >> + >> +/* Queue size for the currently selected queue - Write Only */ >> +#define VIRTIO_MDEV_QUEUE_NUM 0x038 >> + >> +/* Ready bit for the currently selected queue - Read Write */ >> +#define VIRTIO_MDEV_QUEUE_READY 0x044 > Is this same as started? Do you mean "status"? > >> + >> +/* Alignment of virtqueue - Read Only */ >> +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 >> + >> +/* Queue notifier - Write Only */ >> +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 >&g...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...f the currently selected queue - Read Only */ > +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034 > + > +/* Queue size for the currently selected queue - Write Only */ > +#define VIRTIO_MDEV_QUEUE_NUM 0x038 > + > +/* Ready bit for the currently selected queue - Read Write */ > +#define VIRTIO_MDEV_QUEUE_READY 0x044 > + > +/* Alignment of virtqueue - Read Only */ > +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 > + > +/* Queue notifier - Write Only */ > +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 > + > +/* Device status register - Read Write */ > +#define VIRTIO_MDEV_STATUS 0x060 > +...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...f the currently selected queue - Read Only */ > +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034 > + > +/* Queue size for the currently selected queue - Write Only */ > +#define VIRTIO_MDEV_QUEUE_NUM 0x038 > + > +/* Ready bit for the currently selected queue - Read Write */ > +#define VIRTIO_MDEV_QUEUE_READY 0x044 > + > +/* Alignment of virtqueue - Read Only */ > +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 > + > +/* Queue notifier - Write Only */ > +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 > + > +/* Device status register - Read Write */ > +#define VIRTIO_MDEV_STATUS 0x060 > +...
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...QUEUE_NUM_MAX 0x034 >>>> + >>>> +/* Queue size for the currently selected queue - Write Only */ >>>> +#define VIRTIO_MDEV_QUEUE_NUM 0x038 >>>> + >>>> +/* Ready bit for the currently selected queue - Read Write */ >>>> +#define VIRTIO_MDEV_QUEUE_READY 0x044 >>> Is this same as started? >> >> Do you mean "status"? > I really meant "enabled", didn't remember the correct name. > As in: VIRTIO_PCI_COMMON_Q_ENABLE Yes, it's the same. Thanks > >>>> + >>>> +/* Alig...
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...gt; + break; > + case VIRTIO_MDEV_DEVICE_FEATURES: > + if (mvnet->device_features_sel) > + *val = mvnet_features >> 32; > + else > + *val = mvnet_features; > + break; > + case VIRTIO_MDEV_QUEUE_NUM_MAX: > + *val = MVNET_QUEUE_MAX; > + break; > + case VIRTIO_MDEV_QUEUE_READY: > + *val = vq->ready; > + break; > + case VIRTIO_MDEV_QUEUE_ALIGN: > + *val = MVNET_QUEUE_ALIGN; > + break; > + case VIRTIO_MDEV_STATUS: > + *val = mvnet->status; > + break; > + case VIRTIO_MDEV_QUEUE_DESC_LOW: > + *val = vq->desc_addr_lo; > + brea...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...ase VIRTIO_MDEV_VENDOR_ID: + *val = MVNET_VENDOR_ID; + break; + case VIRTIO_MDEV_DEVICE_FEATURES: + if (mvnet->device_features_sel) + *val = mvnet_features >> 32; + else + *val = mvnet_features; + break; + case VIRTIO_MDEV_QUEUE_NUM_MAX: + *val = MVNET_QUEUE_MAX; + break; + case VIRTIO_MDEV_QUEUE_READY: + *val = vq->ready; + break; + case VIRTIO_MDEV_QUEUE_ALIGN: + *val = MVNET_QUEUE_ALIGN; + break; + case VIRTIO_MDEV_STATUS: + *val = mvnet->status; + break; + case VIRTIO_MDEV_QUEUE_DESC_LOW: + *val = vq->desc_addr_lo; + break; + case VIRTIO_MDEV_QUEUE_DESC_HIGH: + *val = vq-&gt...
2019 Sep 11
1
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...gt; > > > > +/* Queue size for the currently selected queue - Write Only */ > > > > > +#define VIRTIO_MDEV_QUEUE_NUM 0x038 > > > > > + > > > > > +/* Ready bit for the currently selected queue - Read Write */ > > > > > +#define VIRTIO_MDEV_QUEUE_READY 0x044 > > > > Is this same as started? > > > > > > Do you mean "status"? > > I really meant "enabled", didn't remember the correct name. > > As in: VIRTIO_PCI_COMMON_Q_ENABLE > > > Yes, it's the same. > > Tha...
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ue - Read Only */ >> +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034 >> + >> +/* Queue size for the currently selected queue - Write Only */ >> +#define VIRTIO_MDEV_QUEUE_NUM 0x038 >> + >> +/* Ready bit for the currently selected queue - Read Write */ >> +#define VIRTIO_MDEV_QUEUE_READY 0x044 >> + >> +/* Alignment of virtqueue - Read Only */ >> +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 >> + >> +/* Queue notifier - Write Only */ >> +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 >> + >> +/* Device status register - Read Write */ >> +#def...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...used_size(vq, vq->num), + &addr)) + return -EINVAL; + + virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_USED_LOW, addr); + virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_USED_HIGH, + (addr >> 32)); + + // XXX: we need to support set_vring_base + + virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_READY, 1); + } + + // XXX: we need to setup interrupt as well + + mdev_add_status(mdev, VIRTIO_CONFIG_S_DRIVER_OK); + return 0; +} + +static long vhost_mdev_stop_backend(struct vhost_mdev *m) +{ + struct mdev_device *mdev = m->mdev; + + mdev_reset(mdev); + mdev_add_status(mdev, VIRTIO_CONFIG_S_ACKNOWL...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...rtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_USED_LOW, addr); > + virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_USED_HIGH, > + (addr >> 32)); > + > + // XXX: we need to support set_vring_base I'm working on V2 that support this API. > + > + virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_READY, 1); > + } > + > + // XXX: we need to setup interrupt as well V2 will have a better interrupt API like some kind of callback. It could be as simple as a wrapper of eventfd_signal(). > + > + mdev_add_status(mdev, VIRTIO_CONFIG_S_DRIVER_OK); > + return 0; > +} > + > +s...
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