search for: virtqueue_add_one_desc

Displaying 10 results from an estimated 10 matches for "virtqueue_add_one_desc".

2017 Nov 29
0
[PATCH v18 06/10] virtio_ring: add a new API, virtqueue_add_one_desc
...n directly pass in a physical address in hand, instead of going through the sg implementation (e.g. the VIRTIO_BALLOON_F_SG feature) - Sometimes, a guest physical page may not have a kaddr (e.g. high memory) but need to use vring (e.g. the VIRTIO_BALLOON_F_FREE_PAGE_VQ feature) The new API virtqueue_add_one_desc enables the caller to assign a vring desc with a physical address and len. Also, factor out the common code with virtqueue_add in vring_set_avail. Signed-off-by: Wei Wang <wei.w.wang at intel.com> Cc: Michael S. Tsirkin <mst at redhat.com> --- drivers/virtio/virtio_ring.c | 94 +++++++...
2017 Nov 30
1
[PATCH v18 06/10] virtio_ring: add a new API, virtqueue_add_one_desc
...l address in hand, instead of going through the sg > implementation (e.g. the VIRTIO_BALLOON_F_SG feature) > - Sometimes, a guest physical page may not have a kaddr (e.g. high > memory) but need to use vring (e.g. the VIRTIO_BALLOON_F_FREE_PAGE_VQ > feature) > > The new API virtqueue_add_one_desc enables the caller to assign a vring > desc with a physical address and len. Also, factor out the common code > with virtqueue_add in vring_set_avail. > > Signed-off-by: Wei Wang <wei.w.wang at intel.com> > Cc: Michael S. Tsirkin <mst at redhat.com> You previously manag...
2017 Nov 30
1
[PATCH v18 06/10] virtio_ring: add a new API, virtqueue_add_one_desc
...l address in hand, instead of going through the sg > implementation (e.g. the VIRTIO_BALLOON_F_SG feature) > - Sometimes, a guest physical page may not have a kaddr (e.g. high > memory) but need to use vring (e.g. the VIRTIO_BALLOON_F_FREE_PAGE_VQ > feature) > > The new API virtqueue_add_one_desc enables the caller to assign a vring > desc with a physical address and len. Also, factor out the common code > with virtqueue_add in vring_set_avail. > > Signed-off-by: Wei Wang <wei.w.wang at intel.com> > Cc: Michael S. Tsirkin <mst at redhat.com> You previously manag...
2017 Nov 29
22
[PATCH v18 00/10] Virtio-balloon Enhancement
.... 3) commit changes 4) patch re-org Matthew Wilcox (1): xbitmap: Introduce xbitmap Wei Wang (9): idr: add #include <linux/bug.h> radix tree test suite: remove ARRAY_SIZE to avoid redefinition xbitmap: potential improvement xbitmap: add more operations virtio_ring: add a new API, virtqueue_add_one_desc virtio-balloon: VIRTIO_BALLOON_F_SG mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ virtio-balloon: don't report free pages when page poisoning is enabled drivers/virtio/virtio_balloon.c | 418 +++++++++++++++++++++++++++---- drivers/virti...
2017 Nov 29
22
[PATCH v18 00/10] Virtio-balloon Enhancement
.... 3) commit changes 4) patch re-org Matthew Wilcox (1): xbitmap: Introduce xbitmap Wei Wang (9): idr: add #include <linux/bug.h> radix tree test suite: remove ARRAY_SIZE to avoid redefinition xbitmap: potential improvement xbitmap: add more operations virtio_ring: add a new API, virtqueue_add_one_desc virtio-balloon: VIRTIO_BALLOON_F_SG mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ virtio-balloon: don't report free pages when page poisoning is enabled drivers/virtio/virtio_balloon.c | 418 +++++++++++++++++++++++++++---- drivers/virti...
2017 Dec 01
1
[PATCH v18 07/10] virtio-balloon: VIRTIO_BALLOON_F_SG
...virtqueue *vq, > + uint64_t addr, > + uint32_t len, > + bool inbuf, > + bool batch) > +{ > + int err; > + unsigned int size; > + > + /* Detach all the used buffers from the vq */ > + while (virtqueue_get_buf(vq, &size)) > + ; > + > + err = virtqueue_add_one_desc(vq, addr, len, inbuf, vq); > + /* > + * This is expected to never fail: there is always at least 1 entry > + * available on the vq, because when the vq is full the worker thread > + * that adds the desc will be put into sleep until at least 1 entry is > + * available to use. >...
2017 Dec 01
1
[PATCH v18 07/10] virtio-balloon: VIRTIO_BALLOON_F_SG
...virtqueue *vq, > + uint64_t addr, > + uint32_t len, > + bool inbuf, > + bool batch) > +{ > + int err; > + unsigned int size; > + > + /* Detach all the used buffers from the vq */ > + while (virtqueue_get_buf(vq, &size)) > + ; > + > + err = virtqueue_add_one_desc(vq, addr, len, inbuf, vq); > + /* > + * This is expected to never fail: there is always at least 1 entry > + * available on the vq, because when the vq is full the worker thread > + * that adds the desc will be put into sleep until at least 1 entry is > + * available to use. >...
2017 Nov 29
0
[PATCH v18 07/10] virtio-balloon: VIRTIO_BALLOON_F_SG
...tatic void send_one_desc(struct virtio_balloon *vb, + struct virtqueue *vq, + uint64_t addr, + uint32_t len, + bool inbuf, + bool batch) +{ + int err; + unsigned int size; + + /* Detach all the used buffers from the vq */ + while (virtqueue_get_buf(vq, &size)) + ; + + err = virtqueue_add_one_desc(vq, addr, len, inbuf, vq); + /* + * This is expected to never fail: there is always at least 1 entry + * available on the vq, because when the vq is full the worker thread + * that adds the desc will be put into sleep until at least 1 entry is + * available to use. + */ + BUG_ON(err); + + /* I...
2017 Nov 13
3
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
Ping for comments, thanks. On 11/03/2017 04:13 PM, Wei Wang wrote: > Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_VQ feature indicates the > support of reporting hints of guest free pages to the host via > virtio-balloon. The host requests the guest to report the free pages by > sending commands via the virtio-balloon configuration registers. > > When the guest starts to
2017 Nov 13
3
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
Ping for comments, thanks. On 11/03/2017 04:13 PM, Wei Wang wrote: > Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_VQ feature indicates the > support of reporting hints of guest free pages to the host via > virtio-balloon. The host requests the guest to report the free pages by > sending commands via the virtio-balloon configuration registers. > > When the guest starts to