search for: cmd_id_act

Displaying 20 results from an estimated 39 matches for "cmd_id_act".

2020 Jul 10
2
[PATCH] virtio_balloon: fix sparse warning
...io_balloon.c b/drivers/virtio/virtio_balloon.c index fc7301406540..5d4b891bf84f 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -596,7 +596,7 @@ static int send_cmd_id_start(struct virtio_balloon *vb) while (virtqueue_get_buf(vq, &unused)) ; - vb->cmd_id_active = virtio32_to_cpu(vb->vdev, + vb->cmd_id_active = cpu_to_virtio32(vb->vdev, virtio_balloon_cmd_id_received(vb)); sg_init_one(&sg, &vb->cmd_id_active, sizeof(vb->cmd_id_active)); err = virtqueue_add_outbuf(vq, &sg, 1, &vb->cmd_id_active, GFP_KERNEL); --...
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...TIO_BALLOON_CMD_ID_DONE) { > - /* Pass ULONG_MAX to give back all the free pages */ > - return_free_pages_to_mm(vb, ULONG_MAX); > - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && > - vb->cmd_id_received != > - virtio32_to_cpu(vdev, vb->cmd_id_active)) { > - spin_lock_irqsave(&vb->stop_update_lock, flags); > - if (!vb->stop_update) { > - queue_work(vb->balloon_wq, > - &vb->report_free_page_work); > - } > - spin_unlock_irqrestore(&vb->stop_update_lock, flags); > - } > + spi...
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...TIO_BALLOON_CMD_ID_DONE) { > - /* Pass ULONG_MAX to give back all the free pages */ > - return_free_pages_to_mm(vb, ULONG_MAX); > - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && > - vb->cmd_id_received != > - virtio32_to_cpu(vdev, vb->cmd_id_active)) { > - spin_lock_irqsave(&vb->stop_update_lock, flags); > - if (!vb->stop_update) { > - queue_work(vb->balloon_wq, > - &vb->report_free_page_work); > - } > - spin_unlock_irqrestore(&vb->stop_update_lock, flags); > - } > + spi...
2019 Jan 07
3
[PATCH v3 0/3] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config space inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. v2->v3 ChangeLog: - rename cmd_id_received to cmd_id_received_cache, and have call sites read the latest value via virtio_balloon_cmd_id_received. (Still kept Cornelia and
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...u point > it out this is definately bug. The command ID I was talking about was > the one being passed via the descriptor ring. That one I believe is > native on both sides. Well qemu swaps it for modern devices: virtio_tswap32s(vdev, &id); guest swaps it too: vb->cmd_id_active = cpu_to_virtio32(vb->vdev, virtio_balloon_cmd_id_received(vb)); sg_init_one(&sg, &vb->cmd_id_active, sizeof(vb->cmd_id_active)); err = virtqueue_add_outbuf(vq, &sg, 1, &vb->cmd_id_active, GFP_KERNEL); So it'...
2020 Jul 14
2
[PATCH] virtio_balloon: clear modern features under legacy
...u point > it out this is definately bug. The command ID I was talking about was > the one being passed via the descriptor ring. That one I believe is > native on both sides. Well qemu swaps it for modern devices: virtio_tswap32s(vdev, &id); guest swaps it too: vb->cmd_id_active = cpu_to_virtio32(vb->vdev, virtio_balloon_cmd_id_received(vb)); sg_init_one(&sg, &vb->cmd_id_active, sizeof(vb->cmd_id_active)); err = virtqueue_add_outbuf(vq, &sg, 1, &vb->cmd_id_active, GFP_KERNEL); So it'...
2019 Jan 05
0
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...vb struct, so it's already 0-initialized :) > > + > > static int send_free_pages(struct virtio_balloon *vb) { > > int err; > > @@ -620,6 +630,7 @@ static int send_free_pages(struct virtio_balloon *vb) > > * stop the reporting. > > */ > > cmd_id_active = virtio32_to_cpu(vb->vdev, vb- > >cmd_id_active); > > + virtio_balloon_read_cmd_id_received(vb); [1] > > if (cmd_id_active != vb->cmd_id_received) > > break; > > > > @@ -637,11 +648,9 @@ static int send_free_pages(struct virtio_balloon >...
2019 Jan 04
4
[PATCH v2 0/2] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config space inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. v1->v2 ChangeLog: - add config_read_bitmap to indicate to the workqueue callbacks about the necessity of reading the related config fields. Wei Wang (2): virtio-balloon: tweak
2020 Aug 03
0
[PATCH v2 01/24] virtio_balloon: fix sparse warning
...io_balloon.c b/drivers/virtio/virtio_balloon.c index 54fd989f9353..8bc1704ffdf3 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -600,7 +600,7 @@ static int send_cmd_id_start(struct virtio_balloon *vb) while (virtqueue_get_buf(vq, &unused)) ; - vb->cmd_id_active = virtio32_to_cpu(vb->vdev, + vb->cmd_id_active = cpu_to_virtio32(vb->vdev, virtio_balloon_cmd_id_received(vb)); sg_init_one(&sg, &vb->cmd_id_active, sizeof(vb->cmd_id_active)); err = virtqueue_add_outbuf(vq, &sg, 1, &vb->cmd_id_active, GFP_KERNEL); --...
2020 Aug 05
0
[PATCH v3 01/38] virtio_balloon: fix sparse warning
...io_balloon.c b/drivers/virtio/virtio_balloon.c index 54fd989f9353..8bc1704ffdf3 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -600,7 +600,7 @@ static int send_cmd_id_start(struct virtio_balloon *vb) while (virtqueue_get_buf(vq, &unused)) ; - vb->cmd_id_active = virtio32_to_cpu(vb->vdev, + vb->cmd_id_active = cpu_to_virtio32(vb->vdev, virtio_balloon_cmd_id_received(vb)); sg_init_one(&sg, &vb->cmd_id_active, sizeof(vb->cmd_id_active)); err = virtqueue_add_outbuf(vq, &sg, 1, &vb->cmd_id_active, GFP_KERNEL); --...
2020 Jul 14
0
[PATCH] virtio_balloon: clear modern features under legacy
.... The command ID I was talking about was > > the one being passed via the descriptor ring. That one I believe is > > native on both sides. > > Well qemu swaps it for modern devices: > > virtio_tswap32s(vdev, &id); > > guest swaps it too: > vb->cmd_id_active = cpu_to_virtio32(vb->vdev, > virtio_balloon_cmd_id_received(vb)); > sg_init_one(&sg, &vb->cmd_id_active, sizeof(vb->cmd_id_active)); > err = virtqueue_add_outbuf(vq, &sg, 1, &vb->cmd_id_active, GFP_KERN...
2019 Jan 04
0
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...gt;cmd_id_received == VIRTIO_BALLOON_CMD_ID_DONE) { - /* Pass ULONG_MAX to give back all the free pages */ - return_free_pages_to_mm(vb, ULONG_MAX); - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && - vb->cmd_id_received != - virtio32_to_cpu(vdev, vb->cmd_id_active)) { - spin_lock_irqsave(&vb->stop_update_lock, flags); - if (!vb->stop_update) { - queue_work(vb->balloon_wq, - &vb->report_free_page_work); - } - spin_unlock_irqrestore(&vb->stop_update_lock, flags); - } + spin_lock_irqsave(&vb->stop_update_l...
2018 Jun 25
0
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...Command buffers to start and stop the reporting of hints to host */ + struct virtio_balloon_free_page_hints_cmd cmd_start; + struct virtio_balloon_free_page_hints_cmd cmd_stop; + + /* The cmd id received from host */ + uint32_t cmd_id_received; + /* The cmd id that is actively in use */ + uint32_t cmd_id_active; + /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -326,17 +353,6 @@ static void stats_handle_request(struct virtio_balloon *vb) virtqueue_kick(vq); } -static void virtballoon_changed(struct virtio_device *vdev) -{ - struct virtio_balloon *vb = vdev-&g...
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
On Fri, Jul 10, 2020 at 09:13:41AM -0700, Alexander Duyck wrote: > On Fri, Jul 10, 2020 at 4:31 AM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > Page reporting features were never supported by legacy hypervisors. > > Supporting them poses a problem: should we use native endian-ness (like > > current code assumes)? Or little endian-ness like the virtio spec
2020 Jul 12
2
[PATCH] virtio_balloon: clear modern features under legacy
On Fri, Jul 10, 2020 at 09:13:41AM -0700, Alexander Duyck wrote: > On Fri, Jul 10, 2020 at 4:31 AM Michael S. Tsirkin <mst at redhat.com> wrote: > > > > Page reporting features were never supported by legacy hypervisors. > > Supporting them poses a problem: should we use native endian-ness (like > > current code assumes)? Or little endian-ness like the virtio spec
2019 Jan 03
6
[PATCH v1 0/2] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config registers inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. Wei Wang (2): virtio-balloon: tweak config_changed implementation virtio-balloon: improve update_balloon_size_func drivers/virtio/virtio_balloon.c | 59
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...the reporting of hints to host */ > + struct virtio_balloon_free_page_hints_cmd cmd_start; > + struct virtio_balloon_free_page_hints_cmd cmd_stop; > + > + /* The cmd id received from host */ > + uint32_t cmd_id_received; > + /* The cmd id that is actively in use */ > + uint32_t cmd_id_active; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > You want u32 types. > @@ -326,17 +353,6 @@ static void stats_handle_request(struct virtio_balloon *vb) > virtqueue_kick(vq); > } > > -static void virtballoon_changed(s...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...the reporting of hints to host */ > + struct virtio_balloon_free_page_hints_cmd cmd_start; > + struct virtio_balloon_free_page_hints_cmd cmd_stop; > + > + /* The cmd id received from host */ > + uint32_t cmd_id_received; > + /* The cmd id that is actively in use */ > + uint32_t cmd_id_active; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > You want u32 types. > @@ -326,17 +353,6 @@ static void stats_handle_request(struct virtio_balloon *vb) > virtqueue_kick(vq); > } > > -static void virtballoon_changed(s...
2019 Jan 03
0
[PATCH v1 1/2] virtio-balloon: tweak config_changed implementation
...gt;cmd_id_received == VIRTIO_BALLOON_CMD_ID_DONE) { - /* Pass ULONG_MAX to give back all the free pages */ - return_free_pages_to_mm(vb, ULONG_MAX); - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && - vb->cmd_id_received != - virtio32_to_cpu(vdev, vb->cmd_id_active)) { - spin_lock_irqsave(&vb->stop_update_lock, flags); - if (!vb->stop_update) { - queue_work(vb->balloon_wq, - &vb->report_free_page_work); - } - spin_unlock_irqrestore(&vb->stop_update_lock, flags); - } + spin_lock_irqsave(&vb->stop_update_l...
2018 Jul 20
10
[PATCH v36 0/5] 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