search for: prev_id

Displaying 20 results from an estimated 22 matches for "prev_id".

Did you mean: prev_uid
2017 Jul 13
2
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...LL); > + virtqueue_kick(vq); > + } > + > + return id; > +} > + > +static void cmdq_add_chain_desc(struct virtio_balloon *vb, > + struct virtio_balloon_cmdq_hdr *hdr, > + uint64_t addr, > + uint32_t len, > + unsigned int *head_id, > + unsigned int *prev_id) > +{ > +retry: > + if (*head_id == VIRTQUEUE_DESC_ID_INIT) { > + *head_id = cmdq_hdr_add(vb->cmd_vq, hdr, 0); > + *prev_id = *head_id; > + } > + > + virtqueue_add_chain_desc(vb->cmd_vq, addr, len, head_id, prev_id, 0); > + if (*head_id == *prev_id) { That's...
2017 Jul 13
2
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...LL); > + virtqueue_kick(vq); > + } > + > + return id; > +} > + > +static void cmdq_add_chain_desc(struct virtio_balloon *vb, > + struct virtio_balloon_cmdq_hdr *hdr, > + uint64_t addr, > + uint32_t len, > + unsigned int *head_id, > + unsigned int *prev_id) > +{ > +retry: > + if (*head_id == VIRTQUEUE_DESC_ID_INIT) { > + *head_id = cmdq_hdr_add(vb->cmd_vq, hdr, 0); > + *prev_id = *head_id; > + } > + > + virtqueue_add_chain_desc(vb->cmd_vq, addr, len, head_id, prev_id, 0); > + if (*head_id == *prev_id) { That's...
2017 Jul 12
0
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...t;flags = 0; + virtqueue_add_chain(vq, id, 0, NULL, hdr, NULL); + virtqueue_kick(vq); + } + + return id; +} + +static void cmdq_add_chain_desc(struct virtio_balloon *vb, + struct virtio_balloon_cmdq_hdr *hdr, + uint64_t addr, + uint32_t len, + unsigned int *head_id, + unsigned int *prev_id) +{ +retry: + if (*head_id == VIRTQUEUE_DESC_ID_INIT) { + *head_id = cmdq_hdr_add(vb->cmd_vq, hdr, 0); + *prev_id = *head_id; + } + + virtqueue_add_chain_desc(vb->cmd_vq, addr, len, head_id, prev_id, 0); + if (*head_id == *prev_id) { + /* + * The VQ was full and kicked to release some de...
2017 Jul 12
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...and @page_xb_end form the range of bits in the xbitmap that + * need to be serached. + */ +static void tell_host_sgs(struct virtio_balloon *vb, + struct virtqueue *vq, + unsigned long page_xb_start, + unsigned long page_xb_end) +{ + unsigned int head_id = VIRTQUEUE_DESC_ID_INIT, + prev_id = VIRTQUEUE_DESC_ID_INIT; + unsigned long sg_pfn_start, sg_pfn_end; + uint64_t sg_addr; + uint32_t sg_size; + + sg_pfn_start = page_xb_start; + while (sg_pfn_start < page_xb_end) { + sg_pfn_start = xb_find_next_bit(&vb->page_xb, sg_pfn_start, + page_xb_end, 1); + if (sg_pfn_start =...
2017 Jul 13
0
[PATCH v12 8/8] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...} >> + >> + return id; >> +} >> + >> +static void cmdq_add_chain_desc(struct virtio_balloon *vb, >> + struct virtio_balloon_cmdq_hdr *hdr, >> + uint64_t addr, >> + uint32_t len, >> + unsigned int *head_id, >> + unsigned int *prev_id) >> +{ >> +retry: >> + if (*head_id == VIRTQUEUE_DESC_ID_INIT) { >> + *head_id = cmdq_hdr_add(vb->cmd_vq, hdr, 0); >> + *prev_id = *head_id; >> + } >> + >> + virtqueue_add_chain_desc(vb->cmd_vq, addr, len, head_id, prev_id, 0); >> + if (...
2017 Jul 12
19
[PATCH v12 0/8] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one by one; and 2) cmdq: a new virtqueue to send commands between the device and driver. Currently, it supports commands to report memory stats (replace the old statq mechanism) and report guest unused pages.
2017 Jul 12
19
[PATCH v12 0/8] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks using sgs, instead of one by one; and 2) cmdq: a new virtqueue to send commands between the device and driver. Currently, it supports commands to report memory stats (replace the old statq mechanism) and report guest unused pages.
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...> > - need to re-write the last descriptor - might not work > > for alternative layouts which always expose descriptors > > immediately > > Probably it wasn't clear. Please let me explain the two functions here: > > 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): > grabs a desc from the vq and inserts it to the chain tail (which is indexed > by > prev_id, probably better to call it tail_id). Then, the new added desc > becomes > the tail (i.e. the last desc). The _F_NEXT flag is cleared for each desc > when it's > added to the c...
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...> > - need to re-write the last descriptor - might not work > > for alternative layouts which always expose descriptors > > immediately > > Probably it wasn't clear. Please let me explain the two functions here: > > 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): > grabs a desc from the vq and inserts it to the chain tail (which is indexed > by > prev_id, probably better to call it tail_id). Then, the new added desc > becomes > the tail (i.e. the last desc). The _F_NEXT flag is cleared for each desc > when it's > added to the c...
2017 Jul 12
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...valid desc */ > > > +#define VIRTQUEUE_DESC_ID_INIT UINT_MAX > > > +int virtqueue_add_chain_desc(struct virtqueue *_vq, > > > + uint64_t addr, > > > + uint32_t len, > > > + unsigned int *head_id, > > > + unsigned int *prev_id, > > > + bool in); > > > + > > > +int virtqueue_add_chain(struct virtqueue *_vq, > > > + unsigned int head, > > > + bool indirect, > > > + struct vring_desc *indirect_desc, > > > + void *data, > > > + void *ctx...
2017 Jul 12
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...valid desc */ > > > +#define VIRTQUEUE_DESC_ID_INIT UINT_MAX > > > +int virtqueue_add_chain_desc(struct virtqueue *_vq, > > > + uint64_t addr, > > > + uint32_t len, > > > + unsigned int *head_id, > > > + unsigned int *prev_id, > > > + bool in); > > > + > > > +int virtqueue_add_chain(struct virtqueue *_vq, > > > + unsigned int head, > > > + bool indirect, > > > + struct vring_desc *indirect_desc, > > > + void *data, > > > + void *ctx...
2017 Jul 23
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...tor - might not work > > > > for alternative layouts which always expose descriptors > > > > immediately > > > Probably it wasn't clear. Please let me explain the two functions here: > > > > > > 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): > > > grabs a desc from the vq and inserts it to the chain tail (which is indexed > > > by > > > prev_id, probably better to call it tail_id). Then, the new added desc > > > becomes > > > the tail (i.e. the last desc). The _F_NEXT flag is cleared fo...
2017 Jul 23
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...tor - might not work > > > > for alternative layouts which always expose descriptors > > > > immediately > > > Probably it wasn't clear. Please let me explain the two functions here: > > > > > > 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): > > > grabs a desc from the vq and inserts it to the chain tail (which is indexed > > > by > > > prev_id, probably better to call it tail_id). Then, the new added desc > > > becomes > > > the tail (i.e. the last desc). The _F_NEXT flag is cleared fo...
2017 Jul 12
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...> > +/* A desc with this init id is treated as an invalid desc */ > +#define VIRTQUEUE_DESC_ID_INIT UINT_MAX > +int virtqueue_add_chain_desc(struct virtqueue *_vq, > + uint64_t addr, > + uint32_t len, > + unsigned int *head_id, > + unsigned int *prev_id, > + bool in); > + > +int virtqueue_add_chain(struct virtqueue *_vq, > + unsigned int head, > + bool indirect, > + struct vring_desc *indirect_desc, > + void *data, > + void *ctx); > + > bool virtqueue_kick(struct virtqueue *vq); > > +bool vir...
2017 Jul 12
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...> > +/* A desc with this init id is treated as an invalid desc */ > +#define VIRTQUEUE_DESC_ID_INIT UINT_MAX > +int virtqueue_add_chain_desc(struct virtqueue *_vq, > + uint64_t addr, > + uint32_t len, > + unsigned int *head_id, > + unsigned int *prev_id, > + bool in); > + > +int virtqueue_add_chain(struct virtqueue *_vq, > + unsigned int head, > + bool indirect, > + struct vring_desc *indirect_desc, > + void *data, > + void *ctx); > + > bool virtqueue_kick(struct virtqueue *vq); > > +bool vir...
2017 Jul 13
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...your code never checks return code > - need to re-write the last descriptor - might not work > for alternative layouts which always expose descriptors > immediately Probably it wasn't clear. Please let me explain the two functions here: 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): grabs a desc from the vq and inserts it to the chain tail (which is indexed by prev_id, probably better to call it tail_id). Then, the new added desc becomes the tail (i.e. the last desc). The _F_NEXT flag is cleared for each desc when it's added to the chain, and set when another desc...
2017 Jul 14
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...need to re-write the last descriptor - might not work >>> for alternative layouts which always expose descriptors >>> immediately >> Probably it wasn't clear. Please let me explain the two functions here: >> >> 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): >> grabs a desc from the vq and inserts it to the chain tail (which is indexed >> by >> prev_id, probably better to call it tail_id). Then, the new added desc >> becomes >> the tail (i.e. the last desc). The _F_NEXT flag is cleared for each desc >> when it...
2017 Jul 26
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...for alternative layouts which always expose descriptors > > > > > > immediately > > > > > Probably it wasn't clear. Please let me explain the two functions here: > > > > > > > > > > 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): > > > > > grabs a desc from the vq and inserts it to the chain tail (which is indexed > > > > > by > > > > > prev_id, probably better to call it tail_id). Then, the new added desc > > > > > becomes > > > > > the tail (i...
2017 Jul 26
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...for alternative layouts which always expose descriptors > > > > > > immediately > > > > > Probably it wasn't clear. Please let me explain the two functions here: > > > > > > > > > > 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): > > > > > grabs a desc from the vq and inserts it to the chain tail (which is indexed > > > > > by > > > > > prev_id, probably better to call it tail_id). Then, the new added desc > > > > > becomes > > > > > the tail (i...
2017 Jul 26
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...ht not work >>>>> for alternative layouts which always expose descriptors >>>>> immediately >>>> Probably it wasn't clear. Please let me explain the two functions here: >>>> >>>> 1) virtqueue_add_chain_desc(vq, head_id, prev_id,..): >>>> grabs a desc from the vq and inserts it to the chain tail (which is indexed >>>> by >>>> prev_id, probably better to call it tail_id). Then, the new added desc >>>> becomes >>>> the tail (i.e. the last desc). The _F_NEXT flag is...