Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-10 Thread Jason Wang
On 2020/8/10 下午9:37, Michael S. Tsirkin wrote: On Wed, Aug 05, 2020 at 10:16:16AM +0800, Jason Wang wrote: On 2020/8/4 下午5:21, Michael S. Tsirkin wrote:   +struct vhost_vring_call { +    struct eventfd_ctx *ctx; +    struct irq_bypass_producer producer; +    spinlock_t ctx_lock; It's not cl

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-10 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 10:16:16AM +0800, Jason Wang wrote: > > On 2020/8/4 下午5:21, Michael S. Tsirkin wrote: > > > > > >   +struct vhost_vring_call { > > > > > > +    struct eventfd_ctx *ctx; > > > > > > +    struct irq_bypass_producer producer; > > > > > > +    spinlock_t ctx_lock; > > > > > It

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-04 Thread Jason Wang
On 2020/8/5 下午1:49, Zhu, Lingshan wrote: On 8/5/2020 10:16 AM, Jason Wang wrote: On 2020/8/4 下午5:21, Michael S. Tsirkin wrote:    +struct vhost_vring_call { +    struct eventfd_ctx *ctx; +    struct irq_bypass_producer producer; +    spinlock_t ctx_lock; It's not clear to me why we need ct

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-04 Thread Jason Wang
On 2020/8/4 下午5:21, Zhu, Lingshan wrote: Hi Jason, we use this lock to protect the eventfd_ctx and irq from race conditions, We don't support irq notification from vDPA device driver in this version, do we still have race condition? as we discussed before: (1)if vendor change IRQ after DR

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-04 Thread Jason Wang
On 2020/8/4 下午5:21, Michael S. Tsirkin wrote:   +struct vhost_vring_call { +    struct eventfd_ctx *ctx; +    struct irq_bypass_producer producer; +    spinlock_t ctx_lock; It's not clear to me why we need ctx_lock here. Thanks Hi Jason, we use this lock to protect the eventfd_ctx and irq f

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-04 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 04:53:39PM +0800, Jason Wang wrote: > > On 2020/8/4 下午4:42, Zhu, Lingshan wrote: > > > > > > On 8/4/2020 4:38 PM, Jason Wang wrote: > > > > > > On 2020/7/31 下午2:55, Zhu Lingshan wrote: > > > > This commit introduces struct vhost_vring_call which replaced > > > > raw stru

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-04 Thread Jason Wang
On 2020/8/4 下午4:42, Zhu, Lingshan wrote: On 8/4/2020 4:38 PM, Jason Wang wrote: On 2020/7/31 下午2:55, Zhu Lingshan wrote: This commit introduces struct vhost_vring_call which replaced raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. Besides eventfd_ctx, it contains a spin lock and

Re: [PATCH V5 1/6] vhost: introduce vhost_vring_call

2020-08-04 Thread Jason Wang
On 2020/7/31 下午2:55, Zhu Lingshan wrote: This commit introduces struct vhost_vring_call which replaced raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. Besides eventfd_ctx, it contains a spin lock and an irq_bypass_producer in its structure. Signed-off-by: Zhu Lingshan Suggested-by: