]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: Use a local struct to do the initial vfs_poll() on an irqfd
authorSean Christopherson <seanjc@google.com>
Thu, 22 May 2025 23:52:11 +0000 (16:52 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 23 Jun 2025 16:50:53 +0000 (09:50 -0700)
commit283ed5001d6852f85c09ed2522331b2b197ba937
tree14a6e3a4d5dc7779ba5f74818d51b506d4e43b90
parent6f343724837b9a7d70ba8c83dcdc37f4768d4e55
KVM: Use a local struct to do the initial vfs_poll() on an irqfd

Use a function-local struct for the poll_table passed to vfs_poll(), as
nothing in the vfs_poll() callchain grabs a long-term reference to the
structure, i.e. its lifetime doesn't need to be tied to the irqfd.  Using
a local structure will also allow propagating failures out of the polling
callback without further polluting kvm_kernel_irqfd.

Opportunstically rename irqfd_ptable_queue_proc() to kvm_irqfd_register()
to capture what it actually does.

Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250522235223.3178519-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
include/linux/kvm_irqfd.h
virt/kvm/eventfd.c