]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
irqbypass: Take ownership of producer/consumer token tracking
authorSean Christopherson <seanjc@google.com>
Fri, 16 May 2025 23:07:29 +0000 (16:07 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:52:38 +0000 (13:52 -0700)
commit2b521d86ee80a436a92445b8206d38d75aeb39ea
tree315f27acc001786e5be4df56acf8a504d0da5467
parent07fbc83c01520c62c89f6495f2f0bea2f4ac6684
irqbypass: Take ownership of producer/consumer token tracking

Move ownership of IRQ bypass token tracking into irqbypass.ko, and
explicitly require callers to pass an eventfd_ctx structure instead of a
completely opaque token.  Relying on producers and consumers to set the
token appropriately is error prone, and hiding the fact that the token must
be an eventfd_ctx pointer (for all intents and purposes) unnecessarily
obfuscates the code and makes it more brittle.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/r/20250516230734.2564775-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c
drivers/vfio/pci/vfio_pci_intrs.c
drivers/vhost/vdpa.c
include/linux/irqbypass.h
virt/kvm/eventfd.c
virt/lib/irqbypass.c