Displaying 20 results from an estimated 92 matches for "virtio_notify".
2012 Jul 23
4
[RFC 0/2] virtio: provide a way for host to monitor critical events in the device
As it was discussed recently, there's currently no way for the guest to notify
the host about panics. Further more, there's no reasonable way to notify the
host of other critical events such as an OOM kill.
This short patch series introduces a new device named virtio-notifier which
does two simple things:
1. Provide a simple interface for the guest to notify the host of critical
2012 Jul 23
4
[RFC 0/2] virtio: provide a way for host to monitor critical events in the device
As it was discussed recently, there's currently no way for the guest to notify
the host about panics. Further more, there's no reasonable way to notify the
host of other critical events such as an OOM kill.
This short patch series introduces a new device named virtio-notifier which
does two simple things:
1. Provide a simple interface for the guest to notify the host of critical
2015 May 19
1
Trying to make VHOST-BLK to work
...t hear from
Asias on my personal mail to him. I will be grateful to you for your time
and response.
The problem I am seeing is there is no response seen by the VM through the
HOST has executed the IO successfully and issued
vhost_add_used_and_signal. Here is my question. Which code in QEMU issues
virtio_notify() when the VHOST completes the IO in kernel?
I have some related questions. Could I connect a iscsi LUN to a VM via
vhost-scsi? Could you please point me to some documents if there are any?
Thanks and Regards
Sudheer
-------------- next part --------------
An HTML attachment was scrubbed...
URL:...
2015 May 19
1
Trying to make VHOST-BLK to work
...t hear from
Asias on my personal mail to him. I will be grateful to you for your time
and response.
The problem I am seeing is there is no response seen by the VM through the
HOST has executed the IO successfully and issued
vhost_add_used_and_signal. Here is my question. Which code in QEMU issues
virtio_notify() when the VHOST completes the IO in kernel?
I have some related questions. Could I connect a iscsi LUN to a VM via
vhost-scsi? Could you please point me to some documents if there are any?
Thanks and Regards
Sudheer
-------------- next part --------------
An HTML attachment was scrubbed...
URL:...
2014 Jul 28
2
When I boot two virtio-rng devices, guest will hang
...ue;
}
+ trace_virtio_rng_guest_not_ready(vrng);
return false;
}
@@ -62,6 +64,7 @@ static void chr_read(void *opaque, const void *buf, size_t size)
offset += len;
virtqueue_push(vrng->vq, &elem, len);
+ trace_virtio_rng_pushed(vrng, len);
}
virtio_notify(vdev, vrng->vq);
}
@@ -81,7 +84,11 @@ static void virtio_rng_process(VirtIORNG *vrng)
quota = MIN((uint64_t)vrng->quota_remaining, (uint64_t)UINT32_MAX);
}
size = get_request_size(vrng->vq, quota);
+
+ trace_virtio_rng_request(vrng, size, quota);
+
size = MIN(vr...
2014 Jul 28
2
When I boot two virtio-rng devices, guest will hang
...ue;
}
+ trace_virtio_rng_guest_not_ready(vrng);
return false;
}
@@ -62,6 +64,7 @@ static void chr_read(void *opaque, const void *buf, size_t size)
offset += len;
virtqueue_push(vrng->vq, &elem, len);
+ trace_virtio_rng_pushed(vrng, len);
}
virtio_notify(vdev, vrng->vq);
}
@@ -81,7 +84,11 @@ static void virtio_rng_process(VirtIORNG *vrng)
quota = MIN((uint64_t)vrng->quota_remaining, (uint64_t)UINT32_MAX);
}
size = get_request_size(vrng->vq, quota);
+
+ trace_virtio_rng_request(vrng, size, quota);
+
size = MIN(vr...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...virtqueue_push(vnet->rx_vq, &elem, sizeof(*hdr) + len);
+ vnet->do_notify = 1;
+ }
+
+ /* signal other side */
+ did_notify = 0;
+ for (vnet = VirtIONetHead; vnet; vnet = vnet->next)
+ if (vnet->do_notify) {
+ virtio_notify(&vnet->vdev, vnet->rx_vq);
+ did_notify++;
+ }
+ if (!did_notify)
+ break;
+ }
- /* signal other side */
- virtqueue_push(n->rx_vq, &elem, sizeof(*hdr) + offset);
- virtio_notify(&n->vdev, n->rx_vq);
}
/* TX *...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...virtqueue_push(vnet->rx_vq, &elem, sizeof(*hdr) + len);
+ vnet->do_notify = 1;
+ }
+
+ /* signal other side */
+ did_notify = 0;
+ for (vnet = VirtIONetHead; vnet; vnet = vnet->next)
+ if (vnet->do_notify) {
+ virtio_notify(&vnet->vdev, vnet->rx_vq);
+ did_notify++;
+ }
+ if (!did_notify)
+ break;
+ }
- /* signal other side */
- virtqueue_push(n->rx_vq, &elem, sizeof(*hdr) + offset);
- virtio_notify(&n->vdev, n->rx_vq);
}
/* TX *...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
.../* now copy res and fileinfo */
> + iov_from_buf(elem->in_sg, elem->in_num, 0, &res, sizeof(res));
> + iov_from_buf(elem->in_sg, elem->in_num, sizeof(res), info, sizeof(*info));
> +
> + len += offset;
> + virtqueue_push(vps->rvq, elem, len);
> + virtio_notify(VIRTIO_DEVICE(vps), vps->rvq);
> +
> + return G_SOURCE_REMOVE;
G_SOURCE_REMOVE was added in glib 2.32, but QEMU only permits
stuff that is present in 2.22. Just use "FALSE" instead.
> +static ssize_t virtio_pstore_do_read(VirtIOPstore *s, VirtQueueElement *elem)
> +{
&...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
.../* now copy res and fileinfo */
> + iov_from_buf(elem->in_sg, elem->in_num, 0, &res, sizeof(res));
> + iov_from_buf(elem->in_sg, elem->in_num, sizeof(res), info, sizeof(*info));
> +
> + len += offset;
> + virtqueue_push(vps->rvq, elem, len);
> + virtio_notify(VIRTIO_DEVICE(vps), vps->rvq);
> +
> + return G_SOURCE_REMOVE;
G_SOURCE_REMOVE was added in glib 2.32, but QEMU only permits
stuff that is present in 2.22. Just use "FALSE" instead.
> +static ssize_t virtio_pstore_do_read(VirtIOPstore *s, VirtQueueElement *elem)
> +{
&...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...t < size && i < elem.in_num) {
+ int len = MIN(elem.in_sg[i].iov_len, size - offset);
+ memcpy(elem.in_sg[i].iov_base, buf + offset, len);
+ offset += len;
+ i++;
+ }
+
+ /* signal other side */
+ virtqueue_push(n->rx_vq, &elem, sizeof(*hdr) + offset);
+ virtio_notify(&n->vdev, n->rx_vq);
+}
+
+/* TX */
+static void virtio_net_handle_tx(VirtIODevice *vdev, VirtQueue *vq)
+{
+ VirtIONet *n = to_virtio_net(vdev);
+ VirtQueueElement elem;
+
+ while (virtqueue_pop(vq, &elem)) {
+ int i;
+ size_t len = 0;
+
+ /* ignore the header for n...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...t < size && i < elem.in_num) {
+ int len = MIN(elem.in_sg[i].iov_len, size - offset);
+ memcpy(elem.in_sg[i].iov_base, buf + offset, len);
+ offset += len;
+ i++;
+ }
+
+ /* signal other side */
+ virtqueue_push(n->rx_vq, &elem, sizeof(*hdr) + offset);
+ virtio_notify(&n->vdev, n->rx_vq);
+}
+
+/* TX */
+static void virtio_net_handle_tx(VirtIODevice *vdev, VirtQueue *vq)
+{
+ VirtIONet *n = to_virtio_net(vdev);
+ VirtQueueElement elem;
+
+ while (virtqueue_pop(vq, &elem)) {
+ int i;
+ size_t len = 0;
+
+ /* ignore the header for n...
2014 Jul 28
1
When I boot two virtio-rng devices, guest will hang
...rng);
> return false;
> }
>
> @@ -62,6 +64,7 @@ static void chr_read(void *opaque, const void *buf, size_t size)
> offset += len;
>
> virtqueue_push(vrng->vq, &elem, len);
> + trace_virtio_rng_pushed(vrng, len);
> }
> virtio_notify(vdev, vrng->vq);
> }
> @@ -81,7 +84,11 @@ static void virtio_rng_process(VirtIORNG *vrng)
> quota = MIN((uint64_t)vrng->quota_remaining, (uint64_t)UINT32_MAX);
> }
> size = get_request_size(vrng->vq, quota);
> +
> + trace_virtio_rng_request(vrng,...
2014 Jul 28
1
When I boot two virtio-rng devices, guest will hang
...rng);
> return false;
> }
>
> @@ -62,6 +64,7 @@ static void chr_read(void *opaque, const void *buf, size_t size)
> offset += len;
>
> virtqueue_push(vrng->vq, &elem, len);
> + trace_virtio_rng_pushed(vrng, len);
> }
> virtio_notify(vdev, vrng->vq);
> }
> @@ -81,7 +84,11 @@ static void virtio_rng_process(VirtIORNG *vrng)
> quota = MIN((uint64_t)vrng->quota_remaining, (uint64_t)UINT32_MAX);
> }
> size = get_request_size(vrng->vq, quota);
> +
> + trace_virtio_rng_request(vrng,...
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...*/
> > + iov_from_buf(elem->in_sg, elem->in_num, 0, &res, sizeof(res));
> > + iov_from_buf(elem->in_sg, elem->in_num, sizeof(res), info, sizeof(*info));
> > +
> > + len += offset;
> > + virtqueue_push(vps->rvq, elem, len);
> > + virtio_notify(VIRTIO_DEVICE(vps), vps->rvq);
> > +
> > + return G_SOURCE_REMOVE;
>
> G_SOURCE_REMOVE was added in glib 2.32, but QEMU only permits
> stuff that is present in 2.22. Just use "FALSE" instead.
Didn't know that, will change.
>
> > +static ssize_t...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(vdev->binding_opaque, vector);
+ }
+}
void virtio_update_irq(VirtIODevice *vdev)
{
- if (vdev->binding->update_irq) {
- vdev->binding->update_i...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(vdev->binding_opaque, vector);
+ }
+}
void virtio_update_irq(VirtIODevice *vdev)
{
- if (vdev->binding->update_irq) {
- vdev->binding->update_i...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(vdev->binding_opaque, vector);
+ }
+}
void virtio_update_irq(VirtIODevice *vdev)
{
- if (vdev->binding->update_irq) {
- vdev->binding->update_i...
2009 Jun 10
0
[PATCHv4 09/13] qemu: virtio support for many interrupt vectors
...struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(vdev->binding_opaque, vector);
+ }
+}
void virtio_update_irq(VirtIODevice *vdev)
{
- if (vdev->binding->update_irq) {
- vdev->binding->update_i...
2009 Jun 21
0
[PATCHv6 07/12] qemu/virtio: virtio support for many interrupt vectors
...struct VirtQueue
target_phys_addr_t pa;
uint16_t last_avail_idx;
int inuse;
+ uint16_t vector;
void (*handle_output)(VirtIODevice *vdev, VirtQueue *vq);
};
@@ -373,12 +374,16 @@ int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
}
/* virtio device */
+static void virtio_notify_vector(VirtIODevice *vdev, uint16_t vector)
+{
+ if (vdev->binding->notify) {
+ vdev->binding->notify(vdev->binding_opaque, vector);
+ }
+}
void virtio_update_irq(VirtIODevice *vdev)
{
- if (vdev->binding->update_irq) {
- vdev->binding->update_i...