search for: send_start_cmd_id

Displaying 20 results from an estimated 21 matches for "send_start_cmd_id".

2018 Apr 03
2
[PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...if (virtio32_to_cpu(vb->vdev, vb->cmd_id_use) != vb->cmd_id_received) > + return 1; > + this access to cmd_id_use and cmd_id_received without locks bothers me. Pls document why it's safe. > + return add_one_sg(vb->free_page_vq, pfn, len); > +} > + > +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) > +{ > + struct scatterlist sg; > + struct virtqueue *vq = vb->free_page_vq; > + > + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); > + sg_init_one(&sg, &vb->cmd_id_use, sizeof(vb->cmd_id_use)); > + return...
2018 Apr 03
2
[PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...if (virtio32_to_cpu(vb->vdev, vb->cmd_id_use) != vb->cmd_id_received) > + return 1; > + this access to cmd_id_use and cmd_id_received without locks bothers me. Pls document why it's safe. > + return add_one_sg(vb->free_page_vq, pfn, len); > +} > + > +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) > +{ > + struct scatterlist sg; > + struct virtqueue *vq = vb->free_page_vq; > + > + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); > + sg_init_one(&sg, &vb->cmd_id_use, sizeof(vb->cmd_id_use)); > + return...
2018 Apr 09
1
[PATCH v31 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...nmapped since virtio-balloon works with > + * VIRTIO_F_IOMMU_PLATFORM disabled. > + */ > + if (virtio32_to_cpu(vb->vdev, vb->cmd_id_use) != vb->cmd_id_received) > + return -EINTR; > + > + return add_one_sg(vb->free_page_vq, pfn, len); > +} > + > +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) > +{ > + struct scatterlist sg; > + struct virtqueue *vq = vb->free_page_vq; > + > + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); > + sg_init_one(&sg, &vb->cmd_id_use, sizeof(vb->cmd_id_use)); > + return...
2018 Apr 03
0
[PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...+ * If a stop id or a new cmd id was just received from host, stop + * the reporting, and return 1 to indicate an active stop. + */ + if (virtio32_to_cpu(vb->vdev, vb->cmd_id_use) != vb->cmd_id_received) + return 1; + + return add_one_sg(vb->free_page_vq, pfn, len); +} + +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) +{ + struct scatterlist sg; + struct virtqueue *vq = vb->free_page_vq; + + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); + sg_init_one(&sg, &vb->cmd_id_use, sizeof(vb->cmd_id_use)); + return virtqueue_add_outbuf(vq, &sg, 1...
2018 Apr 06
0
[PATCH v31 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...ed or dma mapped pages that + * need to be unmapped since virtio-balloon works with + * VIRTIO_F_IOMMU_PLATFORM disabled. + */ + if (virtio32_to_cpu(vb->vdev, vb->cmd_id_use) != vb->cmd_id_received) + return -EINTR; + + return add_one_sg(vb->free_page_vq, pfn, len); +} + +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) +{ + struct scatterlist sg; + struct virtqueue *vq = vb->free_page_vq; + + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); + sg_init_one(&sg, &vb->cmd_id_use, sizeof(vb->cmd_id_use)); + return virtqueue_add_outbuf(vq, &sg, 1...
2018 Apr 04
0
[PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...porting more hints after host requests to stop isn't an issue for this optimization feature, because host will simply drop the stale hints next time when it needs a new reporting. > >> + return add_one_sg(vb->free_page_vq, pfn, len); >> +} >> + >> +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) >> +{ >> + struct scatterlist sg; >> + struct virtqueue *vq = vb->free_page_vq; >> + >> + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); >> + sg_init_one(&sg, &vb->cmd_id_use, sizeof(vb->cmd_...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...the change? Is it more likely to happen now? > virtqueue_kick(vb->stats_vq); > } > + > + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) > + vb->free_page_vq = vqs[VIRTIO_BALLOON_VQ_FREE_PAGE]; > + > return 0; > } > > +static int send_start_cmd_id(struct virtio_balloon *vb) > +{ > + struct scatterlist sg; > + struct virtqueue *vq = vb->free_page_vq; > + > + vb->cmd_start.id = cpu_to_virtio32(vb->vdev, vb->cmd_id_active); > + vb->cmd_start.size = cpu_to_virtio32(vb->vdev, > + MAX_ORDER_NR_PAGES...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...the change? Is it more likely to happen now? > virtqueue_kick(vb->stats_vq); > } > + > + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) > + vb->free_page_vq = vqs[VIRTIO_BALLOON_VQ_FREE_PAGE]; > + > return 0; > } > > +static int send_start_cmd_id(struct virtio_balloon *vb) > +{ > + struct scatterlist sg; > + struct virtqueue *vq = vb->free_page_vq; > + > + vb->cmd_start.id = cpu_to_virtio32(vb->vdev, vb->cmd_id_active); > + vb->cmd_start.size = cpu_to_virtio32(vb->vdev, > + MAX_ORDER_NR_PAGES...
2018 Jun 25
0
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...b->vdev->dev, "%s: add stat_vq failed\n", + __func__); + return ret; + } virtqueue_kick(vb->stats_vq); } + + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) + vb->free_page_vq = vqs[VIRTIO_BALLOON_VQ_FREE_PAGE]; + return 0; } +static int send_start_cmd_id(struct virtio_balloon *vb) +{ + struct scatterlist sg; + struct virtqueue *vq = vb->free_page_vq; + + vb->cmd_start.id = cpu_to_virtio32(vb->vdev, vb->cmd_id_active); + vb->cmd_start.size = cpu_to_virtio32(vb->vdev, + MAX_ORDER_NR_PAGES * PAGE_SIZE); + sg_init_one(&sg...
2018 Apr 03
5
[PATCH v30 0/4] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's
2018 Apr 06
5
[PATCH v31 0/4] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's
2018 Jun 26
0
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...le64 **arrays, > + uint32_t array_num, > + uint32_t last_array_hints) > +{ > + int err, i = 0; > + struct scatterlist sg; > + struct virtqueue *vq = vb->free_page_vq; > + > + /* Start by sending the received cmd id to host with an outbuf. */ > + err = send_start_cmd_id(vb); > + if (unlikely(err)) > + goto out_err; > + /* Kick host to start taking entries from the vq. */ > + virtqueue_kick(vq); > + > + for (i = 0; i < array_num; i++) { > + /* > + * If a stop id or a new cmd id was just received from host, > + * stop the reportin...
2018 Apr 10
4
[PATCH v32 0/4] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's
2018 Jun 25
9
[PATCH v34 0/4] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's
2018 Jun 25
9
[PATCH v34 0/4] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...array_num, > > + uint32_t last_array_hints) > > +{ > > + int err, i = 0; > > + struct scatterlist sg; > > + struct virtqueue *vq = vb->free_page_vq; > > + > > + /* Start by sending the received cmd id to host with an outbuf. */ > > + err = send_start_cmd_id(vb); > > + if (unlikely(err)) > > + goto out_err; > > + /* Kick host to start taking entries from the vq. */ > > + virtqueue_kick(vq); > > + > > + for (i = 0; i < array_num; i++) { > > + /* > > + * If a stop id or a new cmd id was just received...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...array_num, > > + uint32_t last_array_hints) > > +{ > > + int err, i = 0; > > + struct scatterlist sg; > > + struct virtqueue *vq = vb->free_page_vq; > > + > > + /* Start by sending the received cmd id to host with an outbuf. */ > > + err = send_start_cmd_id(vb); > > + if (unlikely(err)) > > + goto out_err; > > + /* Kick host to start taking entries from the vq. */ > > + virtqueue_kick(vq); > > + > > + for (i = 0; i < array_num; i++) { > > + /* > > + * If a stop id or a new cmd id was just received...
2018 Mar 26
7
[PATCH v29 0/4] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's
2018 Apr 04
2
[PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...le hints next time when it needs a new > reporting. What about the other direction? Can this observe a stale value and exit erroneously? > > > > > > > > + return add_one_sg(vb->free_page_vq, pfn, len); > > > +} > > > + > > > +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) > > > +{ > > > + struct scatterlist sg; > > > + struct virtqueue *vq = vb->free_page_vq; > > > + > > > + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); > > > + sg_init_one(&sg, &v...
2018 Apr 04
2
[PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...le hints next time when it needs a new > reporting. What about the other direction? Can this observe a stale value and exit erroneously? > > > > > > > > + return add_one_sg(vb->free_page_vq, pfn, len); > > > +} > > > + > > > +static int send_start_cmd_id(struct virtio_balloon *vb, uint32_t cmd_id) > > > +{ > > > + struct scatterlist sg; > > > + struct virtqueue *vq = vb->free_page_vq; > > > + > > > + vb->cmd_id_use = cpu_to_virtio32(vb->vdev, cmd_id); > > > + sg_init_one(&sg, &v...