virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [RFC] vhost: Clear the pending messages on vhost_init_device_iotlb()
@ 2022-11-07 20:34 Eric Auger
  2022-11-07 20:42 ` Michael S. Tsirkin
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Auger @ 2022-11-07 20:34 UTC (permalink / raw)
  To: eric.auger.pro, eric.auger, mst, jasowang, kvm, virtualization,
	netdev, linux-kernel

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. Despite the device iotlb gets
re-initialized, the messages are not cleared. Fix that by calling
vhost_clear_msg() at the end of vhost_init_device_iotlb().

Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
 drivers/vhost/vhost.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 40097826cff0..422a1fdee0ca 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1751,6 +1751,7 @@ int vhost_init_device_iotlb(struct vhost_dev *d, bool enabled)
 	}
 
 	vhost_iotlb_free(oiotlb);
+	vhost_clear_msg(d);
 
 	return 0;
 }
-- 
2.37.3

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-11-09  7:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-07 20:34 [RFC] vhost: Clear the pending messages on vhost_init_device_iotlb() Eric Auger
2022-11-07 20:42 ` Michael S. Tsirkin
2022-11-07 21:10   ` Eric Auger
2022-11-07 23:06     ` Michael S. Tsirkin
2022-11-08  3:09       ` Jason Wang
2022-11-08  7:31         ` Eric Auger
2022-11-08  8:55         ` Michael S. Tsirkin
2022-11-08  9:13           ` Jason Wang
2022-11-08  9:31             ` Michael S. Tsirkin
2022-11-08 10:17               ` Eric Auger
2022-11-09  3:44                 ` Jason Wang
2022-11-09  7:29                   ` Eric Auger
2022-11-09  3:39               ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).