vdpa_sim_blk: call vringh_complete_iotlb() also in the error path
authorStefano Garzarella <sgarzare@redhat.com>
Thu, 30 Jun 2022 15:32:21 +0000 (17:32 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:26:07 +0000 (04:26 -0400)
commit8472019eec2ccff60144d8585367b2856a59416e
treeff2df3639ffdc65144bac9daa76ca71345dd651a
parent9c4df0900f376f28e8e5cca640a10a0085f16b66
vdpa_sim_blk: call vringh_complete_iotlb() also in the error path

Call vringh_complete_iotlb() even when we encounter a serious error
that prevents us from writing the status in the "in" header
(e.g. the header length is incorrect, etc.).

The guest is misbehaving, so maybe the ring is in a bad state, but
let's avoid making things worse.

Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20220630153221.83371-4-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c