Skip to content
  • David Woodhouse's avatar
    eventfd: Export eventfd_ctx_do_read() · 28f13267
    David Woodhouse authored
    
    
    Where events are consumed in the kernel, for example by KVM's
    irqfd_wakeup() and VFIO's virqfd_wakeup(), they currently lack a
    mechanism to drain the eventfd's counter.
    
    Since the wait queue is already locked while the wakeup functions are
    invoked, all they really need to do is call eventfd_ctx_do_read().
    
    Add a check for the lock, and export it for them.
    
    Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
    Message-Id: <20201027135523.646811-2-dwmw2@infradead.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    28f13267