aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2025-05-22 23:52:19 +0000
committerSean Christopherson <[email protected]>2025-06-23 16:50:59 +0000
commit2cdd64cbf9906f9d2d52ef96e1471992ff6c27ec (patch)
tree9359870624393ea1ecbb611469cf6fa6578dbf39 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentsched/wait: Add a waitqueue helper for fully exclusive priority waiters (diff)
downloadkernel-2cdd64cbf9906f9d2d52ef96e1471992ff6c27ec.tar.gz
kernel-2cdd64cbf9906f9d2d52ef96e1471992ff6c27ec.zip
KVM: Disallow binding multiple irqfds to an eventfd with a priority waiter
Disallow binding an irqfd to an eventfd that already has a priority waiter, i.e. to an eventfd that already has an attached irqfd. KVM always operates in exclusive mode for EPOLL_IN (unconditionally returns '1'), i.e. only the first waiter will be notified. KVM already disallows binding multiple irqfds to an eventfd in a single VM, but doesn't guard against multiple VMs binding to an eventfd. Adding the extra protection reduces the pain of a userspace VMM bug, e.g. if userspace fails to de-assign before re-assigning when transferring state for intra-host migration, then the migration will explicitly fail as opposed to dropping IRQs on the destination VM. Temporarily keep KVM's manual check on irqfds.items, but add a WARN, e.g. to allow sanity checking the waitqueue enforcement. Cc: Oliver Upton <[email protected]> Cc: David Matlack <[email protected]> Tested-by: K Prateek Nayak <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions