Re: [PATCH RFC v2 02/10] vringh: add 'iotlb_lock' to synchronize iotlb accesses

2021-01-31 Thread Jason Wang
On 2021/1/29 下午5:18, Stefano Garzarella wrote: On Fri, Jan 29, 2021 at 03:43:40PM +0800, Jason Wang wrote: On 2021/1/28 下午10:41, Stefano Garzarella wrote: Usually iotlb accesses are synchronized with a spinlock. Let's request it as a new parameter in vringh_set_iotlb() and hold it when we

Re: [PATCH RFC v2 02/10] vringh: add 'iotlb_lock' to synchronize iotlb accesses

2021-01-28 Thread Jason Wang
On 2021/1/28 下午10:41, Stefano Garzarella wrote: Usually iotlb accesses are synchronized with a spinlock. Let's request it as a new parameter in vringh_set_iotlb() and hold it when we navigate the iotlb in iotlb_translate() to avoid race conditions with any new additions/deletions of ranges

[PATCH RFC v2 02/10] vringh: add 'iotlb_lock' to synchronize iotlb accesses

2021-01-28 Thread Stefano Garzarella
Usually iotlb accesses are synchronized with a spinlock. Let's request it as a new parameter in vringh_set_iotlb() and hold it when we navigate the iotlb in iotlb_translate() to avoid race conditions with any new additions/deletions of ranges from the ioltb. Signed-off-by: Stefano Garzarella ---