Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-14 Thread Dragos Tatulea
On 14.08.24 07:29, Jason Wang wrote: > On Tue, Aug 13, 2024 at 8:53 PM Dragos Tatulea wrote: >> >> >> >> On 13.08.24 08:26, Jason Wang wrote: >>> On Mon, Aug 12, 2024 at 7:22 PM Dragos Tatulea wrote: On 12.08.24 08:49, Jason Wang wrote: > On Mon, Aug 12, 2024 at 1:47 PM

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-14 Thread Michael S. Tsirkin
On Thu, Aug 08, 2024 at 04:20:44PM +0800, Jason Wang wrote: > We used to call irq_bypass_unregister_producer() in > vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the > token pointer is still valid or not. > > Actually, we use the eventfd_ctx as the token so the life cycle of t

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-13 Thread Jason Wang
On Tue, Aug 13, 2024 at 8:53 PM Dragos Tatulea wrote: > > > > On 13.08.24 08:26, Jason Wang wrote: > > On Mon, Aug 12, 2024 at 7:22 PM Dragos Tatulea wrote: > >> > >> > >> > >> On 12.08.24 08:49, Jason Wang wrote: > >>> On Mon, Aug 12, 2024 at 1:47 PM Jason Wang wrote: > > On Fri, Aug

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-13 Thread Dragos Tatulea
On 13.08.24 08:26, Jason Wang wrote: > On Mon, Aug 12, 2024 at 7:22 PM Dragos Tatulea wrote: >> >> >> >> On 12.08.24 08:49, Jason Wang wrote: >>> On Mon, Aug 12, 2024 at 1:47 PM Jason Wang wrote: On Fri, Aug 9, 2024 at 2:04 AM Dragos Tatulea wrote: > > > > On 08.08.2

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-12 Thread Jason Wang
On Mon, Aug 12, 2024 at 7:22 PM Dragos Tatulea wrote: > > > > On 12.08.24 08:49, Jason Wang wrote: > > On Mon, Aug 12, 2024 at 1:47 PM Jason Wang wrote: > >> > >> On Fri, Aug 9, 2024 at 2:04 AM Dragos Tatulea wrote: > >>> > >>> > >>> > >>> On 08.08.24 10:20, Jason Wang wrote: > We used to c

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-12 Thread Dragos Tatulea
On 12.08.24 08:49, Jason Wang wrote: > On Mon, Aug 12, 2024 at 1:47 PM Jason Wang wrote: >> >> On Fri, Aug 9, 2024 at 2:04 AM Dragos Tatulea wrote: >>> >>> >>> >>> On 08.08.24 10:20, Jason Wang wrote: We used to call irq_bypass_unregister_producer() in vhost_vdpa_setup_vq_irq() which

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-11 Thread Jason Wang
On Mon, Aug 12, 2024 at 1:47 PM Jason Wang wrote: > > On Fri, Aug 9, 2024 at 2:04 AM Dragos Tatulea wrote: > > > > > > > > On 08.08.24 10:20, Jason Wang wrote: > > > We used to call irq_bypass_unregister_producer() in > > > vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the >

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-11 Thread Jason Wang
On Fri, Aug 9, 2024 at 2:04 AM Dragos Tatulea wrote: > > > > On 08.08.24 10:20, Jason Wang wrote: > > We used to call irq_bypass_unregister_producer() in > > vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the > > token pointer is still valid or not. > > > > Actually, we use the

Re: [RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-08 Thread Dragos Tatulea
On 08.08.24 10:20, Jason Wang wrote: > We used to call irq_bypass_unregister_producer() in > vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the > token pointer is still valid or not. > > Actually, we use the eventfd_ctx as the token so the life cycle of the > token should be

[RFC PATCH] vhost_vdpa: assign irq bypass producer token correctly

2024-08-08 Thread Jason Wang
We used to call irq_bypass_unregister_producer() in vhost_vdpa_setup_vq_irq() which is problematic as we don't know if the token pointer is still valid or not. Actually, we use the eventfd_ctx as the token so the life cycle of the token should be bound to the VHOST_SET_VRING_CALL instead of vhost_