linux-stable/drivers/vhost
Eric Auger f9815b303e vhost/net: Clear the pending messages when the backend is removed
[ Upstream commit 9526f9a2b7 ]

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: Eric Auger <eric.auger@redhat.com>
Suggested-by: Jason Wang <jasowang@redhat.com>
Fixes: 6b1e6cc785 ("vhost: new device IOTLB API")
Message-Id: <20230117151518.44725-3-eric.auger@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-15 17:22:11 +01:00
..
iotlb.c
Kconfig
Makefile
net.c vhost/net: Clear the pending messages when the backend is removed 2023-02-15 17:22:11 +01:00
scsi.c
test.c
test.h
vdpa.c vhost_vdpa: don't setup irq offloading when irq_num < 0 2022-05-25 09:17:53 +02:00
vhost.c vhost/net: Clear the pending messages when the backend is removed 2023-02-15 17:22:11 +01:00
vhost.h vhost/net: Clear the pending messages when the backend is removed 2023-02-15 17:22:11 +01:00
vringh.c vringh: fix range used in iotlb_translate() 2023-01-14 10:16:46 +01:00
vsock.c vhost/vsock: Fix error handling in vhost_vsock_init() 2023-01-14 10:16:46 +01:00