[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for 9.0 01/12] vdpa: do not set virtio status bits if unneede
From: |
Jason Wang |
Subject: |
Re: [PATCH for 9.0 01/12] vdpa: do not set virtio status bits if unneeded |
Date: |
Wed, 20 Dec 2023 12:25:07 +0800 |
On Sat, Dec 16, 2023 at 1:28 AM Eugenio Pérez <eperezma@redhat.com> wrote:
>
> Next commits will set DRIVER and ACKNOWLEDGE flags repeatedly in the
> case of a migration destination. Let's save ioctls with this.
>
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
> ---
> hw/virtio/vhost-vdpa.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
> index 7500c2fc82..cc252fc2d8 100644
> --- a/hw/virtio/vhost-vdpa.c
> +++ b/hw/virtio/vhost-vdpa.c
> @@ -510,6 +510,10 @@ static int vhost_vdpa_add_status(struct vhost_dev *dev,
> uint8_t status)
> if (ret < 0) {
> return ret;
> }
> + if ((s & status) == status) {
> + /* Don't set bits already set */
> + return 0;
> + }
>
> s |= status;
>
> --
> 2.39.3
>
- [PATCH for 9.0 00/12] Map memory at destination .load_setup in vDPA-net migration, Eugenio Pérez, 2023/12/15
- [PATCH for 9.0 01/12] vdpa: do not set virtio status bits if unneeded, Eugenio Pérez, 2023/12/15
- Re: [PATCH for 9.0 01/12] vdpa: do not set virtio status bits if unneeded,
Jason Wang <=
- [PATCH for 9.0 02/12] vdpa: make batch_begin_once early return, Eugenio Pérez, 2023/12/15
- [PATCH for 9.0 04/12] vdpa: extract out _dma_end_batch from _listener_commit, Eugenio Pérez, 2023/12/15
- [PATCH for 9.0 06/12] vdpa: check for iova tree initialized at net_client_start, Eugenio Pérez, 2023/12/15
- [PATCH for 9.0 05/12] vdpa: factor out stop path of vhost_vdpa_dev_start, Eugenio Pérez, 2023/12/15
- [PATCH for 9.0 07/12] vdpa: set backend capabilities at vhost_vdpa_init, Eugenio Pérez, 2023/12/15