search for: virtio_mdev_queue_used_high

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

2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...> > > +#define VIRTIO_MDEV_QUEUE_AVAIL_LOW 0x090 > > > +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 > > > + > > > +/* Selected queue's Used Ring address, 64 bits in two halves */ > > > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 > > > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 > > > + > > > +/* Configuration atomicity value */ > > > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc > > > + > > > +/* The config space is defined by each driver as > > > + * the per-driver configuration space - Read Write */ > > &g...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...> > > +#define VIRTIO_MDEV_QUEUE_AVAIL_LOW 0x090 > > > +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 > > > + > > > +/* Selected queue's Used Ring address, 64 bits in two halves */ > > > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 > > > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 > > > + > > > +/* Configuration atomicity value */ > > > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc > > > + > > > +/* The config space is defined by each driver as > > > + * the per-driver configuration space - Read Write */ > > &g...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...(u32)addr); > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_AVAIL_HIGH, > + (u32)(addr >> 32)); > + > + addr = virtqueue_get_used_addr(vq); > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_USED_LOW, (u32)addr); > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_USED_HIGH, (u32)(addr >> 32)); > + > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY, 1); > + > + vq->priv = info; > + info->vq = vq; > + > + return vq; > + > +error_callback: > + vring_del_virtqueue(vq); > +error_new_virtqueue: > + virtio_mdev_wr...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...(u32)addr); > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_AVAIL_HIGH, > + (u32)(addr >> 32)); > + > + addr = virtqueue_get_used_addr(vq); > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_USED_LOW, (u32)addr); > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_USED_HIGH, (u32)(addr >> 32)); > + > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY, 1); > + > + vq->priv = info; > + info->vq = vq; > + > + return vq; > + > +error_callback: > + vring_del_virtqueue(vq); > +error_new_virtqueue: > + virtio_mdev_wr...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ng address, 64 bits in two halves */ >> +#define VIRTIO_MDEV_QUEUE_AVAIL_LOW 0x090 >> +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 >> + >> +/* Selected queue's Used Ring address, 64 bits in two halves */ >> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 >> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 >> + >> +/* Configuration atomicity value */ >> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc >> + >> +/* The config space is defined by each driver as >> + * the per-driver configuration space - Read Write */ >> +#define VIRTIO_MDEV_CONFIG 0x100 >...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...queue's Available Ring address, 64 bits in two halves */ > +#define VIRTIO_MDEV_QUEUE_AVAIL_LOW 0x090 > +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 > + > +/* Selected queue's Used Ring address, 64 bits in two halves */ > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 > + > +/* Configuration atomicity value */ > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc > + > +/* The config space is defined by each driver as > + * the per-driver configuration space - Read Write */ > +#define VIRTIO_MDEV_CONFIG 0x100 IIUC, we can use above register...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...queue's Available Ring address, 64 bits in two halves */ > +#define VIRTIO_MDEV_QUEUE_AVAIL_LOW 0x090 > +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 > + > +/* Selected queue's Used Ring address, 64 bits in two halves */ > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 > + > +/* Configuration atomicity value */ > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc > + > +/* The config space is defined by each driver as > + * the per-driver configuration space - Read Write */ > +#define VIRTIO_MDEV_CONFIG 0x100 IIUC, we can use above register...
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 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...;> +#define VIRTIO_MDEV_QUEUE_AVAIL_LOW 0x090 >>>> +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 >>>> + >>>> +/* Selected queue's Used Ring address, 64 bits in two halves */ >>>> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 >>>> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 >>>> + >>>> +/* Configuration atomicity value */ >>>> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc >>>> + >>>> +/* The config space is defined by each driver as >>>> + * the per-driver configuration space - Read Write */...
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...reak; > + case VIRTIO_MDEV_QUEUE_AVAIL_LOW: > + *val = vq->driver_addr_lo; > + break; > + case VIRTIO_MDEV_QUEUE_AVAIL_HIGH: > + *val = vq->driver_addr_hi; > + break; > + case VIRTIO_MDEV_QUEUE_USED_LOW: > + *val = vq->device_addr_lo; > + break; > + case VIRTIO_MDEV_QUEUE_USED_HIGH: > + *val = vq->device_addr_hi; > + break; > + case VIRTIO_MDEV_CONFIG_GENERATION: > + *val = 1; > + break; > + default: > + pr_err("Unsupported mdev read offset at 0x%x\n", pos); > + break; > + } > + > + return 4; > +} > + > +static ssiz...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...EUE_DESC_HIGH: + *val = vq->desc_addr_hi; + break; + case VIRTIO_MDEV_QUEUE_AVAIL_LOW: + *val = vq->driver_addr_lo; + break; + case VIRTIO_MDEV_QUEUE_AVAIL_HIGH: + *val = vq->driver_addr_hi; + break; + case VIRTIO_MDEV_QUEUE_USED_LOW: + *val = vq->device_addr_lo; + break; + case VIRTIO_MDEV_QUEUE_USED_HIGH: + *val = vq->device_addr_hi; + break; + case VIRTIO_MDEV_CONFIG_GENERATION: + *val = 1; + break; + default: + pr_err("Unsupported mdev read offset at 0x%x\n", pos); + break; + } + + return 4; +} + +static ssize_t mvnet_read_net_config(struct mdev_device *mdev, + char *bu...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
..., VIRTIO_MDEV_QUEUE_AVAIL_LOW, (u32)addr); + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_AVAIL_HIGH, + (u32)(addr >> 32)); + + addr = virtqueue_get_used_addr(vq); + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_USED_LOW, (u32)addr); + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_USED_HIGH, (u32)(addr >> 32)); + + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY, 1); + + vq->priv = info; + info->vq = vq; + + return vq; + +error_callback: + vring_del_virtqueue(vq); +error_new_virtqueue: + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_QUEUE_READY, 0); + WARN_ON...
2019 Sep 11
1
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...OW 0x090 > > > > > +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 > > > > > + > > > > > +/* Selected queue's Used Ring address, 64 bits in two halves */ > > > > > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 > > > > > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 > > > > > + > > > > > +/* Configuration atomicity value */ > > > > > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc > > > > > + > > > > > +/* The config space is defined by each driver as > > > > > + * the...
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ng address, 64 bits in two halves */ >> +#define VIRTIO_MDEV_QUEUE_AVAIL_LOW 0x090 >> +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094 >> + >> +/* Selected queue's Used Ring address, 64 bits in two halves */ >> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0 >> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4 >> + >> +/* Configuration atomicity value */ >> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc >> + >> +/* The config space is defined by each driver as >> + * the per-driver configuration space - Read Write */ >> +#define VIRTIO_MDEV_CONFIG 0x100 >...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...O_MDEV_QUEUE_AVAIL_HIGH, + (addr >> 32)); + + if (!vhost_translate_ring_addr(vq, (u64)vq->used, + vhost_get_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(stru...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...gt;> 32)); > + > + if (!vhost_translate_ring_addr(vq, (u64)vq->used, > + vhost_get_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 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...
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