[PATCH v2 0/2] vhost/vsock: fix device IOTLB feature lifecycle

Jia Jia posted 2 patches 2 months ago
There is a newer version of this series
drivers/vhost/vsock.c | 46 +++++++++++++++++++++++++++++++++++++------
1 file changed, 40 insertions(+), 6 deletions(-)
[PATCH v2 0/2] vhost/vsock: fix device IOTLB feature lifecycle
Posted by Jia Jia 2 months ago
As suggested, split the changes into two patches.

Patch 1 detaches and frees the device IOTLB when ACCESS_PLATFORM is
cleared. The device and virtqueue IOTLB pointers, metadata caches, and
acked features are updated while all virtqueue mutexes are held. It also
drops old IOTLB miss messages and wakes readers.

Patch 2 keeps the current IOTLB when ACCESS_PLATFORM remains enabled,
so a runtime logging update does not discard valid translations.

Changes since v1:
- discard the existing IOTLB instead of returning -EBUSY
- serialize the switch against all virtqueues
- clear old IOTLB messages and wake readers
- move the existing-IOTLB preservation change to a separate patch

Jia Jia (2):
  vhost/vsock: discard IOTLB when ACCESS_PLATFORM is cleared
  vhost/vsock: keep IOTLB across feature updates

 drivers/vhost/vsock.c | 46 +++++++++++++++++++++++++++++++++++++------
 1 file changed, 40 insertions(+), 6 deletions(-)

-- 
2.34.1
Re: [PATCH v2 0/2] vhost/vsock: fix device IOTLB feature lifecycle
Posted by Michael S. Tsirkin 1 month, 4 weeks ago
On Fri, Jul 31, 2026 at 06:34:12PM +0800, Jia Jia wrote:
> As suggested, split the changes into two patches.
> 
> Patch 1 detaches and frees the device IOTLB when ACCESS_PLATFORM is
> cleared. The device and virtqueue IOTLB pointers, metadata caches, and
> acked features are updated while all virtqueue mutexes are held. It also
> drops old IOTLB miss messages and wakes readers.
> 
> Patch 2 keeps the current IOTLB when ACCESS_PLATFORM remains enabled,
> so a runtime logging update does not discard valid translations.

pls do not post v2 as reply to v1. confuses tools. thanks!
> Changes since v1:
> - discard the existing IOTLB instead of returning -EBUSY
> - serialize the switch against all virtqueues
> - clear old IOTLB messages and wake readers
> - move the existing-IOTLB preservation change to a separate patch
> 
> Jia Jia (2):
>   vhost/vsock: discard IOTLB when ACCESS_PLATFORM is cleared
>   vhost/vsock: keep IOTLB across feature updates
> 
>  drivers/vhost/vsock.c | 46 +++++++++++++++++++++++++++++++++++++------
>  1 file changed, 40 insertions(+), 6 deletions(-)
> 
> -- 
> 2.34.1
Re: [PATCH v2 0/2] vhost/vsock: fix device IOTLB feature lifecycle
Posted by Jia Jia 1 month, 4 weeks ago
On Mon, Aug 03, 2026 at 11:19:30PM -0400, Michael S. Tsirkin wrote:
> pls do not post v2 as reply to v1. confuses tools. thanks!

Understood. Thanks for the reminder. I will resend the v2 patch set as a
new thread.