Displaying 20 results from an estimated 27 matches for "virtio_mmio_queue_align".
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...error_available;
}
@@ -356,13 +346,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
info->num /= 2;
}
- /* Activate the queue */
- writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
- writel(VIRTIO_MMIO_VRING_ALIGN,
- vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
- writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
- vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
-
/* Create the vring */
vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
true, info->queue, vm_notify, callback, name);
@@ -371,6 +354,33 @@ static st...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...error_available;
}
@@ -356,13 +346,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
info->num /= 2;
}
- /* Activate the queue */
- writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
- writel(VIRTIO_MMIO_VRING_ALIGN,
- vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
- writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
- vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
-
/* Create the vring */
vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
true, info->queue, vm_notify, callback, name);
@@ -371,6 +354,33 @@ static st...
2015 Apr 28
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...46,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
> info->num /= 2;
> }
>
> - /* Activate the queue */
> - writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
> - writel(VIRTIO_MMIO_VRING_ALIGN,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
> - writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
> -
> /* Create the vring */
> vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
> true, info->queue, vm_notify, callback, name);...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...Only */
+#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034
+
+/* Queue size for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_NUM 0x038
+
+
+#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */
+
+/* Used Ring alignment for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_ALIGN 0x03c
+
+/* Guest's PFN for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_PFN 0x040
+
+#endif
+
+
+/* Ready bit for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_READY 0x044
+
+/* Queue notifier - Write Only */
+#define VIRTIO_MMIO_QUEUE_NO...
2017 Jan 12
1
[PATCH 1/2] virtio_mmio: add standard header file
...Only */
+#define VIRTIO_MMIO_QUEUE_NUM_MAX 0x034
+
+/* Queue size for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_NUM 0x038
+
+
+#ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */
+
+/* Used Ring alignment for the currently selected queue - Write Only */
+#define VIRTIO_MMIO_QUEUE_ALIGN 0x03c
+
+/* Guest's PFN for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_PFN 0x040
+
+#endif
+
+
+/* Ready bit for the currently selected queue - Read Write */
+#define VIRTIO_MMIO_QUEUE_READY 0x044
+
+/* Queue notifier - Write Only */
+#define VIRTIO_MMIO_QUEUE_NO...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...error_available;
}
@@ -356,13 +339,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
info->num /= 2;
}
- /* Activate the queue */
- writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
- writel(VIRTIO_MMIO_VRING_ALIGN,
- vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
- writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
- vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
-
/* Create the vring */
vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
true, info->queue, vm_notify, callback, name);
@@ -371,6 +347,33 @@ static st...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...error_available;
}
@@ -356,13 +339,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
info->num /= 2;
}
- /* Activate the queue */
- writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
- writel(VIRTIO_MMIO_VRING_ALIGN,
- vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
- writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
- vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
-
/* Create the vring */
vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
true, info->queue, vm_notify, callback, name);
@@ -371,6 +347,33 @@ static st...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...46,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
> info->num /= 2;
> }
>
> - /* Activate the queue */
> - writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
> - writel(VIRTIO_MMIO_VRING_ALIGN,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
> - writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
> -
> /* Create the vring */
> vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
> true, info->queue, vm_notify, callback, name);...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...46,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
> info->num /= 2;
> }
>
> - /* Activate the queue */
> - writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
> - writel(VIRTIO_MMIO_VRING_ALIGN,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
> - writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
> -
> /* Create the vring */
> vq = vring_new_virtqueue(index, info->num, VIRTIO_MMIO_VRING_ALIGN, vdev,
> true, info->queue, vm_notify, callback, name);...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...err = -ENOENT;
goto error_available;
}
@@ -358,10 +341,35 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
/* Activate the queue */
writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
- writel(VIRTIO_MMIO_VRING_ALIGN,
- vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
- writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
- vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
+ if (vm_dev->version == 1) {
+ writel(VIRTIO_MMIO_VRING_ALIGN,
+ vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
+ writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
+ vm_dev->...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...err = -ENOENT;
goto error_available;
}
@@ -358,10 +341,35 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
/* Activate the queue */
writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
- writel(VIRTIO_MMIO_VRING_ALIGN,
- vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
- writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
- vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
+ if (vm_dev->version == 1) {
+ writel(VIRTIO_MMIO_VRING_ALIGN,
+ vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
+ writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
+ vm_dev->...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...ilable;
> }
> @@ -358,10 +341,35 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
>
> /* Activate the queue */
> writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
> - writel(VIRTIO_MMIO_VRING_ALIGN,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
> - writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
> + if (vm_dev->version == 1) {
> + writel(VIRTIO_MMIO_VRING_ALIGN,
> + vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
> + writel(virt_to_phys(info->queue) >&g...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...ilable;
> }
> @@ -358,10 +341,35 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index,
>
> /* Activate the queue */
> writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM);
> - writel(VIRTIO_MMIO_VRING_ALIGN,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
> - writel(virt_to_phys(info->queue) >> PAGE_SHIFT,
> - vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
> + if (vm_dev->version == 1) {
> + writel(VIRTIO_MMIO_VRING_ALIGN,
> + vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN);
> + writel(virt_to_phys(info->queue) >&g...
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote:
> No, that's it I think. Please send a diff for the documentation, since
> I'm updating the LyX master and I've already applied your previous
> version.
Here it goes (below). Also do you think you would be able to merge the
driver (corresponding v4 patch follows) in the 3.2 merge window that
seems to have just opened?
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote:
> No, that's it I think. Please send a diff for the documentation, since
> I'm updating the LyX master and I've already applied your previous
> version.
Here it goes (below). Also do you think you would be able to merge the
driver (corresponding v4 patch follows) in the 3.2 merge window that
seems to have just opened?
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...e = val;
+ /* FIXME: set guest page size */
+ break;
+ case VIRTIO_MMIO_QUEUE_NUM:
+ val = ioport__read32(data);
+ vmmio->hdr.queue_num = val;
+ /* FIXME: set vq size */
+ vdev->ops->set_size_vq(vmmio->kvm, vmmio->dev,
+ vmmio->hdr.queue_sel, val);
+ break;
+ case VIRTIO_MMIO_QUEUE_ALIGN:
+ val = ioport__read32(data);
+ vmmio->hdr.queue_align = val;
+ /* FIXME: set used ring alignment */
+ break;
+ case VIRTIO_MMIO_QUEUE_PFN:
+ val = ioport__read32(data);
+ virtio_mmio_init_ioeventfd(vmmio->kvm, vdev, vmmio->hdr.queue_sel);
+ vdev->ops->init_vq(vmmio->kvm,...
2012 Apr 07
0
[PATCH 05/14] kvm tools: Add virtio-mmio support
...e = val;
+ /* FIXME: set guest page size */
+ break;
+ case VIRTIO_MMIO_QUEUE_NUM:
+ val = ioport__read32(data);
+ vmmio->hdr.queue_num = val;
+ /* FIXME: set vq size */
+ vdev->ops->set_size_vq(vmmio->kvm, vmmio->dev,
+ vmmio->hdr.queue_sel, val);
+ break;
+ case VIRTIO_MMIO_QUEUE_ALIGN:
+ val = ioport__read32(data);
+ vmmio->hdr.queue_align = val;
+ /* FIXME: set used ring alignment */
+ break;
+ case VIRTIO_MMIO_QUEUE_PFN:
+ val = ioport__read32(data);
+ virtio_mmio_init_ioeventfd(vmmio->kvm, vdev, vmmio->hdr.queue_sel);
+ vdev->ops->init_vq(vmmio->kvm,...
2011 Nov 15
2
[RFC] kvm tools: Add support for virtio-mmio
...len, struct virtio_trans *vtrans)
+{
+ struct virtio_mmio *vmmio = vtrans->virtio;
+ u32 val = 0;
+
+ switch(addr) {
+ case VIRTIO_MMIO_HOST_FEATURES_SEL:
+ case VIRTIO_MMIO_GUEST_FEATURES_SET:
+ case VIRTIO_MMIO_GUEST_PAGE_SIZE:
+ case VIRTIO_MMIO_QUEUE_SEL:
+ case VIRTIO_MMIO_QUEUE_NUM:
+ case VIRTIO_MMIO_QUEUE_ALIGN:
+ case VIRTIO_MMIO_STATUS:
+ *(u32 *)(((void *)&vmmio->hdr) + addr) = ioport__read32(data);
+ break;
+ case VIRTIO_MMIO_GUEST_FEATURES:
+ if (vmmio->hdr.guest_features_sel == 0) {
+ val = ioport__read32(data);
+ vtrans->virtio_ops->set_guest_features(vmmio->kvm, vmmio->...
2011 Nov 15
2
[RFC] kvm tools: Add support for virtio-mmio
...len, struct virtio_trans *vtrans)
+{
+ struct virtio_mmio *vmmio = vtrans->virtio;
+ u32 val = 0;
+
+ switch(addr) {
+ case VIRTIO_MMIO_HOST_FEATURES_SEL:
+ case VIRTIO_MMIO_GUEST_FEATURES_SET:
+ case VIRTIO_MMIO_GUEST_PAGE_SIZE:
+ case VIRTIO_MMIO_QUEUE_SEL:
+ case VIRTIO_MMIO_QUEUE_NUM:
+ case VIRTIO_MMIO_QUEUE_ALIGN:
+ case VIRTIO_MMIO_STATUS:
+ *(u32 *)(((void *)&vmmio->hdr) + addr) = ioport__read32(data);
+ break;
+ case VIRTIO_MMIO_GUEST_FEATURES:
+ if (vmmio->hdr.guest_features_sel == 0) {
+ val = ioport__read32(data);
+ vtrans->virtio_ops->set_guest_features(vmmio->kvm, vmmio->...
2016 Jan 29
18
[PATCH v5 00/10] virtio DMA API, yet again
This switches virtio to use the DMA API on Xen and if requested by
module option.
This fixes virtio on Xen, and it should break anything because it's
off by default on everything except Xen PV on x86.
To the Xen people: is this okay? If it doesn't work on other Xen
variants (PVH? HVM?), can you submit follow-up patches to fix it?
To everyone else: we've waffled on this for way too