Commit f9815b30 authored by Eric Auger's avatar Eric Auger Committed by Greg Kroah-Hartman
Browse files

vhost/net: Clear the pending messages when the backend is removed



[ Upstream commit 9526f9a2 ]

When the vhost iotlb is used along with a guest virtual iommu
and the guest gets rebooted, some MISS messages may have been
recorded just before the reboot and spuriously executed by
the virtual iommu after the reboot.

As vhost does not have any explicit reset user API,
VHOST_NET_SET_BACKEND looks a reasonable point where to clear
the pending messages, in case the backend is removed.

Export vhost_clear_msg() and call it in vhost_net_set_backend()
when fd == -1.

Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
Suggested-by: default avatarJason Wang <jasowang@redhat.com>
Fixes: 6b1e6cc7 ("vhost: new device IOTLB API")
Message-Id: <20230117151518.44725-3-eric.auger@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent de990d15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment