Re: [PATCH 1/2] Allow returning EventNotifier's wfd

2022-03-02 Thread Paolo Bonzini
On 3/2/22 17:06, Stefan Hajnoczi wrote: I agree. In fact, that's what I implemented in the first place. I changed to this version in which event_notifier_get_fd() is extended because it feels more "correct". But yes, the pragmatic option would be adding a new event_notifier_get_wfd(). I'll wait

Re: [PATCH 1/2] Allow returning EventNotifier's wfd

2022-03-02 Thread Stefan Hajnoczi
On Wed, Mar 02, 2022 at 04:23:42PM +0100, Sergio Lopez wrote: > On Wed, Mar 02, 2022 at 08:12:34AM -0700, Alex Williamson wrote: > > On Wed, 2 Mar 2022 12:36:43 +0100 > > Sergio Lopez wrote: > > > > > event_notifier_get_fd(const EventNotifier *e) always returns > > > EventNotifier's read file

Re: [PATCH 1/2] Allow returning EventNotifier's wfd

2022-03-02 Thread Alex Williamson
On Wed, 2 Mar 2022 16:23:42 +0100 Sergio Lopez wrote: > On Wed, Mar 02, 2022 at 08:12:34AM -0700, Alex Williamson wrote: > > On Wed, 2 Mar 2022 12:36:43 +0100 > > Sergio Lopez wrote: > > > > > event_notifier_get_fd(const EventNotifier *e) always returns > > > EventNotifier's read file

Re: [PATCH 1/2] Allow returning EventNotifier's wfd

2022-03-02 Thread Sergio Lopez
On Wed, Mar 02, 2022 at 08:12:34AM -0700, Alex Williamson wrote: > On Wed, 2 Mar 2022 12:36:43 +0100 > Sergio Lopez wrote: > > > event_notifier_get_fd(const EventNotifier *e) always returns > > EventNotifier's read file descriptor (rfd). This is not a problem when > > the EventNotifier is

Re: [PATCH 1/2] Allow returning EventNotifier's wfd

2022-03-02 Thread Alex Williamson
On Wed, 2 Mar 2022 12:36:43 +0100 Sergio Lopez wrote: > event_notifier_get_fd(const EventNotifier *e) always returns > EventNotifier's read file descriptor (rfd). This is not a problem when > the EventNotifier is backed by a an eventfd, as a single file > descriptor is used both for reading and

[PATCH 1/2] Allow returning EventNotifier's wfd

2022-03-02 Thread Sergio Lopez
event_notifier_get_fd(const EventNotifier *e) always returns EventNotifier's read file descriptor (rfd). This is not a problem when the EventNotifier is backed by a an eventfd, as a single file descriptor is used both for reading and triggering events (rfd == wfd). But, when EventNotifier is